From 595198b0a605bcb0fad9f57777b235efeb1f2fdf Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:53:01 -0700 Subject: [PATCH 01/21] feat: Selective gapic generation phase II --- .../generator/engine/ast/JavaDocComment.java | 10 ++ .../composer/comment/CommentComposer.java | 3 + .../comment/ServiceClientCommentComposer.java | 11 +- .../comment/SettingsCommentComposer.java | 34 ++-- .../AbstractServiceClientClassComposer.java | 37 ++++- .../AbstractServiceSettingsClassComposer.java | 79 ++++++---- .../AbstractServiceStubClassComposer.java | 18 ++- ...tractServiceStubSettingsClassComposer.java | 85 +++++++--- .../ServiceClientHeaderSampleComposer.java | 28 +++- .../api/generator/gapic/model/Method.java | 11 ++ .../generator/gapic/protoparser/Parser.java | 53 ++++--- .../engine/ast/JavaDocCommentTest.java | 15 +- ...cServiceClientWithNestedClassImport.golden | 2 +- .../gapic/composer/ComposerTest.java | 3 + .../GrpcServiceStubClassComposerTest.java | 10 ++ .../grpc/ServiceClientClassComposerTest.java | 26 +++- .../grpc/goldens/BookshopClient.golden | 6 +- .../goldens/DeprecatedServiceClient.golden | 4 +- .../grpc/goldens/IdentityClient.golden | 24 +-- .../grpc/goldens/MessagingClient.golden | 60 +++---- .../grpcrest/goldens/EchoClient.golden | 42 ++--- .../grpcrest/goldens/WickedClient.golden | 2 +- ...ServiceClientHeaderSampleComposerTest.java | 134 ++++++++++++++++ .../gapic/protoparser/ParserTest.java | 74 +++++++-- .../test/protoloader/TestProtoLoader.java | 44 ++++++ .../test/proto/selective_api_generation.proto | 52 +++++-- .../selective_api_generation_v1beta1.yaml | 7 +- .../v1/ConnectionServiceClient.java | 6 +- .../data/v2/BaseBigtableDataClient.java | 40 ++--- .../compute/v1small/AddressesClient.java | 16 +- .../v1small/RegionOperationsClient.java | 8 +- .../credentials/v1/IamCredentialsClient.java | 24 +-- .../com/google/iam/v1/IAMPolicyClient.java | 6 +- .../kms/v1/KeyManagementServiceClient.java | 138 ++++++++--------- .../library/v1/LibraryServiceClient.java | 66 ++++---- .../google/cloud/logging/v2/ConfigClient.java | 138 ++++++++--------- .../cloud/logging/v2/LoggingClient.java | 30 ++-- .../cloud/logging/v2/MetricsClient.java | 30 ++-- .../cloud/pubsub/v1/SchemaServiceClient.java | 62 ++++---- .../pubsub/v1/SubscriptionAdminClient.java | 96 ++++++------ .../cloud/pubsub/v1/TopicAdminClient.java | 52 +++---- .../cloud/redis/v1beta1/CloudRedisClient.java | 60 +++---- .../com/google/storage/v2/StorageClient.java | 146 +++++++++--------- 43 files changed, 1121 insertions(+), 671 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java index 1f2b980f3f..a694ca3ce1 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java @@ -51,6 +51,7 @@ public abstract static class Builder { String throwsType = null; String throwsDescription = null; String deprecated = null; + String internalOnly = null; String returnDescription = null; List paramsList = new ArrayList<>(); List componentsList = new ArrayList<>(); @@ -70,6 +71,11 @@ public Builder setDeprecated(String deprecatedText) { return this; } + public Builder setInternalOnly(String internalOnlyText) { + internalOnly = internalOnlyText; + return this; + } + public Builder setReturn(String returnText) { returnDescription = returnText; return this; @@ -135,6 +141,7 @@ public boolean emptyComments() { return Strings.isNullOrEmpty(throwsType) && Strings.isNullOrEmpty(throwsDescription) && Strings.isNullOrEmpty(deprecated) + && Strings.isNullOrEmpty(internalOnly) && Strings.isNullOrEmpty(returnDescription) && paramsList.isEmpty() && componentsList.isEmpty(); @@ -150,6 +157,9 @@ public JavaDocComment build() { if (!Strings.isNullOrEmpty(deprecated)) { componentsList.add(String.format("@deprecated %s", deprecated)); } + if (!Strings.isNullOrEmpty(internalOnly)) { + componentsList.add(String.format("@InternalApi %s", internalOnly)); + } if (!Strings.isNullOrEmpty(returnDescription)) { componentsList.add(String.format("@return %s", returnDescription)); } diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java index 3731961171..8d93b2f9a3 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java @@ -49,6 +49,9 @@ public class CommentComposer { static final String DEPRECATED_METHOD_STRING = "This method is deprecated and will be removed in the next major version update."; + static final String INTERNAL_ONLY_METHOD_STRING = + "This method is internal used only. Please do not use directly."; + public static final CommentStatement APACHE_LICENSE_COMMENT = CommentStatement.withComment(BlockComment.withComment(APACHE_LICENSE_STRING)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java index 47d819378f..080a3d0fbf 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java @@ -22,6 +22,7 @@ import com.google.api.generator.gapic.composer.utils.ClassNames; import com.google.api.generator.gapic.composer.utils.CommentFormatter; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.Service; import com.google.api.generator.gapic.utils.JavaStyle; @@ -37,7 +38,7 @@ public class ServiceClientCommentComposer { // Tokens. private static final String EMPTY_STRING = ""; private static final String API_EXCEPTION_TYPE_NAME = "com.google.api.gax.rpc.ApiException"; - private static final String EXCEPTION_CONDITION = "if the remote call fails"; + private static final String EXCEPTION_CONDITION = "if the remote call fails."; // Constants. private static final String SERVICE_DESCRIPTION_INTRO_STRING = @@ -202,6 +203,10 @@ public static List createRpcMethodHeaderComment( methodJavadocBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING); } + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + methodJavadocBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING); + } + List comments = new ArrayList<>(); comments.add(CommentComposer.AUTO_GENERATED_METHOD_COMMENT); if (!methodJavadocBuilder.emptyComments()) { @@ -345,6 +350,10 @@ public static List createRpcCallableMethodHeaderComment( methodJavadocBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING); } + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + methodJavadocBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING); + } + return Arrays.asList( CommentComposer.AUTO_GENERATED_METHOD_COMMENT, CommentStatement.withComment(methodJavadocBuilder.build())); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java index eb906f2145..271e6f8a65 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java @@ -120,11 +120,11 @@ public CommentStatement getTransportProviderBuilderMethodComment() { } public static CommentStatement createCallSettingsGetterComment( - String javaMethodName, boolean isMethodDeprecated) { - String methodComment = String.format(CALL_SETTINGS_METHOD_DOC_PATTERN, javaMethodName); - return isMethodDeprecated - ? toDeprecatedSimpleComment(methodComment) - : toSimpleComment(methodComment); + String javaMethodName, boolean isMethodDeprecated, boolean isMethodInternal) { + return toDeprecatedInternalSimpleComment( + String.format(CALL_SETTINGS_METHOD_DOC_PATTERN, javaMethodName), + isMethodDeprecated, + isMethodInternal); } public static CommentStatement createBuilderClassComment(String outerClassName) { @@ -132,10 +132,10 @@ public static CommentStatement createBuilderClassComment(String outerClassName) } public static CommentStatement createCallSettingsBuilderGetterComment( - String javaMethodName, boolean isMethodDeprecated) { + String javaMethodName, boolean isMethodDeprecated, boolean isMethodInternal) { String methodComment = String.format(CALL_SETTINGS_BUILDER_METHOD_DOC_PATTERN, javaMethodName); - return isMethodDeprecated - ? toDeprecatedSimpleComment(methodComment) + return isMethodDeprecated || isMethodInternal + ? toDeprecatedInternalSimpleComment(methodComment, isMethodDeprecated, isMethodInternal) : toSimpleComment(methodComment); } @@ -205,11 +205,17 @@ private static CommentStatement toSimpleComment(String comment) { return CommentStatement.withComment(JavaDocComment.withComment(comment)); } - private static CommentStatement toDeprecatedSimpleComment(String comment) { - return CommentStatement.withComment( - JavaDocComment.builder() - .addComment(comment) - .setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING) - .build()); + private static CommentStatement toDeprecatedInternalSimpleComment( + String comment, boolean isDeprecated, boolean isInternal) { + JavaDocComment.Builder docBuilder = JavaDocComment.builder().addComment(comment); + docBuilder = + isDeprecated + ? docBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING) + : docBuilder; + docBuilder = + isInternal + ? docBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING) + : docBuilder; + return CommentStatement.withComment(docBuilder.build()); } } diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index e8bd6fe081..170b2e7948 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -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.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; @@ -70,6 +71,7 @@ import com.google.api.generator.gapic.model.LongrunningOperation; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Method.Stream; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.ResourceName; @@ -107,6 +109,8 @@ public abstract class AbstractServiceClientClassComposer implements ClassCompose private static final String CALLABLE_NAME_PATTERN = "%sCallable"; private static final String PAGED_CALLABLE_NAME_PATTERN = "%sPagedCallable"; private static final String OPERATION_CALLABLE_NAME_PATTERN = "%sOperationCallable"; + private static final String INTERNAL_API_WARNING = + "Internal API. This API is not intended for public consumption."; private static final Reference LIST_REFERENCE = ConcreteReference.withClazz(List.class); private static final Reference MAP_REFERENCE = ConcreteReference.withClazz(Map.class); @@ -136,7 +140,6 @@ public GapicClass generate(GapicContext context, Service service) { GapicClass.Kind kind = Kind.MAIN; String pakkage = service.pakkage(); boolean hasLroClient = service.hasStandardLroMethods(); - List samples = new ArrayList<>(); Map> grpcRpcsToJavaMethodNames = new HashMap<>(); Map> methodVariantsForClientHeader = new HashMap<>(); @@ -802,11 +805,18 @@ private static List createMethodVariants( methodVariantBuilder.setReturnType(methodOutputType).setReturnExpr(rpcInvocationExpr); } + List annotations = new ArrayList<>(); if (method.isDeprecated()) { - methodVariantBuilder = - methodVariantBuilder.setAnnotations( - Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED))); + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + annotations.add( + AnnotationNode.withTypeAndDescription( + typeStore.get("InternalApi"), INTERNAL_API_WARNING)); } + + methodVariantBuilder = methodVariantBuilder.setAnnotations(annotations); methodVariantBuilder = methodVariantBuilder.setBody(statements); javaMethods.add(methodVariantBuilder.build()); } @@ -889,6 +899,12 @@ private static MethodDefinition createMethodDefaultMethod( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + annotations.add( + AnnotationNode.withTypeAndDescription( + typeStore.get("InternalApi"), INTERNAL_API_WARNING)); + } + if (isProtoEmptyType(methodOutputType)) { methodBuilder = methodBuilder @@ -1039,11 +1055,17 @@ private static MethodDefinition createCallableMethod( } MethodDefinition.Builder methodDefBuilder = MethodDefinition.builder(); + List annotations = new ArrayList<>(); if (method.isDeprecated()) { - methodDefBuilder = - methodDefBuilder.setAnnotations( - Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED))); + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + annotations.add( + AnnotationNode.withTypeAndDescription( + typeStore.get("InternalApi"), INTERNAL_API_WARNING)); + } + + methodDefBuilder = methodDefBuilder.setAnnotations(annotations); return methodDefBuilder .setHeaderCommentStatements( @@ -1774,6 +1796,7 @@ private static TypeStore createTypes(Service service, Map messa ApiFutures.class, BackgroundResource.class, BetaApi.class, + InternalApi.class, BidiStreamingCallable.class, ClientStreamingCallable.class, Generated.class, diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index c9b77fc22d..9321ba8090 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -16,6 +16,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; @@ -60,6 +61,7 @@ import com.google.api.generator.gapic.model.GapicClass.Kind; import com.google.api.generator.gapic.model.GapicContext; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Method.Stream; import com.google.api.generator.gapic.model.Sample; import com.google.api.generator.gapic.model.Service; @@ -85,6 +87,8 @@ public abstract class AbstractServiceSettingsClassComposer implements ClassCompo private static final String OPERATION_SETTINGS_LITERAL = "OperationSettings"; private static final String SETTINGS_LITERAL = "Settings"; + private static final String INTERNAL_API_WARNING = + "Internal API. This API is not intended for public consumption."; protected static final TypeStore FIXED_TYPESTORE = createStaticTypes(); private final TransportContext transportContext; @@ -133,16 +137,21 @@ public GapicClass generate(GapicContext context, Service service) { private static List createClassHeaderComments( Service service, TypeNode classType, List samples) { - // Pick the first pure unary rpc method, if no such method exists, then pick the first in the + // Pick the first public pure unary rpc method, if no such method exists, then pick the first + // public in the // list. + List publicMethods = + service.methods().stream() + .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) + .collect(Collectors.toList()); Optional methodOpt = - service.methods().isEmpty() + publicMethods.isEmpty() ? Optional.empty() : Optional.of( - service.methods().stream() + publicMethods.stream() .filter(m -> m.stream() == Stream.NONE && !m.hasLro() && !m.isPaged()) .findFirst() - .orElse(service.methods().get(0))); + .orElse(publicMethods.get(0))); Optional methodNameOpt = methodOpt.isPresent() ? Optional.of(methodOpt.get().name()) : Optional.empty(); Optional sampleCode = @@ -156,9 +165,9 @@ private static List createClassHeaderComments( // Create a sample for a LRO method using LRO-specific RetrySettings, if one exists in the // service. Optional lroMethodOpt = - service.methods().isEmpty() + publicMethods.isEmpty() ? Optional.empty() - : service.methods().stream() + : publicMethods.stream() .filter(m -> m.stream() == Stream.NONE && m.hasLro()) .findFirst(); Optional lroMethodNameOpt = @@ -270,40 +279,44 @@ private static List createSettingsGetterMethods( List javaMethods = new ArrayList<>(); for (Method protoMethod : service.methods()) { String javaStyleName = JavaStyle.toLowerCamelCase(protoMethod.name()); - String javaMethodName = - String.format("%sSettings", JavaStyle.toLowerCamelCase(protoMethod.name())); + String javaMethodName = String.format("%sSettings", javaStyleName); MethodDefinition.Builder methodBuilder = methodMakerFn.apply(getCallSettingsType(protoMethod, typeStore), javaMethodName); - javaMethods.add( - methodBuilder - .setHeaderCommentStatements( - SettingsCommentComposer.createCallSettingsGetterComment( - getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated())) - .setAnnotations( - protoMethod.isDeprecated() - ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) - : Collections.emptyList()) - .build()); + javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaMethodName)); if (protoMethod.hasLro()) { javaMethodName = String.format("%sOperationSettings", javaStyleName); methodBuilder = methodMakerFn.apply(getOperationCallSettingsType(protoMethod), javaMethodName); - javaMethods.add( - methodBuilder - .setHeaderCommentStatements( - SettingsCommentComposer.createCallSettingsGetterComment( - getMethodNameFromSettingsVarName(javaMethodName), - protoMethod.isDeprecated())) - .setAnnotations( - protoMethod.isDeprecated() - ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) - : Collections.emptyList()) - .build()); + javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaMethodName)); } } return javaMethods; } + // Add method header comment statements and annotations. + private static MethodDefinition methodBuilderHelper( + Method protoMethod, MethodDefinition.Builder methodBuilder, String javaMethodName) { + List annotations = new ArrayList<>(); + if (protoMethod.isDeprecated()) { + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + + if (protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + annotations.add( + AnnotationNode.withTypeAndDescription( + FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); + } + + return methodBuilder + .setHeaderCommentStatements( + SettingsCommentComposer.createCallSettingsGetterComment( + getMethodNameFromSettingsVarName(javaMethodName), + protoMethod.isDeprecated(), + protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL)) + .setAnnotations(annotations) + .build(); + } + private static MethodDefinition createCreatorMethod(Service service, TypeStore typeStore) { TypeNode stubClassType = typeStore.get(ClassNames.getServiceStubSettingsClassName(service)); VariableExpr stubVarExpr = @@ -771,7 +784,9 @@ private static List createNestedBuilderSettingsGetterMethods( methodBuilder .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsBuilderGetterComment( - getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated())) + getMethodNameFromSettingsVarName(javaMethodName), + protoMethod.isDeprecated(), + protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL)) .setAnnotations( protoMethod.isDeprecated() ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) @@ -787,7 +802,8 @@ private static List createNestedBuilderSettingsGetterMethods( .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsBuilderGetterComment( getMethodNameFromSettingsVarName(javaMethodName), - protoMethod.isDeprecated())) + protoMethod.isDeprecated(), + protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL)) .setAnnotations( protoMethod.isDeprecated() ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) @@ -822,6 +838,7 @@ private static TypeStore createStaticTypes() { ApiClientHeaderProvider.class, ApiFunction.class, BetaApi.class, + InternalApi.class, ClientContext.class, ClientSettings.class, Generated.class, diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java index cb06d34303..43d9f5817d 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java @@ -15,6 +15,7 @@ package com.google.api.generator.gapic.composer.common; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientStreamingCallable; @@ -40,6 +41,7 @@ import com.google.api.generator.gapic.model.GapicContext; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Service; import com.google.api.generator.gapic.utils.JavaStyle; import com.google.common.collect.ImmutableList; @@ -55,6 +57,8 @@ public abstract class AbstractServiceStubClassComposer implements ClassComposer { private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; + private static final String INTERNAL_API_WARNING = + "Internal API. This API is not intended for public consumption."; private final TransportContext transportContext; @@ -195,10 +199,15 @@ private MethodDefinition createCallableGetterHelper( genericRefs.add(method.outputType().reference()); } - List annotations = - method.isDeprecated() - ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) - : Collections.emptyList(); + List annotations = new ArrayList<>(); + if (method.isDeprecated()) { + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + annotations.add( + AnnotationNode.withTypeAndDescription( + typeStore.get("InternalApi"), INTERNAL_API_WARNING)); + } returnType = TypeNode.withReference(returnType.reference().copyAndSetGenerics(genericRefs)); @@ -256,6 +265,7 @@ private static TypeStore createTypes(Service service, Map messa Arrays.asList( BackgroundResource.class, BetaApi.class, + InternalApi.class, BidiStreamingCallable.class, ClientStreamingCallable.class, Generated.class, diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 500d330d30..8a83472705 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.core.ObsoleteApi; import com.google.api.gax.batching.BatchingSettings; import com.google.api.gax.batching.FlowControlSettings; @@ -91,6 +92,7 @@ import com.google.api.generator.gapic.model.GapicServiceConfig; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Method.Stream; import com.google.api.generator.gapic.model.Sample; import com.google.api.generator.gapic.model.Service; @@ -140,6 +142,8 @@ public abstract class AbstractServiceStubSettingsClassComposer implements ClassC private static final String SETTINGS_LITERAL = "Settings"; private static final String DOT = "."; + private static final String INTERNAL_API_WARNING = + "Internal API. This API is not intended for public consumption."; protected static final TypeStore FIXED_TYPESTORE = createStaticTypes(); @@ -173,13 +177,15 @@ public GapicClass generate(GapicContext context, Service service) { List samples = new ArrayList<>(); Set deprecatedSettingVarNames = new HashSet<>(); + Set internalSettingVarNames = new HashSet<>(); Map methodSettingsMemberVarExprs = createMethodSettingsClassMemberVarExprs( service, serviceConfig, typeStore, /* isNestedClass= */ false, - deprecatedSettingVarNames); + deprecatedSettingVarNames, + internalSettingVarNames); String className = ClassNames.getServiceStubSettingsClassName(service); List classHeaderComments = createClassHeaderComments(service, typeStore.get(className), samples); @@ -196,7 +202,11 @@ public GapicClass generate(GapicContext context, Service service) { service, serviceConfig, methodSettingsMemberVarExprs, messageTypes, typeStore)) .setMethods( createClassMethods( - service, methodSettingsMemberVarExprs, deprecatedSettingVarNames, typeStore)) + service, + methodSettingsMemberVarExprs, + deprecatedSettingVarNames, + internalSettingVarNames, + typeStore)) .setNestedClasses( Arrays.asList(createNestedBuilderClass(service, serviceConfig, typeStore))) .build(); @@ -410,16 +420,21 @@ private List createClassAnnotations(Service service) { private static List createClassHeaderComments( Service service, TypeNode classType, List samples) { - // Pick the first pure unary rpc method, if no such method exists, then pick the first in the + // Pick the first public pure unary rpc method, if no such method exists, then pick the first + // public in the // list. + List publicMethods = + service.methods().stream() + .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) + .collect(Collectors.toList()); Optional methodOpt = - service.methods().isEmpty() + publicMethods.isEmpty() ? Optional.empty() : Optional.of( - service.methods().stream() + publicMethods.stream() .filter(m -> m.stream() == Stream.NONE && !m.hasLro() && !m.isPaged()) .findFirst() - .orElse(service.methods().get(0))); + .orElse(publicMethods.get(0))); Optional methodNameOpt = methodOpt.map(Method::name); Optional sampleCode = @@ -433,9 +448,9 @@ private static List createClassHeaderComments( // Create a sample for a LRO method using LRO-specific RetrySettings, if one exists in the // service. Optional lroMethodOpt = - service.methods().isEmpty() + publicMethods.isEmpty() ? Optional.empty() - : service.methods().stream() + : publicMethods.stream() .filter(m -> m.stream() == Stream.NONE && m.hasLro()) .findFirst(); Optional lroMethodNameOpt = @@ -475,7 +490,8 @@ private static Map createMethodSettingsClassMemberVarExprs GapicServiceConfig serviceConfig, TypeStore typeStore, boolean isNestedClass, - Set deprecatedSettingVarNames) { + Set deprecatedSettingVarNames, + Set internalSettingVarNames) { // Maintain insertion order. Map varExprs = new LinkedHashMap<>(); @@ -489,6 +505,9 @@ private static Map createMethodSettingsClassMemberVarExprs if (method.isDeprecated()) { deprecatedSettingVarNames.add(varName); } + if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + internalSettingVarNames.add(varName); + } varExprs.put( varName, VariableExpr.withVariable( @@ -981,10 +1000,12 @@ private List createClassMethods( Service service, Map methodSettingsMemberVarExprs, Set deprecatedSettingVarNames, + Set internalSettingVarNames, TypeStore typeStore) { List javaMethods = new ArrayList<>(); javaMethods.addAll( - createMethodSettingsGetterMethods(methodSettingsMemberVarExprs, deprecatedSettingVarNames)); + createMethodSettingsGetterMethods( + methodSettingsMemberVarExprs, deprecatedSettingVarNames, internalSettingVarNames)); javaMethods.add(createCreateStubMethod(service, typeStore)); javaMethods.addAll(createDefaultHelperAndGetterMethods(service, typeStore)); javaMethods.addAll( @@ -1001,18 +1022,26 @@ private List createClassMethods( private static List createMethodSettingsGetterMethods( Map methodSettingsMemberVarExprs, - final Set deprecatedSettingVarNames) { + final Set deprecatedSettingVarNames, + final Set internalSettingVarNames) { Function, MethodDefinition> varToMethodFn = e -> { boolean isDeprecated = deprecatedSettingVarNames.contains(e.getKey()); + boolean isInternal = internalSettingVarNames.contains(e.getKey()); + List annotations = new ArrayList<>(); + if (isDeprecated) { + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + if (isInternal) { + annotations.add( + AnnotationNode.withTypeAndDescription( + FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); + } return MethodDefinition.builder() .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsGetterComment( - getMethodNameFromSettingsVarName(e.getKey()), isDeprecated)) - .setAnnotations( - isDeprecated - ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) - : Collections.emptyList()) + getMethodNameFromSettingsVarName(e.getKey()), isDeprecated, isInternal)) + .setAnnotations(annotations) .setScope(ScopeNode.PUBLIC) .setReturnType(e.getValue().type()) .setName(e.getKey()) @@ -1351,13 +1380,15 @@ private ClassDefinition createNestedBuilderClass( .build()); Set nestedDeprecatedSettingVarNames = new HashSet<>(); + Set nestedInternalSettingVarNames = new HashSet<>(); Map nestedMethodSettingsMemberVarExprs = createMethodSettingsClassMemberVarExprs( service, serviceConfig, typeStore, /* isNestedClass= */ true, - nestedDeprecatedSettingVarNames); + nestedDeprecatedSettingVarNames, + nestedInternalSettingVarNames); // TODO(miraleung): Fill this out. return ClassDefinition.builder() @@ -1378,6 +1409,7 @@ private ClassDefinition createNestedBuilderClass( extendsType, nestedMethodSettingsMemberVarExprs, nestedDeprecatedSettingVarNames, + nestedInternalSettingVarNames, typeStore)) .build(); } @@ -1438,6 +1470,7 @@ private List createNestedClassMethods( TypeNode superType, Map nestedMethodSettingsMemberVarExprs, Set nestedDeprecatedSettingVarNames, + Set nestedInternalSettingVarNames, TypeStore typeStore) { List nestedClassMethods = new ArrayList<>(); nestedClassMethods.addAll( @@ -1449,7 +1482,9 @@ private List createNestedClassMethods( nestedClassMethods.add(createNestedClassUnaryMethodSettingsBuilderGetterMethod()); nestedClassMethods.addAll( createNestedClassSettingsBuilderGetterMethods( - nestedMethodSettingsMemberVarExprs, nestedDeprecatedSettingVarNames)); + nestedMethodSettingsMemberVarExprs, + nestedDeprecatedSettingVarNames, + nestedInternalSettingVarNames)); nestedClassMethods.add(createNestedClassBuildMethod(service, typeStore)); return nestedClassMethods; } @@ -1967,7 +2002,8 @@ private static MethodDefinition createNestedClassUnaryMethodSettingsBuilderGette private static List createNestedClassSettingsBuilderGetterMethods( Map nestedMethodSettingsMemberVarExprs, - Set nestedDeprecatedSettingVarNames) { + Set nestedDeprecatedSettingVarNames, + Set nestedInternalSettingVarNames) { Reference operationCallSettingsBuilderRef = ConcreteReference.withClazz(OperationCallSettings.Builder.class); Function isOperationCallSettingsBuilderFn = @@ -1976,6 +2012,9 @@ private static List createNestedClassSettingsBuilderGetterMeth .copyAndSetGenerics(ImmutableList.of()) .equals(operationCallSettingsBuilderRef); AnnotationNode deprecatedAnnotation = AnnotationNode.withType(TypeNode.DEPRECATED); + AnnotationNode internalAnnotation = + AnnotationNode.withTypeAndDescription( + FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING); List javaMethods = new ArrayList<>(); for (Map.Entry settingsVarEntry : @@ -1989,11 +2028,16 @@ private static List createNestedClassSettingsBuilderGetterMeth annotations.add(deprecatedAnnotation); } + boolean isInternal = nestedInternalSettingVarNames.contains(varName); + if (isInternal) { + annotations.add(internalAnnotation); + } + javaMethods.add( MethodDefinition.builder() .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsBuilderGetterComment( - getMethodNameFromSettingsVarName(varName), isDeprecated)) + getMethodNameFromSettingsVarName(varName), isDeprecated, isInternal)) .setAnnotations(annotations) .setScope(ScopeNode.PUBLIC) .setReturnType(settingsVarExpr.type()) @@ -2035,6 +2079,7 @@ private static TypeStore createStaticTypes() { BatchingDescriptor.class, BatchingSettings.class, BetaApi.class, + InternalApi.class, ClientContext.class, Duration.class, Empty.class, diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java index 6181a2e9ae..de3f44484c 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java @@ -30,6 +30,7 @@ import com.google.api.generator.gapic.model.HttpBindings; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.RegionTag; import com.google.api.generator.gapic.model.ResourceName; @@ -52,13 +53,30 @@ public static Sample composeClassHeaderSample( TypeNode clientType, Map resourceNames, Map messageTypes) { - // Use the first pure unary RPC method's sample code as showcase, if no such method exists, use - // the first method in the service's methods list. - Method method = + // If all generated methods are INTERNAL, generate an empty service sample. + if (service.methods().stream() + .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) + .count() + == 0) { + return ServiceClientMethodSampleComposer.composeEmptyServiceSample(clientType, service); + } + // Use the first public pure unary RPC method's sample code as showcase, if no such method + // exists, use + // the first public method in the service's methods list. + List publicMethods = service.methods().stream() - .filter(m -> m.stream() == Method.Stream.NONE && !m.hasLro() && !m.isPaged()) + .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) + .collect(Collectors.toList()); + Method method = + publicMethods.stream() + .filter( + m -> + m.stream() == Method.Stream.NONE + && !m.hasLro() + && !m.isPaged() + && m.selectiveGapicType() != SelectiveGapicType.INTERNAL) .findFirst() - .orElse(service.methods().get(0)); + .orElse(publicMethods.get(0)); if (method.stream() == Method.Stream.NONE) { if (method.methodSignatures().isEmpty()) { diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java index f8f815cc08..d8ba4671c0 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java @@ -30,6 +30,12 @@ public enum Stream { BIDI }; + public enum SelectiveGapicType { + PUBLIC, + HIDDEN, + INTERNAL + } + public abstract String name(); public abstract Stream stream(); @@ -38,6 +44,8 @@ public enum Stream { public abstract TypeNode outputType(); + public abstract SelectiveGapicType selectiveGapicType(); + public abstract boolean isBatching(); public boolean isPaged() { @@ -136,6 +144,7 @@ public static Builder builder() { .setStream(Stream.NONE) .setAutoPopulatedFields(new ArrayList<>()) .setMethodSignatures(ImmutableList.of()) + .setSelectiveGapicType(SelectiveGapicType.PUBLIC) .setIsBatching(false) .setIsDeprecated(false) .setOperationPollingMethod(false); @@ -162,6 +171,8 @@ public abstract static class Builder { public abstract Builder setOutputType(TypeNode outputType); + public abstract Builder setSelectiveGapicType(SelectiveGapicType gapicType); + public abstract Builder setStream(Stream stream); public abstract Builder setLro(LongrunningOperation lro); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index 2e17b9026b..ed82a4fda0 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -25,6 +25,7 @@ import com.google.api.MethodSettings; import com.google.api.ResourceDescriptor; import com.google.api.ResourceProto; +import com.google.api.SelectiveGapicGeneration; import com.google.api.generator.engine.ast.TypeNode; import com.google.api.generator.engine.ast.VaporReference; import com.google.api.generator.gapic.model.Field; @@ -37,6 +38,7 @@ import com.google.api.generator.gapic.model.LongrunningOperation; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.OperationResponse; import com.google.api.generator.gapic.model.ResourceName; import com.google.api.generator.gapic.model.ResourceReference; @@ -427,14 +429,14 @@ public static List parseService( Transport.GRPC); } - static boolean shouldIncludeMethodInGeneration( + static SelectiveGapicType getMethodSelectiveGapicType( MethodDescriptor method, Optional serviceYamlProtoOpt, String protoPackage) { // default to include all when no service yaml or no library setting section. if (!serviceYamlProtoOpt.isPresent() || serviceYamlProtoOpt.get().getPublishing().getLibrarySettingsCount() == 0) { - return true; + return SelectiveGapicType.PUBLIC; } List librarySettingsList = serviceYamlProtoOpt.get().getPublishing().getLibrarySettingsList(); @@ -451,45 +453,48 @@ static boolean shouldIncludeMethodInGeneration( + "Disregarding selective generation settings.", librarySettingsList.get(0).getVersion(), protoPackage)); } - return true; + return SelectiveGapicType.PUBLIC; } // librarySettingsList is technically a list, but is processed upstream and // only leave with 1 element. Otherwise, it is a misconfiguration and // should be caught upstream. - List includeMethodsList = - librarySettingsList - .get(0) - .getJavaSettings() - .getCommon() - .getSelectiveGapicGeneration() - .getMethodsList(); - // default to include all when nothing specified, this could be no java section - // specified in library setting, or the method list is empty - if (includeMethodsList.isEmpty()) { - return true; - } + SelectiveGapicGeneration selectiveGapicGenerationConfig = + librarySettingsList.get(0).getJavaSettings().getCommon().getSelectiveGapicGeneration(); + + List includeMethodsList = selectiveGapicGenerationConfig.getMethodsList(); + + Boolean generateOmittedAsInternal = + selectiveGapicGenerationConfig.getGenerateOmittedAsInternal(); - return includeMethodsList.contains(method.getFullName()); + // Set method to PUBLIC if no SelectiveGapicGeneration Configuration is configured or the method + // is in the allow list. + // Otherwise, generate this method as INTERNAL or HIDDEN based on GenerateOmittedAsInternal + // flag. + if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false + || includeMethodsList.contains(method.getFullName())) return SelectiveGapicType.PUBLIC; + else return generateOmittedAsInternal ? SelectiveGapicType.INTERNAL : SelectiveGapicType.HIDDEN; } + // A service is considered empty if it contains no methods, or only methods marked as HIDDEN. private static boolean isEmptyService( ServiceDescriptor serviceDescriptor, Optional serviceYamlProtoOpt, String protoPackage) { List methodsList = serviceDescriptor.getMethods(); - List methodListSelected = + List methodListNotHidden = methodsList.stream() .filter( method -> - shouldIncludeMethodInGeneration(method, serviceYamlProtoOpt, protoPackage)) + getMethodSelectiveGapicType(method, serviceYamlProtoOpt, protoPackage) + != SelectiveGapicType.HIDDEN) .collect(Collectors.toList()); - if (methodListSelected.isEmpty()) { + if (methodListNotHidden.isEmpty()) { LOGGER.log( Level.WARNING, - "Service {0} has no RPC methods and will not be generated", + "Service {0} has no public or internal RPC methods and will not be generated", serviceDescriptor.getName()); } - return methodListSelected.isEmpty(); + return methodListNotHidden.isEmpty(); } public static List parseService( @@ -785,7 +790,10 @@ static List parseMethods( Map> autoPopulatedMethodsWithFields = parseAutoPopulatedMethodsAndFields(serviceYamlProtoOpt); for (MethodDescriptor protoMethod : serviceDescriptor.getMethods()) { - if (!shouldIncludeMethodInGeneration(protoMethod, serviceYamlProtoOpt, protoPackage)) { + SelectiveGapicType methodSelectiveGapicType = + getMethodSelectiveGapicType(protoMethod, serviceYamlProtoOpt, protoPackage); + // Skip generation for methods marked as HIDDEN + if (methodSelectiveGapicType == SelectiveGapicType.HIDDEN) { continue; } // Parse the method. @@ -838,6 +846,7 @@ static List parseMethods( .setName(protoMethod.getName()) .setInputType(inputType) .setOutputType(TypeParser.parseType(protoMethod.getOutputType())) + .setSelectiveGapicType(methodSelectiveGapicType) .setStream( Method.toStream(protoMethod.isClientStreaming(), protoMethod.isServerStreaming())) .setLro(parseLro(servicePackage, protoMethod, messageTypes)) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java index 2d39575e81..6abd769cef 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java @@ -188,8 +188,9 @@ void createJavaDocComment_multipleParamsAndReturn() { } @Test - void createJavaDocComment_throwsAndDeprecatedAndReturn() { - // No matter how many times or order `setThrows`, `setDeprecated`, `setReturn` are called, + void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { + // No matter how many times or order `setThrows`, `setDeprecated`, `setInternalOnly`, + // `setReturn` are called, // only one @throws, @deprecated, and @return will be printed. String throwsType = "com.google.api.gax.rpc.ApiException"; String throwsDescription = "if the remote call fails."; @@ -199,6 +200,8 @@ void createJavaDocComment_throwsAndDeprecatedAndReturn() { String deprecatedText = "Use the {@link ArchivedBookName} class instead."; String deprecatedText_print = "Use the {@link ShelfBookName} class instead."; + String internalOnlyText = "This method is internal used only. Please do not use directly."; + String returnText = "This is the incorrect method return text."; String returnText_print = "This is the correct method return text."; @@ -207,6 +210,7 @@ void createJavaDocComment_throwsAndDeprecatedAndReturn() { .setThrows(throwsType, throwsDescription) .setDeprecated(deprecatedText) .setReturn(returnText) + .setInternalOnly(internalOnlyText) .setThrows(throwsType_print, throwsDescription_print) .setDeprecated(deprecatedText_print) .setReturn(returnText_print) @@ -215,6 +219,7 @@ void createJavaDocComment_throwsAndDeprecatedAndReturn() { LineFormatter.lines( "@throws java.lang.RuntimeException if the remote call fails.\n", "@deprecated Use the {@link ShelfBookName} class instead.\n", + "@InternalApi This method is internal used only. Please do not use directly.\n", "@return This is the correct method return text."); assertEquals(expected, javaDocComment.comment()); } @@ -223,10 +228,12 @@ void createJavaDocComment_throwsAndDeprecatedAndReturn() { void createJavaDocComment_allComponents() { // No matter what order `setThrows`, `setDeprecated`, and `setReturn` are called, // They will be printed at the end. And `@param` should be grouped, - // they should always be printed right before `@throws`, `@deprecated`, and `@return`. + // they should always be printed right before `@throws`, `@deprecated`, `@InternalApi` and + // `@return`. // All other add methods should keep the order of how they are added. String content = "this is a test comment"; String deprecatedText = "Use the {@link ArchivedBookName} class instead."; + String internalOnlyText = "This method is internal used only. Please do not use directly."; String returnText = "This is the method return text."; String paramName1 = "shelfName"; String paramDescription1 = "The name of the shelf where books are published to."; @@ -253,6 +260,7 @@ void createJavaDocComment_allComponents() { .addParagraph(paragraph2) .addOrderedList(orderedList) .addParam(paramName2, paramDescription2) + .setInternalOnly(internalOnlyText) .build(); String expected = LineFormatter.lines( @@ -270,6 +278,7 @@ void createJavaDocComment_allComponents() { "@param shelf The shelf to create.\n", "@throws com.google.api.gax.rpc.ApiException if the remote call fails.\n", "@deprecated Use the {@link ArchivedBookName} class instead.\n", + "@InternalApi This method is internal used only. Please do not use directly.\n", "@return This is the method return text."); assertEquals(expected, javaDocComment.comment()); } diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden b/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden index 9a8f46553d..6fada1af81 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden @@ -163,7 +163,7 @@ public class NestedMessageServiceClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Outer.Middle.Inner nestedMessageMethod(Outer.Middle request) { return nestedMessageMethodCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java index ad370307c1..76b0478d61 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java @@ -42,7 +42,10 @@ class ComposerTest { private final GapicContext context = GrpcTestProtoLoader.instance().parseShowcaseEcho(); + private final GapicContext selectiveGapicContext = + GrpcTestProtoLoader.instance().parseSelectiveGenerationTesting(); private final Service echoProtoService = context.services().get(0); + private final Service selctiveGapicService = selectiveGapicContext.services().get(1); private final List clazzes = Arrays.asList( GrpcServiceCallableFactoryClassComposer.instance() diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java index 5c910cd618..dc82ca0e8a 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java @@ -93,6 +93,16 @@ void generateGrpcServiceStubClass_autopopulateField() { Assert.assertEmptySamples(clazz.samples()); } + @Test + void generateGrpcServiceStubClass_selectiveGeneration() { + GapicContext context = GrpcTestProtoLoader.instance().parseSelectiveGenerationTesting(); + Service service = context.services().get(1); + GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, service); + + Assert.assertGoldenClass(this.getClass(), clazz, "SelectiveGapicStub.golden"); + Assert.assertEmptySamples(clazz.samples()); + } + @Test void generateGrpcServiceStubClass_callableNameType() { GapicContext context = GrpcTestProtoLoader.instance().parseCallabeNameType(); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceClientClassComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceClientClassComposerTest.java index 7df2fc017c..2654eb6015 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceClientClassComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceClientClassComposerTest.java @@ -33,27 +33,38 @@ private static Stream data() { "EchoClient", GrpcTestProtoLoader.instance().parseShowcaseEcho(), "localhost:7469", - "v1beta1"), + "v1beta1", + 0), Arguments.of( "DeprecatedServiceClient", GrpcTestProtoLoader.instance().parseDeprecatedService(), "localhost:7469", - "v1"), + "v1", + 0), Arguments.of( "IdentityClient", GrpcTestProtoLoader.instance().parseShowcaseIdentity(), "localhost:7469", - "v1beta1"), + "v1beta1", + 0), Arguments.of( "BookshopClient", GrpcTestProtoLoader.instance().parseBookshopService(), "localhost:2665", - "v1beta1"), + "v1beta1", + 0), Arguments.of( "MessagingClient", GrpcTestProtoLoader.instance().parseShowcaseMessaging(), "localhost:7469", - "v1beta1")); + "v1beta1", + 0), + Arguments.of( + "EchoServiceSelectiveGapicClient", + GrpcTestProtoLoader.instance().parseSelectiveGenerationTesting(), + "localhost:7469", + "v1beta1", + 1)); } @ParameterizedTest @@ -62,8 +73,9 @@ void generateServiceClientClasses( String name, GapicContext context, String apiShortNameExpected, - String packageVersionExpected) { - Service service = context.services().get(0); + String packageVersionExpected, + int serviceIndex) { + Service service = context.services().get(serviceIndex); GapicClass clazz = ServiceClientClassComposer.instance().generate(context, service); Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden"); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden index 13e5485039..f104ea5b0b 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden @@ -166,7 +166,7 @@ public class BookshopClient implements BackgroundResource { * * @param booksCount * @param books - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(int booksCount, List books) { GetBookRequest request = @@ -193,7 +193,7 @@ public class BookshopClient implements BackgroundResource { * * @param booksList * @param books - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(String booksList, List books) { GetBookRequest request = @@ -223,7 +223,7 @@ public class BookshopClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(GetBookRequest request) { return getBookCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden index aec12869e4..0b0fbc2395 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden @@ -178,7 +178,7 @@ public class DeprecatedServiceClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void fastFibonacci(FibonacciRequest request) { fastFibonacciCallable().call(request); @@ -223,7 +223,7 @@ public class DeprecatedServiceClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. * @deprecated This method is deprecated and will be removed in the next major version update. */ @Deprecated diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden index efb41dc308..d5bd1961e7 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden @@ -245,7 +245,7 @@ public class IdentityClient implements BackgroundResource { * @param parent * @param displayName * @param email - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User createUser(String parent, String displayName, String email) { CreateUserRequest request = @@ -287,7 +287,7 @@ public class IdentityClient implements BackgroundResource { * @param nickname * @param enableNotifications * @param heightFeet - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User createUser( String parent, @@ -359,7 +359,7 @@ public class IdentityClient implements BackgroundResource { * @param title * @param subject * @param artistName - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User createUser( String parent, @@ -424,7 +424,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User createUser(CreateUserRequest request) { return createUserCallable().call(request); @@ -473,7 +473,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User getUser(UserName name) { GetUserRequest request = @@ -498,7 +498,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User getUser(String name) { GetUserRequest request = GetUserRequest.newBuilder().setName(name).build(); @@ -523,7 +523,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User getUser(GetUserRequest request) { return getUserCallable().call(request); @@ -570,7 +570,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final User updateUser(UpdateUserRequest request) { return updateUserCallable().call(request); @@ -616,7 +616,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteUser(UserName name) { DeleteUserRequest request = @@ -641,7 +641,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteUser(String name) { DeleteUserRequest request = DeleteUserRequest.newBuilder().setName(name).build(); @@ -666,7 +666,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteUser(DeleteUserRequest request) { deleteUserCallable().call(request); @@ -718,7 +718,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListUsersPagedResponse listUsers(ListUsersRequest request) { return listUsersPagedCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden index 359ba58624..945c1e8360 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden @@ -404,7 +404,7 @@ public class MessagingClient implements BackgroundResource { * * @param displayName * @param description - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Room createRoom(String displayName, String description) { CreateRoomRequest request = @@ -433,7 +433,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Room createRoom(CreateRoomRequest request) { return createRoomCallable().call(request); @@ -479,7 +479,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Room getRoom(RoomName name) { GetRoomRequest request = @@ -504,7 +504,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Room getRoom(String name) { GetRoomRequest request = GetRoomRequest.newBuilder().setName(name).build(); @@ -529,7 +529,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Room getRoom(GetRoomRequest request) { return getRoomCallable().call(request); @@ -576,7 +576,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Room updateRoom(UpdateRoomRequest request) { return updateRoomCallable().call(request); @@ -622,7 +622,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteRoom(RoomName name) { DeleteRoomRequest request = @@ -647,7 +647,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteRoom(String name) { DeleteRoomRequest request = DeleteRoomRequest.newBuilder().setName(name).build(); @@ -672,7 +672,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteRoom(DeleteRoomRequest request) { deleteRoomCallable().call(request); @@ -724,7 +724,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListRoomsPagedResponse listRooms(ListRoomsRequest request) { return listRoomsPagedCallable().call(request); @@ -812,7 +812,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param image - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(ProfileName parent, ByteString image) { CreateBlurbRequest request = @@ -842,7 +842,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param text - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(ProfileName parent, String text) { CreateBlurbRequest request = @@ -872,7 +872,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param image - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(RoomName parent, ByteString image) { CreateBlurbRequest request = @@ -902,7 +902,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param text - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(RoomName parent, String text) { CreateBlurbRequest request = @@ -932,7 +932,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param image - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(String parent, ByteString image) { CreateBlurbRequest request = @@ -962,7 +962,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param text - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(String parent, String text) { CreateBlurbRequest request = @@ -994,7 +994,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb createBlurb(CreateBlurbRequest request) { return createBlurbCallable().call(request); @@ -1043,7 +1043,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb getBlurb(BlurbName name) { GetBlurbRequest request = @@ -1069,7 +1069,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb getBlurb(String name) { GetBlurbRequest request = GetBlurbRequest.newBuilder().setName(name).build(); @@ -1096,7 +1096,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb getBlurb(GetBlurbRequest request) { return getBlurbCallable().call(request); @@ -1145,7 +1145,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Blurb updateBlurb(UpdateBlurbRequest request) { return updateBlurbCallable().call(request); @@ -1191,7 +1191,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBlurb(BlurbName name) { DeleteBlurbRequest request = @@ -1217,7 +1217,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBlurb(String name) { DeleteBlurbRequest request = DeleteBlurbRequest.newBuilder().setName(name).build(); @@ -1244,7 +1244,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBlurb(DeleteBlurbRequest request) { deleteBlurbCallable().call(request); @@ -1294,7 +1294,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBlurbsPagedResponse listBlurbs(ProfileName parent) { ListBlurbsRequest request = @@ -1321,7 +1321,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBlurbsPagedResponse listBlurbs(RoomName parent) { ListBlurbsRequest request = @@ -1348,7 +1348,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBlurbsPagedResponse listBlurbs(String parent) { ListBlurbsRequest request = ListBlurbsRequest.newBuilder().setParent(parent).build(); @@ -1379,7 +1379,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBlurbsPagedResponse listBlurbs(ListBlurbsRequest request) { return listBlurbsPagedCallable().call(request); @@ -1467,7 +1467,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param query - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture searchBlurbsAsync( String query) { @@ -1498,7 +1498,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture searchBlurbsAsync( SearchBlurbsRequest request) { diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden index bf68adf425..8340cf2dfd 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden @@ -370,7 +370,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo() { EchoRequest request = EchoRequest.newBuilder().build(); @@ -394,7 +394,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(ResourceName parent) { EchoRequest request = @@ -419,7 +419,7 @@ public class EchoClient implements BackgroundResource { * } * * @param error - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(Status error) { EchoRequest request = EchoRequest.newBuilder().setError(error).build(); @@ -443,7 +443,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(FoobarName name) { EchoRequest request = @@ -468,7 +468,7 @@ public class EchoClient implements BackgroundResource { * } * * @param content - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String content) { EchoRequest request = EchoRequest.newBuilder().setContent(content).build(); @@ -492,7 +492,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); @@ -516,7 +516,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String parent) { EchoRequest request = EchoRequest.newBuilder().setParent(parent).build(); @@ -542,7 +542,7 @@ public class EchoClient implements BackgroundResource { * * @param content * @param severity - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String content, Severity severity) { EchoRequest request = @@ -573,7 +573,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(EchoRequest request) { return echoCallable().call(request); @@ -658,7 +658,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PagedExpandPagedResponse pagedExpand(PagedExpandRequest request) { return pagedExpandPagedCallable().call(request); @@ -748,7 +748,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SimplePagedExpandPagedResponse simplePagedExpand() { PagedExpandRequest request = PagedExpandRequest.newBuilder().build(); @@ -779,7 +779,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SimplePagedExpandPagedResponse simplePagedExpand(PagedExpandRequest request) { return simplePagedExpandPagedCallable().call(request); @@ -869,7 +869,7 @@ public class EchoClient implements BackgroundResource { * } * * @param ttl - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture waitAsync(Duration ttl) { WaitRequest request = WaitRequest.newBuilder().setTtl(ttl).build(); @@ -893,7 +893,7 @@ public class EchoClient implements BackgroundResource { * } * * @param endTime - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture waitAsync(Timestamp endTime) { WaitRequest request = WaitRequest.newBuilder().setEndTime(endTime).build(); @@ -917,7 +917,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture waitAsync(WaitRequest request) { return waitOperationCallable().futureCall(request); @@ -985,7 +985,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final BlockResponse block(BlockRequest request) { return blockCallable().call(request); @@ -1036,7 +1036,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object collideName(EchoRequest request) { return collideNameCallable().call(request); @@ -1093,7 +1093,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object nestedBinding(EchoRequest request) { return nestedBindingCallable().call(request); @@ -1180,7 +1180,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse noBinding(EchoRequest request) { return noBindingCallable().call(request); @@ -1233,7 +1233,7 @@ public class EchoClient implements BackgroundResource { * * @param case_ * @param updateMask - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Case updateCase(Case case_, FieldMask updateMask) { UpdateCaseRequest request = @@ -1259,7 +1259,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Case updateCase(UpdateCaseRequest request) { return updateCaseCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden index 138bee4bc1..60cdee9847 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden @@ -180,7 +180,7 @@ public class WickedClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EvilResponse craftEvilPlan(EvilRequest request) { return craftEvilPlanCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java index fc551eb571..2a826f5fcc 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java @@ -22,6 +22,7 @@ import com.google.api.generator.gapic.model.LongrunningOperation; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.ResourceName; import com.google.api.generator.gapic.model.Sample; @@ -29,6 +30,7 @@ import com.google.api.generator.gapic.protoparser.Parser; import com.google.api.generator.test.utils.LineFormatter; import com.google.protobuf.Descriptors; +import com.google.selective.generate.v1beta1.SelectiveApiGenerationOuterClass; import com.google.showcase.v1beta1.EchoOuterClass; import java.util.Arrays; import java.util.Collections; @@ -42,6 +44,7 @@ class ServiceClientHeaderSampleComposerTest { private static final String SHOWCASE_PACKAGE_NAME = "com.google.showcase.v1beta1"; + private static final String SELECTIVE_API_PACKAGE_NAME = "com.google.selective.generate.v1beta1"; private static final String LRO_PACKAGE_NAME = "com.google.longrunning"; private static final String PROTO_PACKAGE_NAME = "com.google.protobuf"; private static final String PAGINATED_FIELD_NAME = "page_size"; @@ -289,6 +292,137 @@ void composeClassHeaderSample_firstMethodIsStream() { Assert.assertEquals(results, expected); } + @Test + void composeClassHeaderSample_firstMethodIsInternal() { + Descriptors.FileDescriptor selectiveApiGenerationFileDescriptor = + SelectiveApiGenerationOuterClass.getDescriptor(); + Map resourceNames = + Parser.parseResourceNames(selectiveApiGenerationFileDescriptor); + Map messageTypes = Parser.parseMessages(selectiveApiGenerationFileDescriptor); + TypeNode inputType = + TypeNode.withReference( + VaporReference.builder() + .setName("EchoRequest") + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .build()); + TypeNode outputType = + TypeNode.withReference( + VaporReference.builder() + .setName("EchoResponse") + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .build()); + Method internalMethod = + Method.builder() + .setName("ChatShouldGenerateAsInternal") + .setInputType(inputType) + .setOutputType(outputType) + .setSelectiveGapicType(SelectiveGapicType.INTERNAL) + .build(); + Method publicMethod = + Method.builder() + .setName("ChatShouldGenerateAsPublic") + .setInputType(inputType) + .setOutputType(outputType) + .setSelectiveGapicType(SelectiveGapicType.PUBLIC) + .build(); + Service service = + Service.builder() + .setName("EchoServiceShouldGeneratePartialPublic") + .setDefaultHost("localhost:7469") + .setOauthScopes(Arrays.asList("https://www.googleapis.com/auth/cloud-platform")) + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .setProtoPakkage(SELECTIVE_API_PACKAGE_NAME) + .setOriginalJavaPackage(SELECTIVE_API_PACKAGE_NAME) + .setOverriddenName("EchoServiceShouldGeneratePartialPublic") + .setMethods(Arrays.asList(internalMethod, publicMethod)) + .build(); + TypeNode clientType = + TypeNode.withReference( + VaporReference.builder() + .setName("EchoServiceSelectiveApiClient") + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .build()); + String results = + writeStatements( + ServiceClientHeaderSampleComposer.composeClassHeaderSample( + service, clientType, resourceNames, messageTypes)); + String expected = + LineFormatter.lines( + "try (EchoServiceSelectiveApiClient echoServiceSelectiveApiClient =\n" + + " EchoServiceSelectiveApiClient.create()) {\n" + + " EchoRequest request =\n" + + " EchoRequest.newBuilder()\n" + + " .setName(FoobarName.of(\"[PROJECT]\", \"[FOOBAR]\").toString())\n" + + " .setParent(\n" + + " FoobarbazName.ofProjectFoobarbazName(\"[PROJECT]\", \"[FOOBARBAZ]\").toString())\n" + + " .setFoobar(Foobar.newBuilder().build())\n" + + " .build();\n" + + " EchoResponse response = echoServiceSelectiveApiClient.chatShouldGenerateAsPublic(request);\n" + + "}"); + Assert.assertEquals(results, expected); + } + + @Test + void composeClassHeaderSample_allMethodsAreInternal() { + Descriptors.FileDescriptor selectiveApiGenerationFileDescriptor = + SelectiveApiGenerationOuterClass.getDescriptor(); + Map resourceNames = + Parser.parseResourceNames(selectiveApiGenerationFileDescriptor); + Map messageTypes = Parser.parseMessages(selectiveApiGenerationFileDescriptor); + TypeNode inputType = + TypeNode.withReference( + VaporReference.builder() + .setName("EchoRequest") + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .build()); + TypeNode outputType = + TypeNode.withReference( + VaporReference.builder() + .setName("EchoResponse") + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .build()); + Method internalMethod1 = + Method.builder() + .setName("ChatShouldGenerateAsInternal") + .setInputType(inputType) + .setOutputType(outputType) + .setSelectiveGapicType(SelectiveGapicType.INTERNAL) + .build(); + Method internalMethod2 = + Method.builder() + .setName("EchoShouldGenerateAsInternal") + .setInputType(inputType) + .setOutputType(outputType) + .setSelectiveGapicType(SelectiveGapicType.INTERNAL) + .build(); + Service service = + Service.builder() + .setName("EchoServiceShouldGeneratePartialPublic") + .setDefaultHost("localhost:7469") + .setOauthScopes(Arrays.asList("https://www.googleapis.com/auth/cloud-platform")) + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .setProtoPakkage(SELECTIVE_API_PACKAGE_NAME) + .setOriginalJavaPackage(SELECTIVE_API_PACKAGE_NAME) + .setOverriddenName("EchoServiceShouldGeneratePartialPublic") + .setMethods(Arrays.asList(internalMethod1, internalMethod2)) + .build(); + TypeNode clientType = + TypeNode.withReference( + VaporReference.builder() + .setName("EchoServiceSelectiveApiClient") + .setPakkage(SELECTIVE_API_PACKAGE_NAME) + .build()); + String results = + writeStatements( + ServiceClientHeaderSampleComposer.composeClassHeaderSample( + service, clientType, resourceNames, messageTypes)); + String expected = + LineFormatter.lines( + "try (EchoServiceSelectiveApiClient echoServiceSelectiveApiClient =\n" + + " EchoServiceSelectiveApiClient.create()) {}"); + Assert.assertEquals(results, expected); + } + /*Testing composeSetCredentialsSample*/ @Test void composeSetCredentialsSample() { diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java index 6e8ffa7232..6775f5ff93 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java @@ -35,6 +35,7 @@ import com.google.api.generator.gapic.model.GapicContext; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; +import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.ResourceName; import com.google.api.generator.gapic.model.ResourceReference; @@ -738,7 +739,7 @@ void selectiveGenerationTest_shouldExcludeUnusedResourceNames() { } @Test - void selectiveGenerationTest_shouldGenerateOnlySelectiveMethods() { + void selectiveGenerationTest_shouldGenerateOnlySelectiveMethodsWithGenerateOmittedFalse() { FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); Map messageTypes = Parser.parseMessages(fileDescriptor); Map resourceNames = Parser.parseResourceNames(fileDescriptor); @@ -756,15 +757,61 @@ void selectiveGenerationTest_shouldGenerateOnlySelectiveMethods() { Parser.parseService( fileDescriptor, messageTypes, resourceNames, serviceYamlOpt, new HashSet<>()); assertEquals(1, services.size()); - assertEquals("EchoServiceShouldGeneratePartial", services.get(0).overriddenName()); + assertEquals("EchoServiceShouldGeneratePartialPublic", services.get(0).overriddenName()); assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { - assertTrue(method.name().contains("ShouldInclude")); + assertTrue(method.name().contains("ShouldGenerate")); + assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.PUBLIC)); } } @Test - void selectiveGenerationTest_shouldGenerateAllIfNoPublishingSectionInServiceYaml() { + void selectiveGenerationTest_shouldGenerateOmittedAsInternalWithGenerateOmittedTrue() { + FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); + Map messageTypes = Parser.parseMessages(fileDescriptor); + Map resourceNames = Parser.parseResourceNames(fileDescriptor); + + // test with service yaml file to show usage of this feature, test itself + // can be done without this file and build a Service object from code. + String serviceYamlFilename = "selective_api_generation_generate_omitted_v1beta1.yaml"; + String testFilesDirectory = "src/test/resources/"; + Path serviceYamlPath = Paths.get(testFilesDirectory, serviceYamlFilename); + Optional serviceYamlOpt = + ServiceYamlParser.parse(serviceYamlPath.toString()); + Assert.assertTrue(serviceYamlOpt.isPresent()); + + List services = + Parser.parseService( + fileDescriptor, messageTypes, resourceNames, serviceYamlOpt, new HashSet<>()); + + assertEquals(3, services.size()); + // Tests a service with public methods only. + assertEquals("EchoServiceShouldGenerateAllPublic", services.get(0).overriddenName()); + assertEquals(3, services.get(0).methods().size()); + for (Method method : services.get(0).methods()) { + assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.PUBLIC)); + } + + // Tests a service with partial public methods and partial internal methods. + assertEquals("EchoServiceShouldGeneratePartialPublic", services.get(1).overriddenName()); + assertEquals(5, services.get(1).methods().size()); + for (Method method : services.get(1).methods()) { + if (method.name().contains("ShouldGenerateAsPublic")) { + assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.PUBLIC)); + } else { + assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.INTERNAL)); + } + } + // Tests a service with internal methods only. + assertEquals("EchoServiceShouldGenerateAllInternal", services.get(2).overriddenName()); + assertEquals(2, services.get(2).methods().size()); + for (Method method : services.get(2).methods()) { + assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.INTERNAL)); + } + } + + @Test + void selectiveGenerationTest_shouldGenerateAsPublicIfNoPublishingSectionInServiceYaml() { Service service = Service.newBuilder() .setTitle("Selective generation testing with no publishing section") @@ -776,12 +823,13 @@ void selectiveGenerationTest_shouldGenerateAllIfNoPublishingSectionInServiceYaml List methods = fileDescriptor.getServices().get(0).getMethods(); String protoPackage = "google.selective.generate.v1beta1"; - assertTrue( - Parser.shouldIncludeMethodInGeneration(methods.get(0), Optional.of(service), protoPackage)); + assertEquals( + Parser.getMethodSelectiveGapicType(methods.get(0), Optional.of(service), protoPackage), + SelectiveGapicType.PUBLIC); } @Test - void selectiveGenerationTest_shouldIncludeMethodInGenerationWhenProtoPackageMismatch() { + void selectiveGenerationTest_shouldGenerateAsPublicWhenProtoPackageMismatch() { String protoPackage = "google.selective.generate.v1beta1"; // situation where service yaml has different version stated @@ -800,12 +848,13 @@ void selectiveGenerationTest_shouldIncludeMethodInGenerationWhenProtoPackageMism FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); List methods = fileDescriptor.getServices().get(0).getMethods(); - assertTrue( - Parser.shouldIncludeMethodInGeneration(methods.get(0), Optional.of(service), protoPackage)); + assertEquals( + Parser.getMethodSelectiveGapicType(methods.get(0), Optional.of(service), protoPackage), + SelectiveGapicType.PUBLIC); } @Test - void selectiveGenerationTest_shouldGenerateAllIfNoJavaSectionInServiceYaml() { + void selectiveGenerationTest_shouldGenerateAsPublicIfNoJavaSectionInServiceYaml() { String protoPackage = "google.selective.generate.v1beta1"; // situation where service yaml has other language settings but no @@ -830,8 +879,9 @@ void selectiveGenerationTest_shouldGenerateAllIfNoJavaSectionInServiceYaml() { FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); List methods = fileDescriptor.getServices().get(0).getMethods(); - assertTrue( - Parser.shouldIncludeMethodInGeneration(methods.get(0), Optional.of(service), protoPackage)); + assertEquals( + Parser.getMethodSelectiveGapicType(methods.get(0), Optional.of(service), protoPackage), + SelectiveGapicType.PUBLIC); } private void assertMethodArgumentEquals( diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java b/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java index 4172581d06..8983b43c65 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java @@ -39,6 +39,7 @@ import com.google.protobuf.Descriptors.FileDescriptor; import com.google.protobuf.Descriptors.ServiceDescriptor; import com.google.pubsub.v1.PubsubProto; +import com.google.selective.generate.v1beta1.SelectiveApiGenerationOuterClass; import com.google.showcase.v1beta1.EchoOuterClass; import com.google.showcase.v1beta1.IdentityOuterClass; import com.google.showcase.v1beta1.MessagingOuterClass; @@ -361,6 +362,49 @@ public GapicContext parseAutoPopulateFieldTesting() { .build(); } + public GapicContext parseSelectiveGenerationTesting() { + FileDescriptor selectiveGenerationFileDescriptor = + SelectiveApiGenerationOuterClass.getDescriptor(); + ServiceDescriptor selectiveGenerationServiceDescriptor = + selectiveGenerationFileDescriptor.getServices().get(1); + assertEquals( + "EchoServiceShouldGeneratePartialPublic", selectiveGenerationServiceDescriptor.getName()); + + String serviceYamlFilename = "selective_api_generation_generate_omitted_v1beta1.yaml"; + Path serviceYamlPath = Paths.get(testFilesDirectory, serviceYamlFilename); + Optional serviceYamlOpt = + ServiceYamlParser.parse(serviceYamlPath.toString()); + assertTrue(serviceYamlOpt.isPresent()); + + Map messageTypes = Parser.parseMessages(selectiveGenerationFileDescriptor); + Map resourceNames = + Parser.parseResourceNames(selectiveGenerationFileDescriptor); + Set outputResourceNames = new HashSet<>(); + List services = + Parser.parseService( + selectiveGenerationFileDescriptor, + messageTypes, + resourceNames, + serviceYamlOpt, + outputResourceNames); + + String jsonFilename = "selective_api_generation_grpc_service_config.json"; + Path jsonPath = Paths.get(testFilesDirectory, jsonFilename); + Optional configOpt = ServiceConfigParser.parse(jsonPath.toString()); + assertTrue(configOpt.isPresent()); + GapicServiceConfig config = configOpt.get(); + return GapicContext.builder() + .setMessages(messageTypes) + .setResourceNames(resourceNames) + .setServices(services) + .setHelperResourceNames(outputResourceNames) + .setServiceYamlProto(serviceYamlOpt.orElse(null)) + .setGapicMetadataEnabled(true) + .setServiceConfig(config) + .setTransport(transport) + .build(); + } + public GapicContext parsePubSubPublisher() { FileDescriptor serviceFileDescriptor = PubsubProto.getDescriptor(); FileDescriptor commonResourcesFileDescriptor = CommonResources.getDescriptor(); diff --git a/gapic-generator-java/src/test/proto/selective_api_generation.proto b/gapic-generator-java/src/test/proto/selective_api_generation.proto index 06da2c2e41..c396a16dc7 100644 --- a/gapic-generator-java/src/test/proto/selective_api_generation.proto +++ b/gapic-generator-java/src/test/proto/selective_api_generation.proto @@ -38,15 +38,16 @@ option (google.api.resource_definition) = { // This proto is used to test selective api generation // covered scenarios: -// - A service with several rpcs, part of them should be generated -// - A service with several rpcs, none of them should be generated -// This proto should be tested side-by-side with yaml file: -// - selective_api_generation_v1beta1.yaml +// - A service with several rpcs, all of them should be generated as public methods +// - A service with several rpcs, part of them should be generated as public methods +// - A service with several rpcs, none of them should be generated as public methods +// This proto should be tested side-by-side with yaml files: +// - selective_api_generation_v1beta1.yaml or - selective_api_generation_generate_omitted_v1beta1.yaml -service EchoServiceShouldGeneratePartial { +service EchoServiceShouldGenerateAllPublic { option (google.api.default_host) = "localhost:7469"; - rpc EchoShouldInclude(EchoRequest) returns (EchoResponse) { + rpc EchoShouldGenerateAsPublic(EchoRequest) returns (EchoResponse) { option (google.api.http) = { post: "/v1beta1/echo:echo" body: "*" @@ -55,28 +56,53 @@ service EchoServiceShouldGeneratePartial { option (google.api.method_signature) = ""; } - rpc ChatShouldInclude(stream EchoRequest) returns (stream EchoResponse); + rpc ChatShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse); - rpc ChatAgainShouldInclude(stream EchoRequest) returns (stream EchoResponse) { + rpc ChatAgainShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse) { option (google.api.method_signature) = "content"; } +} + +service EchoServiceShouldGeneratePartialPublic { + option (google.api.default_host) = "localhost:7469"; + + rpc EchoShouldGenerateAsPublic(EchoRequest) returns (EchoResponse) { + option (google.api.http) = { + post: "/v1beta1/echo:echo" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = ""; + } - rpc AnExcludedMethod(stream EchoRequestWithFoobarbaz) returns (stream EchoResponse); + rpc ChatShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse); - rpc AnotherExcludedMethod(stream EchoRequest) returns (stream EchoResponse); + rpc ChatAgainShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse) { + option (google.api.method_signature) = "content"; + } + + rpc ChatShouldGenerateAsInternal(EchoRequest) returns (EchoResponse) { + option (google.api.http) = { + post: "/v1beta1/echo:echo" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = ""; + }; + rpc EchoShouldGenerateAsInternal(stream EchoRequest) returns (stream EchoResponse); } -service EchoServiceShouldGenerateNone { +service EchoServiceShouldGenerateAllInternal { option (google.api.default_host) = "localhost:7469"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - rpc Echo(EchoRequest) returns (EchoResponse) { + rpc EchoShouldGenerateAsInternal(EchoRequest) returns (EchoResponse) { option (google.api.method_signature) = "content"; } - rpc ChatAgain(stream EchoRequest) returns (stream EchoResponse) { + rpc ChatShouldGenerateAsInternal(stream EchoRequest) returns (stream EchoResponse) { option (google.api.method_signature) = "content"; } } diff --git a/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml b/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml index 021e257c50..b4703ae580 100644 --- a/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml +++ b/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml @@ -11,9 +11,10 @@ publishing: common: selective_gapic_generation: methods: - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartial.EchoShouldInclude - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartial.ChatShouldInclude - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartial.ChatAgainShouldInclude + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.EchoShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatAgainShouldGenerateAsPublic + generate_omitted_as_internal: false reference_docs_uri: www.abc.net destinations: - PACKAGE_MANAGER diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java index 7492c30b72..b1c065a504 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java @@ -214,7 +214,7 @@ public ConnectionServiceStub getStub() { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { ListConnectionsRequest request = @@ -246,7 +246,7 @@ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListConnectionsPagedResponse listConnections(String parent) { ListConnectionsRequest request = ListConnectionsRequest.newBuilder().setParent(parent).build(); @@ -279,7 +279,7 @@ public final ListConnectionsPagedResponse listConnections(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListConnectionsPagedResponse listConnections(ListConnectionsRequest request) { return listConnectionsPagedCallable().call(request); diff --git a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java index 283d320ca1..60b3ef292c 100644 --- a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java +++ b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java @@ -382,7 +382,7 @@ public final ServerStreamingCallable readRows * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations) { @@ -423,7 +423,7 @@ public final MutateRowResponse mutateRow( * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations) { @@ -468,7 +468,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -514,7 +514,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -554,7 +554,7 @@ public final MutateRowResponse mutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow(MutateRowRequest request) { return mutateRowCallable().call(request); @@ -663,7 +663,7 @@ public final ServerStreamingCallable muta * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -721,7 +721,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -782,7 +782,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -845,7 +845,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -893,7 +893,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request) { return checkAndMutateRowCallable().call(request); @@ -954,7 +954,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowReques * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(InstanceName name) { PingAndWarmRequest request = @@ -983,7 +983,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name) { * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(String name) { PingAndWarmRequest request = PingAndWarmRequest.newBuilder().setName(name).build(); @@ -1014,7 +1014,7 @@ public final PingAndWarmResponse pingAndWarm(String name) { * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfileId) { PingAndWarmRequest request = @@ -1049,7 +1049,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfil * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { PingAndWarmRequest request = @@ -1081,7 +1081,7 @@ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(PingAndWarmRequest request) { return pingAndWarmCallable().call(request); @@ -1149,7 +1149,7 @@ public final UnaryCallable pingAndWarmC * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, ByteString rowKey, List rules) { @@ -1194,7 +1194,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules) { @@ -1242,7 +1242,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, @@ -1294,7 +1294,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules, String appProfileId) { @@ -1336,7 +1336,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request) { return readModifyWriteRowCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java index 4d38b8848f..9c1bb3031a 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java @@ -256,7 +256,7 @@ public AddressesStub getStub() { * } * * @param project Project ID for this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AggregatedListPagedResponse aggregatedList(String project) { AggregatedListAddressesRequest request = @@ -294,7 +294,7 @@ public final AggregatedListPagedResponse aggregatedList(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesRequest request) { return aggregatedListPagedCallable().call(request); @@ -401,7 +401,7 @@ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesR * @param project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteAsync( String project, String region, String address) { @@ -439,7 +439,7 @@ public final OperationFuture deleteAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteAsync(DeleteAddressRequest request) { return deleteOperationCallable().futureCall(request); @@ -530,7 +530,7 @@ public final UnaryCallable deleteCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param addressResource The body resource for this request - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture insertAsync( String project, String region, Address addressResource) { @@ -568,7 +568,7 @@ public final OperationFuture insertAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture insertAsync(InsertAddressRequest request) { return insertOperationCallable().futureCall(request); @@ -667,7 +667,7 @@ public final UnaryCallable insertCallable() { * in reverse chronological order (newest result first). Use this to sort resources like * operations so that the newest operation is returned first. *

Currently, only sorting by name or creationTimestamp desc is supported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListPagedResponse list(String project, String region, String orderBy) { ListAddressesRequest request = @@ -708,7 +708,7 @@ public final ListPagedResponse list(String project, String region, String orderB * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListPagedResponse list(ListAddressesRequest request) { return listPagedCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java index f11122b18e..07cfe43d0b 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java @@ -209,7 +209,7 @@ public RegionOperationsStub getStub() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation get(String project, String region, String operation) { GetRegionOperationRequest request = @@ -245,7 +245,7 @@ public final Operation get(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation get(GetRegionOperationRequest request) { return getCallable().call(request); @@ -312,7 +312,7 @@ public final UnaryCallable getCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation wait(String project, String region, String operation) { WaitRegionOperationRequest request = @@ -357,7 +357,7 @@ public final Operation wait(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation wait(WaitRegionOperationRequest request) { return waitCallable().call(request); diff --git a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java index e0d2d4a3e7..fdec74ebd7 100644 --- a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java +++ b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java @@ -288,7 +288,7 @@ public IamCredentialsStub getStub() { * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateAccessTokenResponse generateAccessToken( ServiceAccountName name, List delegates, List scope, Duration lifetime) { @@ -342,7 +342,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateAccessTokenResponse generateAccessToken( String name, List delegates, List scope, Duration lifetime) { @@ -381,7 +381,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessTokenRequest request) { return generateAccessTokenCallable().call(request); @@ -457,7 +457,7 @@ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessToken * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateIdTokenResponse generateIdToken( ServiceAccountName name, List delegates, String audience, boolean includeEmail) { @@ -509,7 +509,7 @@ public final GenerateIdTokenResponse generateIdToken( * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateIdTokenResponse generateIdToken( String name, List delegates, String audience, boolean includeEmail) { @@ -548,7 +548,7 @@ public final GenerateIdTokenResponse generateIdToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest request) { return generateIdTokenCallable().call(request); @@ -619,7 +619,7 @@ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest requ * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignBlobResponse signBlob( ServiceAccountName name, List delegates, ByteString payload) { @@ -665,7 +665,7 @@ public final SignBlobResponse signBlob( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignBlobResponse signBlob(String name, List delegates, ByteString payload) { SignBlobRequest request = @@ -701,7 +701,7 @@ public final SignBlobResponse signBlob(String name, List delegates, Byte * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignBlobResponse signBlob(SignBlobRequest request) { return signBlobCallable().call(request); @@ -770,7 +770,7 @@ public final UnaryCallable signBlobCallable() * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignJwtResponse signJwt( ServiceAccountName name, List delegates, String payload) { @@ -816,7 +816,7 @@ public final SignJwtResponse signJwt( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignJwtResponse signJwt(String name, List delegates, String payload) { SignJwtRequest request = @@ -852,7 +852,7 @@ public final SignJwtResponse signJwt(String name, List delegates, String * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignJwtResponse signJwt(SignJwtRequest request) { return signJwtCallable().call(request); diff --git a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java index 2813d9e10e..5459928ec4 100644 --- a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java +++ b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java @@ -238,7 +238,7 @@ public IAMPolicyStub getStub() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -299,7 +299,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -362,7 +362,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java index f2d809d6a6..4cac1bc846 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java @@ -703,7 +703,7 @@ public KeyManagementServiceStub getStub() { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { ListKeyRingsRequest request = @@ -736,7 +736,7 @@ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListKeyRingsPagedResponse listKeyRings(String parent) { ListKeyRingsRequest request = ListKeyRingsRequest.newBuilder().setParent(parent).build(); @@ -772,7 +772,7 @@ public final ListKeyRingsPagedResponse listKeyRings(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListKeyRingsPagedResponse listKeyRings(ListKeyRingsRequest request) { return listKeyRingsPagedCallable().call(request); @@ -879,7 +879,7 @@ public final UnaryCallable listKeyRin * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { ListCryptoKeysRequest request = @@ -912,7 +912,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { ListCryptoKeysRequest request = ListCryptoKeysRequest.newBuilder().setParent(parent).build(); @@ -948,7 +948,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest request) { return listCryptoKeysPagedCallable().call(request); @@ -1058,7 +1058,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest re * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyName parent) { ListCryptoKeyVersionsRequest request = @@ -1093,7 +1093,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyN * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String parent) { ListCryptoKeyVersionsRequest request = @@ -1133,7 +1133,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String par * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( ListCryptoKeyVersionsRequest request) { @@ -1246,7 +1246,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { ListImportJobsRequest request = @@ -1279,7 +1279,7 @@ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListImportJobsPagedResponse listImportJobs(String parent) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build(); @@ -1315,7 +1315,7 @@ public final ListImportJobsPagedResponse listImportJobs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) { return listImportJobsPagedCallable().call(request); @@ -1421,7 +1421,7 @@ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest re * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing getKeyRing(KeyRingName name) { GetKeyRingRequest request = @@ -1450,7 +1450,7 @@ public final KeyRing getKeyRing(KeyRingName name) { * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing getKeyRing(String name) { GetKeyRingRequest request = GetKeyRingRequest.newBuilder().setName(name).build(); @@ -1480,7 +1480,7 @@ public final KeyRing getKeyRing(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing getKeyRing(GetKeyRingRequest request) { return getKeyRingCallable().call(request); @@ -1539,7 +1539,7 @@ public final UnaryCallable getKeyRingCallable() { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey getCryptoKey(CryptoKeyName name) { GetCryptoKeyRequest request = @@ -1571,7 +1571,7 @@ public final CryptoKey getCryptoKey(CryptoKeyName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey getCryptoKey(String name) { GetCryptoKeyRequest request = GetCryptoKeyRequest.newBuilder().setName(name).build(); @@ -1605,7 +1605,7 @@ public final CryptoKey getCryptoKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey getCryptoKey(GetCryptoKeyRequest request) { return getCryptoKeyCallable().call(request); @@ -1667,7 +1667,7 @@ public final UnaryCallable getCryptoKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { GetCryptoKeyVersionRequest request = @@ -1701,7 +1701,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion getCryptoKeyVersion(String name) { GetCryptoKeyVersionRequest request = @@ -1739,7 +1739,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest request) { return getCryptoKeyVersionCallable().call(request); @@ -1808,7 +1808,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest req * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublicKey getPublicKey(CryptoKeyVersionName name) { GetPublicKeyRequest request = @@ -1843,7 +1843,7 @@ public final PublicKey getPublicKey(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublicKey getPublicKey(String name) { GetPublicKeyRequest request = GetPublicKeyRequest.newBuilder().setName(name).build(); @@ -1883,7 +1883,7 @@ public final PublicKey getPublicKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublicKey getPublicKey(GetPublicKeyRequest request) { return getPublicKeyCallable().call(request); @@ -1950,7 +1950,7 @@ public final UnaryCallable getPublicKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob getImportJob(ImportJobName name) { GetImportJobRequest request = @@ -1980,7 +1980,7 @@ public final ImportJob getImportJob(ImportJobName name) { * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob getImportJob(String name) { GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build(); @@ -2012,7 +2012,7 @@ public final ImportJob getImportJob(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob getImportJob(GetImportJobRequest request) { return getImportJobCallable().call(request); @@ -2075,7 +2075,7 @@ public final UnaryCallable getImportJobCallable( * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2113,7 +2113,7 @@ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRin * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2150,7 +2150,7 @@ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing createKeyRing(CreateKeyRingRequest request) { return createKeyRingCallable().call(request); @@ -2220,7 +2220,7 @@ public final UnaryCallable createKeyRingCallable( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey createCryptoKey( KeyRingName parent, String cryptoKeyId, CryptoKey cryptoKey) { @@ -2266,7 +2266,7 @@ public final CryptoKey createCryptoKey( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, CryptoKey cryptoKey) { CreateCryptoKeyRequest request = @@ -2309,7 +2309,7 @@ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, Crypto * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey createCryptoKey(CreateCryptoKeyRequest request) { return createCryptoKeyCallable().call(request); @@ -2384,7 +2384,7 @@ public final UnaryCallable createCryptoKeyCal * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion createCryptoKeyVersion( CryptoKeyName parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2428,7 +2428,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion createCryptoKeyVersion( String parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2471,7 +2471,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionRequest request) { return createCryptoKeyVersionCallable().call(request); @@ -2546,7 +2546,7 @@ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionReque * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionRequest request) { return importCryptoKeyVersionCallable().call(request); @@ -2622,7 +2622,7 @@ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionReque * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob createImportJob( KeyRingName parent, String importJobId, ImportJob importJob) { @@ -2667,7 +2667,7 @@ public final ImportJob createImportJob( * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob createImportJob(String parent, String importJobId, ImportJob importJob) { CreateImportJobRequest request = @@ -2707,7 +2707,7 @@ public final ImportJob createImportJob(String parent, String importJobId, Import * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob createImportJob(CreateImportJobRequest request) { return createImportJobCallable().call(request); @@ -2769,7 +2769,7 @@ public final UnaryCallable createImportJobCal * * @param cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask) { UpdateCryptoKeyRequest request = @@ -2804,7 +2804,7 @@ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKey(UpdateCryptoKeyRequest request) { return updateCryptoKeyCallable().call(request); @@ -2872,7 +2872,7 @@ public final UnaryCallable updateCryptoKeyCal * @param cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with * updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion updateCryptoKeyVersion( CryptoKeyVersion cryptoKeyVersion, FieldMask updateMask) { @@ -2916,7 +2916,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request) { return updateCryptoKeyVersionCallable().call(request); @@ -2995,7 +2995,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionReque * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { EncryptRequest request = @@ -3041,7 +3041,7 @@ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EncryptResponse encrypt(String name, ByteString plaintext) { EncryptRequest request = @@ -3081,7 +3081,7 @@ public final EncryptResponse encrypt(String name, ByteString plaintext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EncryptResponse encrypt(EncryptRequest request) { return encryptCallable().call(request); @@ -3153,7 +3153,7 @@ public final UnaryCallable encryptCallable() { * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) { DecryptRequest request = @@ -3192,7 +3192,7 @@ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DecryptResponse decrypt(String name, ByteString ciphertext) { DecryptRequest request = @@ -3232,7 +3232,7 @@ public final DecryptResponse decrypt(String name, ByteString ciphertext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DecryptResponse decrypt(DecryptRequest request) { return decryptCallable().call(request); @@ -3306,7 +3306,7 @@ public final UnaryCallable decryptCallable() { * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Digest digest) { AsymmetricSignRequest request = @@ -3348,7 +3348,7 @@ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Di * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { AsymmetricSignRequest request = @@ -3391,7 +3391,7 @@ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request) { return asymmetricSignCallable().call(request); @@ -3469,7 +3469,7 @@ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricDecryptResponse asymmetricDecrypt( CryptoKeyVersionName name, ByteString ciphertext) { @@ -3512,7 +3512,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt( * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString ciphertext) { AsymmetricDecryptRequest request = @@ -3555,7 +3555,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptRequest request) { return asymmetricDecryptCallable().call(request); @@ -3632,7 +3632,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptReques * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKeyPrimaryVersion( CryptoKeyName name, String cryptoKeyVersionId) { @@ -3673,7 +3673,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) { UpdateCryptoKeyPrimaryVersionRequest request = @@ -3713,7 +3713,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoK * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKeyPrimaryVersion( UpdateCryptoKeyPrimaryVersionRequest request) { @@ -3792,7 +3792,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) { DestroyCryptoKeyVersionRequest request = @@ -3839,7 +3839,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { DestroyCryptoKeyVersionRequest request = @@ -3890,7 +3890,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request) { return destroyCryptoKeyVersionCallable().call(request); @@ -3976,7 +3976,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionReq * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) { RestoreCryptoKeyVersionRequest request = @@ -4017,7 +4017,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { RestoreCryptoKeyVersionRequest request = @@ -4062,7 +4062,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request) { return restoreCryptoKeyVersionCallable().call(request); @@ -4139,7 +4139,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -4206,7 +4206,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { return listLocationsPagedCallable().call(request); @@ -4308,7 +4308,7 @@ public final UnaryCallable listLoca * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Location getLocation(GetLocationRequest request) { return getLocationCallable().call(request); @@ -4367,7 +4367,7 @@ public final UnaryCallable getLocationCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java index 81a22204e8..7dba4f5fdd 100644 --- a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java +++ b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java @@ -420,7 +420,7 @@ public LibraryServiceStub getStub() { * } * * @param shelf The shelf to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf createShelf(Shelf shelf) { CreateShelfRequest request = CreateShelfRequest.newBuilder().setShelf(shelf).build(); @@ -447,7 +447,7 @@ public final Shelf createShelf(Shelf shelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf createShelf(CreateShelfRequest request) { return createShelfCallable().call(request); @@ -497,7 +497,7 @@ public final UnaryCallable createShelfCallable() { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf getShelf(ShelfName name) { GetShelfRequest request = @@ -524,7 +524,7 @@ public final Shelf getShelf(ShelfName name) { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf getShelf(String name) { GetShelfRequest request = GetShelfRequest.newBuilder().setName(name).build(); @@ -551,7 +551,7 @@ public final Shelf getShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf getShelf(GetShelfRequest request) { return getShelfCallable().call(request); @@ -608,7 +608,7 @@ public final UnaryCallable getShelfCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListShelvesPagedResponse listShelves(ListShelvesRequest request) { return listShelvesPagedCallable().call(request); @@ -703,7 +703,7 @@ public final UnaryCallable listShelvesC * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteShelf(ShelfName name) { DeleteShelfRequest request = @@ -730,7 +730,7 @@ public final void deleteShelf(ShelfName name) { * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteShelf(String name) { DeleteShelfRequest request = DeleteShelfRequest.newBuilder().setName(name).build(); @@ -757,7 +757,7 @@ public final void deleteShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteShelf(DeleteShelfRequest request) { deleteShelfCallable().call(request); @@ -814,7 +814,7 @@ public final UnaryCallable deleteShelfCallable() { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -851,7 +851,7 @@ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(ShelfName name, String otherShelf) { MergeShelvesRequest request = @@ -888,7 +888,7 @@ public final Shelf mergeShelves(ShelfName name, String otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(String name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -925,7 +925,7 @@ public final Shelf mergeShelves(String name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(String name, String otherShelf) { MergeShelvesRequest request = @@ -961,7 +961,7 @@ public final Shelf mergeShelves(String name, String otherShelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(MergeShelvesRequest request) { return mergeShelvesCallable().call(request); @@ -1021,7 +1021,7 @@ public final UnaryCallable mergeShelvesCallable() { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book createBook(ShelfName parent, Book book) { CreateBookRequest request = @@ -1053,7 +1053,7 @@ public final Book createBook(ShelfName parent, Book book) { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book createBook(String parent, Book book) { CreateBookRequest request = @@ -1084,7 +1084,7 @@ public final Book createBook(String parent, Book book) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book createBook(CreateBookRequest request) { return createBookCallable().call(request); @@ -1137,7 +1137,7 @@ public final UnaryCallable createBookCallable() { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(BookName name) { GetBookRequest request = @@ -1164,7 +1164,7 @@ public final Book getBook(BookName name) { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(String name) { GetBookRequest request = GetBookRequest.newBuilder().setName(name).build(); @@ -1191,7 +1191,7 @@ public final Book getBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(GetBookRequest request) { return getBookCallable().call(request); @@ -1245,7 +1245,7 @@ public final UnaryCallable getBookCallable() { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBooksPagedResponse listBooks(ShelfName parent) { ListBooksRequest request = @@ -1276,7 +1276,7 @@ public final ListBooksPagedResponse listBooks(ShelfName parent) { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBooksPagedResponse listBooks(String parent) { ListBooksRequest request = ListBooksRequest.newBuilder().setParent(parent).build(); @@ -1311,7 +1311,7 @@ public final ListBooksPagedResponse listBooks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBooksPagedResponse listBooks(ListBooksRequest request) { return listBooksPagedCallable().call(request); @@ -1409,7 +1409,7 @@ public final UnaryCallable listBooksCallabl * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBook(BookName name) { DeleteBookRequest request = @@ -1436,7 +1436,7 @@ public final void deleteBook(BookName name) { * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBook(String name) { DeleteBookRequest request = DeleteBookRequest.newBuilder().setName(name).build(); @@ -1465,7 +1465,7 @@ public final void deleteBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBook(DeleteBookRequest request) { deleteBookCallable().call(request); @@ -1520,7 +1520,7 @@ public final UnaryCallable deleteBookCallable() { * * @param book The name of the book to update. * @param updateMask Required. Mask of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book updateBook(Book book, FieldMask updateMask) { UpdateBookRequest request = @@ -1552,7 +1552,7 @@ public final Book updateBook(Book book, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book updateBook(UpdateBookRequest request) { return updateBookCallable().call(request); @@ -1609,7 +1609,7 @@ public final UnaryCallable updateBookCallable() { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(BookName name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1642,7 +1642,7 @@ public final Book moveBook(BookName name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(BookName name, String otherShelfName) { MoveBookRequest request = @@ -1675,7 +1675,7 @@ public final Book moveBook(BookName name, String otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(String name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1708,7 +1708,7 @@ public final Book moveBook(String name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(String name, String otherShelfName) { MoveBookRequest request = @@ -1740,7 +1740,7 @@ public final Book moveBook(String name, String otherShelfName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(MoveBookRequest request) { return moveBookCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java index c7ff1421c9..dc70a130b5 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java @@ -717,7 +717,7 @@ public final OperationsClient getOperationsClient() { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName parent) { ListBucketsRequest request = @@ -754,7 +754,7 @@ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName par * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { ListBucketsRequest request = @@ -791,7 +791,7 @@ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(LocationName parent) { ListBucketsRequest request = @@ -828,7 +828,7 @@ public final ListBucketsPagedResponse listBuckets(LocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName parent) { ListBucketsRequest request = @@ -865,7 +865,7 @@ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName paren * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -898,7 +898,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -998,7 +998,7 @@ public final UnaryCallable listBucketsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogBucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -1058,7 +1058,7 @@ public final UnaryCallable getBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogBucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1129,7 +1129,7 @@ public final UnaryCallable createBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogBucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1202,7 +1202,7 @@ public final UnaryCallable updateBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -1265,7 +1265,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void undeleteBucket(UndeleteBucketRequest request) { undeleteBucketCallable().call(request); @@ -1323,7 +1323,7 @@ public final UnaryCallable undeleteBucketCallable( * * @param parent Required. The bucket whose views are to be listed: *

"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListViewsPagedResponse listViews(String parent) { ListViewsRequest request = ListViewsRequest.newBuilder().setParent(parent).build(); @@ -1356,7 +1356,7 @@ public final ListViewsPagedResponse listViews(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListViewsPagedResponse listViews(ListViewsRequest request) { return listViewsPagedCallable().call(request); @@ -1456,7 +1456,7 @@ public final UnaryCallable listViewsCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogView getView(GetViewRequest request) { return getViewCallable().call(request); @@ -1516,7 +1516,7 @@ public final UnaryCallable getViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogView createView(CreateViewRequest request) { return createViewCallable().call(request); @@ -1578,7 +1578,7 @@ public final UnaryCallable createViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogView updateView(UpdateViewRequest request) { return updateViewCallable().call(request); @@ -1643,7 +1643,7 @@ public final UnaryCallable updateViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteView(DeleteViewRequest request) { deleteViewCallable().call(request); @@ -1704,7 +1704,7 @@ public final UnaryCallable deleteViewCallable() { * @param parent Required. The parent resource whose sinks are to be listed: *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { ListSinksRequest request = @@ -1735,7 +1735,7 @@ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(FolderName parent) { ListSinksRequest request = @@ -1766,7 +1766,7 @@ public final ListSinksPagedResponse listSinks(FolderName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(OrganizationName parent) { ListSinksRequest request = @@ -1797,7 +1797,7 @@ public final ListSinksPagedResponse listSinks(OrganizationName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(ProjectName parent) { ListSinksRequest request = @@ -1828,7 +1828,7 @@ public final ListSinksPagedResponse listSinks(ProjectName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(String parent) { ListSinksRequest request = ListSinksRequest.newBuilder().setParent(parent).build(); @@ -1861,7 +1861,7 @@ public final ListSinksPagedResponse listSinks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(ListSinksRequest request) { return listSinksPagedCallable().call(request); @@ -1961,7 +1961,7 @@ public final UnaryCallable listSinksCallabl * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

For example: *

`"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink getSink(LogSinkName sinkName) { GetSinkRequest request = @@ -1996,7 +1996,7 @@ public final LogSink getSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

For example: *

`"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink getSink(String sinkName) { GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2025,7 +2025,7 @@ public final LogSink getSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink getSink(GetSinkRequest request) { return getSinkCallable().call(request); @@ -2087,7 +2087,7 @@ public final UnaryCallable getSinkCallable() { *

`"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(BillingAccountName parent, LogSink sink) { CreateSinkRequest request = @@ -2127,7 +2127,7 @@ public final LogSink createSink(BillingAccountName parent, LogSink sink) { *

`"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(FolderName parent, LogSink sink) { CreateSinkRequest request = @@ -2167,7 +2167,7 @@ public final LogSink createSink(FolderName parent, LogSink sink) { *

`"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(OrganizationName parent, LogSink sink) { CreateSinkRequest request = @@ -2207,7 +2207,7 @@ public final LogSink createSink(OrganizationName parent, LogSink sink) { *

`"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(ProjectName parent, LogSink sink) { CreateSinkRequest request = @@ -2247,7 +2247,7 @@ public final LogSink createSink(ProjectName parent, LogSink sink) { *

`"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(String parent, LogSink sink) { CreateSinkRequest request = @@ -2282,7 +2282,7 @@ public final LogSink createSink(String parent, LogSink sink) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(CreateSinkRequest request) { return createSinkCallable().call(request); @@ -2353,7 +2353,7 @@ public final UnaryCallable createSinkCallable() { *

`"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2397,7 +2397,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { *

`"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(String sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2450,7 +2450,7 @@ public final LogSink updateSink(String sinkName, LogSink sink) { *

For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2507,7 +2507,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask up *

For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2548,7 +2548,7 @@ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateM * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(UpdateSinkRequest request) { return updateSinkCallable().call(request); @@ -2615,7 +2615,7 @@ public final UnaryCallable updateSinkCallable() { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

For example: *

`"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSink(LogSinkName sinkName) { DeleteSinkRequest request = @@ -2652,7 +2652,7 @@ public final void deleteSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

For example: *

`"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSink(String sinkName) { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2682,7 +2682,7 @@ public final void deleteSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSink(DeleteSinkRequest request) { deleteSinkCallable().call(request); @@ -2739,7 +2739,7 @@ public final UnaryCallable deleteSinkCallable() { * @param parent Required. The parent resource whose exclusions are to be listed. *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(BillingAccountName parent) { ListExclusionsRequest request = @@ -2772,7 +2772,7 @@ public final ListExclusionsPagedResponse listExclusions(BillingAccountName paren * @param parent Required. The parent resource whose exclusions are to be listed. *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { ListExclusionsRequest request = @@ -2805,7 +2805,7 @@ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) { ListExclusionsRequest request = @@ -2838,7 +2838,7 @@ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) * @param parent Required. The parent resource whose exclusions are to be listed. *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { ListExclusionsRequest request = @@ -2871,7 +2871,7 @@ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(String parent) { ListExclusionsRequest request = ListExclusionsRequest.newBuilder().setParent(parent).build(); @@ -2904,7 +2904,7 @@ public final ListExclusionsPagedResponse listExclusions(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest request) { return listExclusionsPagedCallable().call(request); @@ -3007,7 +3007,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

For example: *

`"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion getExclusion(LogExclusionName name) { GetExclusionRequest request = @@ -3040,7 +3040,7 @@ public final LogExclusion getExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

For example: *

`"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion getExclusion(String name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name).build(); @@ -3070,7 +3070,7 @@ public final LogExclusion getExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion getExclusion(GetExclusionRequest request) { return getExclusionCallable().call(request); @@ -3131,7 +3131,7 @@ public final UnaryCallable getExclusionCallab *

`"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3169,7 +3169,7 @@ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusio *

`"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3207,7 +3207,7 @@ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclus *

`"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3245,7 +3245,7 @@ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion *

`"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3283,7 +3283,7 @@ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclu *

`"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3315,7 +3315,7 @@ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(CreateExclusionRequest request) { return createExclusionCallable().call(request); @@ -3385,7 +3385,7 @@ public final UnaryCallable createExclusion * mentioned in `update_mask` are not changed and are ignored in the request. *

For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion updateExclusion( LogExclusionName name, LogExclusion exclusion, FieldMask updateMask) { @@ -3433,7 +3433,7 @@ public final LogExclusion updateExclusion( * mentioned in `update_mask` are not changed and are ignored in the request. *

For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion updateExclusion( String name, LogExclusion exclusion, FieldMask updateMask) { @@ -3471,7 +3471,7 @@ public final LogExclusion updateExclusion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion updateExclusion(UpdateExclusionRequest request) { return updateExclusionCallable().call(request); @@ -3532,7 +3532,7 @@ public final UnaryCallable updateExclusion * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

For example: *

`"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteExclusion(LogExclusionName name) { DeleteExclusionRequest request = @@ -3565,7 +3565,7 @@ public final void deleteExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

For example: *

`"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteExclusion(String name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); @@ -3595,7 +3595,7 @@ public final void deleteExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteExclusion(DeleteExclusionRequest request) { deleteExclusionCallable().call(request); @@ -3658,7 +3658,7 @@ public final UnaryCallable deleteExclusionCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CmekSettings getCmekSettings(GetCmekSettingsRequest request) { return getCmekSettingsCallable().call(request); @@ -3734,7 +3734,7 @@ public final UnaryCallable getCmekSettings * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CmekSettings updateCmekSettings(UpdateCmekSettingsRequest request) { return updateCmekSettingsCallable().call(request); @@ -3817,7 +3817,7 @@ public final UnaryCallable updateCmekSe * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings getSettings(SettingsName name) { GetSettingsRequest request = @@ -3860,7 +3860,7 @@ public final Settings getSettings(SettingsName name) { * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings getSettings(String name) { GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); @@ -3897,7 +3897,7 @@ public final Settings getSettings(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings getSettings(GetSettingsRequest request) { return getSettingsCallable().call(request); @@ -3978,7 +3978,7 @@ public final UnaryCallable getSettingsCallable() { * fields cannot be updated. *

See [FieldMask][google.protobuf.FieldMask] for more information. *

For example: `"updateMask=kmsKeyName"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings updateSettings(Settings settings, FieldMask updateMask) { UpdateSettingsRequest request = @@ -4022,7 +4022,7 @@ public final Settings updateSettings(Settings settings, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings updateSettings(UpdateSettingsRequest request) { return updateSettingsCallable().call(request); @@ -4093,7 +4093,7 @@ public final UnaryCallable updateSettingsCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture copyLogEntriesAsync( CopyLogEntriesRequest request) { diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java index 4dc90d0762..42f999ea2b 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java @@ -307,7 +307,7 @@ public LoggingServiceV2Stub getStub() { *

`[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLog(LogName logName) { DeleteLogRequest request = @@ -348,7 +348,7 @@ public final void deleteLog(LogName logName) { *

`[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLog(String logName) { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(logName).build(); @@ -380,7 +380,7 @@ public final void deleteLog(String logName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLog(DeleteLogRequest request) { deleteLogCallable().call(request); @@ -483,7 +483,7 @@ public final UnaryCallable deleteLogCallable() { * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final WriteLogEntriesResponse writeLogEntries( LogName logName, @@ -567,7 +567,7 @@ public final WriteLogEntriesResponse writeLogEntries( * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final WriteLogEntriesResponse writeLogEntries( String logName, @@ -614,7 +614,7 @@ public final WriteLogEntriesResponse writeLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { return writeLogEntriesCallable().call(request); @@ -709,7 +709,7 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ * order of increasing values of `LogEntry.timestamp` (oldest first), and the second option * returns entries in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogEntriesPagedResponse listLogEntries( List resourceNames, String filter, String orderBy) { @@ -752,7 +752,7 @@ public final ListLogEntriesPagedResponse listLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest request) { return listLogEntriesPagedCallable().call(request); @@ -863,7 +863,7 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request) { @@ -972,7 +972,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource *

  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { ListLogsRequest request = @@ -1009,7 +1009,7 @@ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(FolderName parent) { ListLogsRequest request = @@ -1046,7 +1046,7 @@ public final ListLogsPagedResponse listLogs(FolderName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(OrganizationName parent) { ListLogsRequest request = @@ -1083,7 +1083,7 @@ public final ListLogsPagedResponse listLogs(OrganizationName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(ProjectName parent) { ListLogsRequest request = @@ -1120,7 +1120,7 @@ public final ListLogsPagedResponse listLogs(ProjectName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(String parent) { ListLogsRequest request = ListLogsRequest.newBuilder().setParent(parent).build(); @@ -1155,7 +1155,7 @@ public final ListLogsPagedResponse listLogs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(ListLogsRequest request) { return listLogsPagedCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java index cbeed2501e..aa22c688d5 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java @@ -277,7 +277,7 @@ public MetricsServiceV2Stub getStub() { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { ListLogMetricsRequest request = @@ -309,7 +309,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder().setParent(parent).build(); @@ -342,7 +342,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest request) { return listLogMetricsPagedCallable().call(request); @@ -439,7 +439,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric getLogMetric(LogMetricName metricName) { GetLogMetricRequest request = @@ -469,7 +469,7 @@ public final LogMetric getLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric getLogMetric(String metricName) { GetLogMetricRequest request = @@ -499,7 +499,7 @@ public final LogMetric getLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric getLogMetric(GetLogMetricRequest request) { return getLogMetricCallable().call(request); @@ -556,7 +556,7 @@ public final UnaryCallable getLogMetricCallable( *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { CreateLogMetricRequest request = @@ -591,7 +591,7 @@ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric createLogMetric(String parent, LogMetric metric) { CreateLogMetricRequest request = @@ -622,7 +622,7 @@ public final LogMetric createLogMetric(String parent, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric createLogMetric(CreateLogMetricRequest request) { return createLogMetricCallable().call(request); @@ -681,7 +681,7 @@ public final UnaryCallable createLogMetricCal * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -717,7 +717,7 @@ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metri * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -748,7 +748,7 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric updateLogMetric(UpdateLogMetricRequest request) { return updateLogMetricCallable().call(request); @@ -802,7 +802,7 @@ public final UnaryCallable updateLogMetricCal * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLogMetric(LogMetricName metricName) { DeleteLogMetricRequest request = @@ -832,7 +832,7 @@ public final void deleteLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLogMetric(String metricName) { DeleteLogMetricRequest request = @@ -862,7 +862,7 @@ public final void deleteLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLogMetric(DeleteLogMetricRequest request) { deleteLogMetricCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java index 74d3f163da..28ebb54401 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -437,7 +437,7 @@ public SchemaServiceStub getStub() { * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema createSchema(ProjectName parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -478,7 +478,7 @@ public final Schema createSchema(ProjectName parent, Schema schema, String schem * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema createSchema(String parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -514,7 +514,7 @@ public final Schema createSchema(String parent, Schema schema, String schemaId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema createSchema(CreateSchemaRequest request) { return createSchemaCallable().call(request); @@ -569,7 +569,7 @@ public final UnaryCallable createSchemaCallable() { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema getSchema(SchemaName name) { GetSchemaRequest request = @@ -597,7 +597,7 @@ public final Schema getSchema(SchemaName name) { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema getSchema(String name) { GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(name).build(); @@ -627,7 +627,7 @@ public final Schema getSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema getSchema(GetSchemaRequest request) { return getSchemaCallable().call(request); @@ -683,7 +683,7 @@ public final UnaryCallable getSchemaCallable() { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { ListSchemasRequest request = @@ -715,7 +715,7 @@ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemasPagedResponse listSchemas(String parent) { ListSchemasRequest request = ListSchemasRequest.newBuilder().setParent(parent).build(); @@ -749,7 +749,7 @@ public final ListSchemasPagedResponse listSchemas(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { return listSchemasPagedCallable().call(request); @@ -848,7 +848,7 @@ public final UnaryCallable listSchemasC * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName name) { ListSchemaRevisionsRequest request = @@ -879,7 +879,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName nam * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { ListSchemaRevisionsRequest request = @@ -914,7 +914,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( ListSchemaRevisionsRequest request) { @@ -1018,7 +1018,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema commitSchema(SchemaName name, Schema schema) { CommitSchemaRequest request = @@ -1051,7 +1051,7 @@ public final Schema commitSchema(SchemaName name, Schema schema) { * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema commitSchema(String name, Schema schema) { CommitSchemaRequest request = @@ -1082,7 +1082,7 @@ public final Schema commitSchema(String name, Schema schema) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema commitSchema(CommitSchemaRequest request) { return commitSchemaCallable().call(request); @@ -1139,7 +1139,7 @@ public final UnaryCallable commitSchemaCallable() { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema rollbackSchema(SchemaName name, String revisionId) { RollbackSchemaRequest request = @@ -1173,7 +1173,7 @@ public final Schema rollbackSchema(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema rollbackSchema(String name, String revisionId) { RollbackSchemaRequest request = @@ -1204,7 +1204,7 @@ public final Schema rollbackSchema(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema rollbackSchema(RollbackSchemaRequest request) { return rollbackSchemaCallable().call(request); @@ -1263,7 +1263,7 @@ public final UnaryCallable rollbackSchemaCallable * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1299,7 +1299,7 @@ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema deleteSchemaRevision(String name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1330,7 +1330,7 @@ public final Schema deleteSchemaRevision(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema deleteSchemaRevision(DeleteSchemaRevisionRequest request) { return deleteSchemaRevisionCallable().call(request); @@ -1385,7 +1385,7 @@ public final UnaryCallable deleteSchemaRevi * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSchema(SchemaName name) { DeleteSchemaRequest request = @@ -1413,7 +1413,7 @@ public final void deleteSchema(SchemaName name) { * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSchema(String name) { DeleteSchemaRequest request = DeleteSchemaRequest.newBuilder().setName(name).build(); @@ -1442,7 +1442,7 @@ public final void deleteSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSchema(DeleteSchemaRequest request) { deleteSchemaCallable().call(request); @@ -1497,7 +1497,7 @@ public final UnaryCallable deleteSchemaCallable() { * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema schema) { ValidateSchemaRequest request = @@ -1530,7 +1530,7 @@ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema sc * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) { ValidateSchemaRequest request = @@ -1561,7 +1561,7 @@ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request) { return validateSchemaCallable().call(request); @@ -1621,7 +1621,7 @@ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateMessageResponse validateMessage(ValidateMessageRequest request) { return validateMessageCallable().call(request); @@ -1684,7 +1684,7 @@ public final ValidateMessageResponse validateMessage(ValidateMessageRequest requ * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1745,7 +1745,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1808,7 +1808,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 9539f92063..b7a0f9da81 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -587,7 +587,7 @@ public SubscriberStub getStub() { * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -658,7 +658,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -729,7 +729,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( String name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -800,7 +800,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -860,7 +860,7 @@ public final Subscription createSubscription( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription(Subscription request) { return createSubscriptionCallable().call(request); @@ -938,7 +938,7 @@ public final UnaryCallable createSubscriptionCallabl * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription getSubscription(SubscriptionName subscription) { GetSubscriptionRequest request = @@ -968,7 +968,7 @@ public final Subscription getSubscription(SubscriptionName subscription) { * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription getSubscription(String subscription) { GetSubscriptionRequest request = @@ -998,7 +998,7 @@ public final Subscription getSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription getSubscription(GetSubscriptionRequest request) { return getSubscriptionCallable().call(request); @@ -1056,7 +1056,7 @@ public final UnaryCallable getSubscription * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription updateSubscription(UpdateSubscriptionRequest request) { return updateSubscriptionCallable().call(request); @@ -1114,7 +1114,7 @@ public final UnaryCallable updateSubscr * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName project) { ListSubscriptionsRequest request = @@ -1146,7 +1146,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName projec * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { ListSubscriptionsRequest request = @@ -1180,7 +1180,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsRequest request) { return listSubscriptionsPagedCallable().call(request); @@ -1282,7 +1282,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSubscription(SubscriptionName subscription) { DeleteSubscriptionRequest request = @@ -1315,7 +1315,7 @@ public final void deleteSubscription(SubscriptionName subscription) { * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSubscription(String subscription) { DeleteSubscriptionRequest request = @@ -1348,7 +1348,7 @@ public final void deleteSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSubscription(DeleteSubscriptionRequest request) { deleteSubscriptionCallable().call(request); @@ -1418,7 +1418,7 @@ public final UnaryCallable deleteSubscriptionC * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyAckDeadline( SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) { @@ -1464,7 +1464,7 @@ public final void modifyAckDeadline( * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyAckDeadline( String subscription, List ackIds, int ackDeadlineSeconds) { @@ -1504,7 +1504,7 @@ public final void modifyAckDeadline( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) { modifyAckDeadlineCallable().call(request); @@ -1570,7 +1570,7 @@ public final UnaryCallable modifyAckDeadlineCal * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void acknowledge(SubscriptionName subscription, List ackIds) { AcknowledgeRequest request = @@ -1608,7 +1608,7 @@ public final void acknowledge(SubscriptionName subscription, List ackIds * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void acknowledge(String subscription, List ackIds) { AcknowledgeRequest request = @@ -1643,7 +1643,7 @@ public final void acknowledge(String subscription, List ackIds) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void acknowledge(AcknowledgeRequest request) { acknowledgeCallable().call(request); @@ -1705,7 +1705,7 @@ public final UnaryCallable acknowledgeCallable() { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { PullRequest request = @@ -1740,7 +1740,7 @@ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(String subscription, int maxMessages) { PullRequest request = @@ -1780,7 +1780,7 @@ public final PullResponse pull(String subscription, int maxMessages) { * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull( SubscriptionName subscription, boolean returnImmediately, int maxMessages) { @@ -1825,7 +1825,7 @@ public final PullResponse pull( * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(String subscription, boolean returnImmediately, int maxMessages) { PullRequest request = @@ -1862,7 +1862,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(PullRequest request) { return pullCallable().call(request); @@ -1971,7 +1971,7 @@ public final UnaryCallable pullCallable() { *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2012,7 +2012,7 @@ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pus *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2051,7 +2051,7 @@ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyPushConfig(ModifyPushConfigRequest request) { modifyPushConfigCallable().call(request); @@ -2114,7 +2114,7 @@ public final UnaryCallable modifyPushConfigCalla * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot getSnapshot(SnapshotName snapshot) { GetSnapshotRequest request = @@ -2147,7 +2147,7 @@ public final Snapshot getSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot getSnapshot(String snapshot) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setSnapshot(snapshot).build(); @@ -2179,7 +2179,7 @@ public final Snapshot getSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot getSnapshot(GetSnapshotRequest request) { return getSnapshotCallable().call(request); @@ -2241,7 +2241,7 @@ public final UnaryCallable getSnapshotCallable() { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { ListSnapshotsRequest request = @@ -2276,7 +2276,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSnapshotsPagedResponse listSnapshots(String project) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setProject(project).build(); @@ -2312,7 +2312,7 @@ public final ListSnapshotsPagedResponse listSnapshots(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request) { return listSnapshotsPagedCallable().call(request); @@ -2438,7 +2438,7 @@ public final UnaryCallable listSnap * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2491,7 +2491,7 @@ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscri * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(SnapshotName name, String subscription) { CreateSnapshotRequest request = @@ -2544,7 +2544,7 @@ public final Snapshot createSnapshot(SnapshotName name, String subscription) { * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(String name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2597,7 +2597,7 @@ public final Snapshot createSnapshot(String name, SubscriptionName subscription) * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(String name, String subscription) { CreateSnapshotRequest request = @@ -2640,7 +2640,7 @@ public final Snapshot createSnapshot(String name, String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(CreateSnapshotRequest request) { return createSnapshotCallable().call(request); @@ -2713,7 +2713,7 @@ public final UnaryCallable createSnapshotCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot updateSnapshot(UpdateSnapshotRequest request) { return updateSnapshotCallable().call(request); @@ -2777,7 +2777,7 @@ public final UnaryCallable updateSnapshotCallab * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSnapshot(SnapshotName snapshot) { DeleteSnapshotRequest request = @@ -2813,7 +2813,7 @@ public final void deleteSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSnapshot(String snapshot) { DeleteSnapshotRequest request = @@ -2849,7 +2849,7 @@ public final void deleteSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSnapshot(DeleteSnapshotRequest request) { deleteSnapshotCallable().call(request); @@ -2916,7 +2916,7 @@ public final UnaryCallable deleteSnapshotCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SeekResponse seek(SeekRequest request) { return seekCallable().call(request); @@ -2980,7 +2980,7 @@ public final UnaryCallable seekCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -3041,7 +3041,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -3104,7 +3104,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java index 485cf3b3da..9e4d8f0752 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -406,7 +406,7 @@ public PublisherStub getStub() { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic createTopic(TopicName name) { Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); @@ -437,7 +437,7 @@ public final Topic createTopic(TopicName name) { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic createTopic(String name) { Topic request = Topic.newBuilder().setName(name).build(); @@ -473,7 +473,7 @@ public final Topic createTopic(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic createTopic(Topic request) { return createTopicCallable().call(request); @@ -536,7 +536,7 @@ public final UnaryCallable createTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic updateTopic(UpdateTopicRequest request) { return updateTopicCallable().call(request); @@ -592,7 +592,7 @@ public final UnaryCallable updateTopicCallable() { * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublishResponse publish(TopicName topic, List messages) { PublishRequest request = @@ -625,7 +625,7 @@ public final PublishResponse publish(TopicName topic, List messag * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublishResponse publish(String topic, List messages) { PublishRequest request = @@ -656,7 +656,7 @@ public final PublishResponse publish(String topic, List messages) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublishResponse publish(PublishRequest request) { return publishCallable().call(request); @@ -710,7 +710,7 @@ public final UnaryCallable publishCallable() { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic getTopic(TopicName topic) { GetTopicRequest request = @@ -738,7 +738,7 @@ public final Topic getTopic(TopicName topic) { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic getTopic(String topic) { GetTopicRequest request = GetTopicRequest.newBuilder().setTopic(topic).build(); @@ -767,7 +767,7 @@ public final Topic getTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic getTopic(GetTopicRequest request) { return getTopicCallable().call(request); @@ -822,7 +822,7 @@ public final UnaryCallable getTopicCallable() { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicsPagedResponse listTopics(ProjectName project) { ListTopicsRequest request = @@ -854,7 +854,7 @@ public final ListTopicsPagedResponse listTopics(ProjectName project) { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicsPagedResponse listTopics(String project) { ListTopicsRequest request = ListTopicsRequest.newBuilder().setProject(project).build(); @@ -887,7 +887,7 @@ public final ListTopicsPagedResponse listTopics(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicsPagedResponse listTopics(ListTopicsRequest request) { return listTopicsPagedCallable().call(request); @@ -984,7 +984,7 @@ public final UnaryCallable listTopicsCall * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicName topic) { ListTopicSubscriptionsRequest request = @@ -1016,7 +1016,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicNam * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String topic) { ListTopicSubscriptionsRequest request = @@ -1050,7 +1050,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( ListTopicSubscriptionsRequest request) { @@ -1155,7 +1155,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) { ListTopicSnapshotsRequest request = @@ -1190,7 +1190,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { ListTopicSnapshotsRequest request = @@ -1227,7 +1227,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( ListTopicSnapshotsRequest request) { @@ -1336,7 +1336,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteTopic(TopicName topic) { DeleteTopicRequest request = @@ -1367,7 +1367,7 @@ public final void deleteTopic(TopicName topic) { * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteTopic(String topic) { DeleteTopicRequest request = DeleteTopicRequest.newBuilder().setTopic(topic).build(); @@ -1399,7 +1399,7 @@ public final void deleteTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteTopic(DeleteTopicRequest request) { deleteTopicCallable().call(request); @@ -1459,7 +1459,7 @@ public final UnaryCallable deleteTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionRequest request) { return detachSubscriptionCallable().call(request); @@ -1522,7 +1522,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1583,7 +1583,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1646,7 +1646,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java index 7da5fc69f8..a79e735944 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -477,7 +477,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListInstancesPagedResponse listInstances(LocationName parent) { ListInstancesRequest request = @@ -519,7 +519,7 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListInstancesPagedResponse listInstances(String parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); @@ -562,7 +562,7 @@ public final ListInstancesPagedResponse listInstances(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { return listInstancesPagedCallable().call(request); @@ -680,7 +680,7 @@ public final UnaryCallable listInst * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = @@ -709,7 +709,7 @@ public final Instance getInstance(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); @@ -738,7 +738,7 @@ public final Instance getInstance(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Instance getInstance(GetInstanceRequest request) { return getInstanceCallable().call(request); @@ -793,7 +793,7 @@ public final UnaryCallable getInstanceCallable() { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final InstanceAuthString getInstanceAuthString(InstanceName name) { GetInstanceAuthStringRequest request = @@ -825,7 +825,7 @@ public final InstanceAuthString getInstanceAuthString(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final InstanceAuthString getInstanceAuthString(String name) { GetInstanceAuthStringRequest request = @@ -856,7 +856,7 @@ public final InstanceAuthString getInstanceAuthString(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringRequest request) { return getInstanceAuthStringCallable().call(request); @@ -936,7 +936,7 @@ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringReque * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture createInstanceAsync( LocationName parent, String instanceId, Instance instance) { @@ -993,7 +993,7 @@ public final OperationFuture createInstanceAsync( * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture createInstanceAsync( String parent, String instanceId, Instance instance) { @@ -1041,7 +1041,7 @@ public final OperationFuture createInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture createInstanceAsync(CreateInstanceRequest request) { return createInstanceOperationCallable().futureCall(request); @@ -1158,7 +1158,7 @@ public final UnaryCallable createInstanceCalla *

    * `displayName` * `labels` * `memorySizeGb` * `redisConfig` * * `replica_count` * @param instance Required. Update description. Only fields specified in update_mask are updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture updateInstanceAsync( FieldMask updateMask, Instance instance) { @@ -1194,7 +1194,7 @@ public final OperationFuture updateInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture updateInstanceAsync(UpdateInstanceRequest request) { return updateInstanceOperationCallable().futureCall(request); @@ -1289,7 +1289,7 @@ public final UnaryCallable updateInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture upgradeInstanceAsync( InstanceName name, String redisVersion) { @@ -1324,7 +1324,7 @@ public final OperationFuture upgradeInstanceAsync( * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture upgradeInstanceAsync( String name, String redisVersion) { @@ -1356,7 +1356,7 @@ public final OperationFuture upgradeInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture upgradeInstanceAsync(UpgradeInstanceRequest request) { return upgradeInstanceOperationCallable().futureCall(request); @@ -1449,7 +1449,7 @@ public final UnaryCallable upgradeInstanceCal * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param inputConfig Required. Specify data to be imported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture importInstanceAsync( String name, InputConfig inputConfig) { @@ -1487,7 +1487,7 @@ public final OperationFuture importInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture importInstanceAsync(ImportInstanceRequest request) { return importInstanceOperationCallable().futureCall(request); @@ -1591,7 +1591,7 @@ public final UnaryCallable importInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param outputConfig Required. Specify data to be exported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture exportInstanceAsync( String name, OutputConfig outputConfig) { @@ -1628,7 +1628,7 @@ public final OperationFuture exportInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture exportInstanceAsync(ExportInstanceRequest request) { return exportInstanceOperationCallable().futureCall(request); @@ -1728,7 +1728,7 @@ public final UnaryCallable exportInstanceCalla * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture failoverInstanceAsync( InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1766,7 +1766,7 @@ public final OperationFuture failoverInstanceAsync( * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture failoverInstanceAsync( String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1801,7 +1801,7 @@ public final OperationFuture failoverInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture failoverInstanceAsync( FailoverInstanceRequest request) { @@ -1887,7 +1887,7 @@ public final UnaryCallable failoverInstanceC * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteInstanceAsync(InstanceName name) { DeleteInstanceRequest request = @@ -1916,7 +1916,7 @@ public final OperationFuture deleteInstanceAsync(InstanceName name) * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteInstanceAsync(String name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); @@ -1945,7 +1945,7 @@ public final OperationFuture deleteInstanceAsync(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteInstanceAsync(DeleteInstanceRequest request) { return deleteInstanceOperationCallable().futureCall(request); @@ -2036,7 +2036,7 @@ public final UnaryCallable deleteInstanceCalla * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture rescheduleMaintenanceAsync( InstanceName name, @@ -2080,7 +2080,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture rescheduleMaintenanceAsync( String name, @@ -2118,7 +2118,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture rescheduleMaintenanceAsync( RescheduleMaintenanceRequest request) { diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java index a95c284ea3..b25eb42986 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java @@ -734,7 +734,7 @@ public StorageStub getStub() { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(BucketName name) { DeleteBucketRequest request = @@ -761,7 +761,7 @@ public final void deleteBucket(BucketName name) { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(String name) { DeleteBucketRequest request = DeleteBucketRequest.newBuilder().setName(name).build(); @@ -792,7 +792,7 @@ public final void deleteBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -846,7 +846,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket getBucket(BucketName name) { GetBucketRequest request = @@ -873,7 +873,7 @@ public final Bucket getBucket(BucketName name) { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket getBucket(String name) { GetBucketRequest request = GetBucketRequest.newBuilder().setName(name).build(); @@ -905,7 +905,7 @@ public final Bucket getBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -968,7 +968,7 @@ public final UnaryCallable getBucketCallable() { * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1007,7 +1007,7 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1045,7 +1045,7 @@ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1103,7 +1103,7 @@ public final UnaryCallable createBucketCallable() { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { ListBucketsRequest request = @@ -1134,7 +1134,7 @@ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -1169,7 +1169,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -1268,7 +1268,7 @@ public final UnaryCallable listBucketsC * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { LockBucketRetentionPolicyRequest request = @@ -1297,7 +1297,7 @@ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket lockBucketRetentionPolicy(String bucket) { LockBucketRetentionPolicyRequest request = @@ -1328,7 +1328,7 @@ public final Bucket lockBucketRetentionPolicy(String bucket) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest request) { return lockBucketRetentionPolicyCallable().call(request); @@ -1387,7 +1387,7 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(ResourceName resource) { GetIamPolicyRequest request = @@ -1420,7 +1420,7 @@ public final Policy getIamPolicy(ResourceName resource) { * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(String resource) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); @@ -1454,7 +1454,7 @@ public final Policy getIamPolicy(String resource) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1519,7 +1519,7 @@ public final UnaryCallable getIamPolicyCallable() { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(ResourceName resource, Policy policy) { SetIamPolicyRequest request = @@ -1557,7 +1557,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(String resource, Policy policy) { SetIamPolicyRequest request = @@ -1593,7 +1593,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1660,7 +1660,7 @@ public final UnaryCallable setIamPolicyCallable() { * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions( ResourceName resource, List permissions) { @@ -1700,7 +1700,7 @@ public final TestIamPermissionsResponse testIamPermissions( * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions( String resource, List permissions) { @@ -1740,7 +1740,7 @@ public final TestIamPermissionsResponse testIamPermissions( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); @@ -1809,7 +1809,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { UpdateBucketRequest request = @@ -1844,7 +1844,7 @@ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1901,7 +1901,7 @@ public final UnaryCallable updateBucketCallable() { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteNotification(NotificationName name) { DeleteNotificationRequest request = @@ -1930,7 +1930,7 @@ public final void deleteNotification(NotificationName name) { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteNotification(String name) { DeleteNotificationRequest request = @@ -1960,7 +1960,7 @@ public final void deleteNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteNotification(DeleteNotificationRequest request) { deleteNotificationCallable().call(request); @@ -2013,7 +2013,7 @@ public final UnaryCallable deleteNotificationC * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification getNotification(BucketName name) { GetNotificationRequest request = @@ -2041,7 +2041,7 @@ public final Notification getNotification(BucketName name) { * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification getNotification(String name) { GetNotificationRequest request = GetNotificationRequest.newBuilder().setName(name).build(); @@ -2070,7 +2070,7 @@ public final Notification getNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification getNotification(GetNotificationRequest request) { return getNotificationCallable().call(request); @@ -2126,7 +2126,7 @@ public final UnaryCallable getNotification * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification createNotification(ProjectName parent, Notification notification) { CreateNotificationRequest request = @@ -2160,7 +2160,7 @@ public final Notification createNotification(ProjectName parent, Notification no * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification createNotification(String parent, Notification notification) { CreateNotificationRequest request = @@ -2196,7 +2196,7 @@ public final Notification createNotification(String parent, Notification notific * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification createNotification(CreateNotificationRequest request) { return createNotificationCallable().call(request); @@ -2254,7 +2254,7 @@ public final UnaryCallable createNotifi * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListNotificationsPagedResponse listNotifications(ProjectName parent) { ListNotificationsRequest request = @@ -2285,7 +2285,7 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListNotificationsPagedResponse listNotifications(String parent) { ListNotificationsRequest request = @@ -2319,7 +2319,7 @@ public final ListNotificationsPagedResponse listNotifications(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListNotificationsPagedResponse listNotifications(ListNotificationsRequest request) { return listNotificationsPagedCallable().call(request); @@ -2429,7 +2429,7 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object composeObject(ComposeObjectRequest request) { return composeObjectCallable().call(request); @@ -2494,7 +2494,7 @@ public final UnaryCallable composeObjectCallable() * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. The name of the finalized object to delete. Note: If you want to delete * an unfinalized resumable upload please use `CancelResumableWrite`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteObject(String bucket, String object) { DeleteObjectRequest request = @@ -2528,7 +2528,7 @@ public final void deleteObject(String bucket, String object) { * an unfinalized resumable upload please use `CancelResumableWrite`. * @param generation If present, permanently deletes a specific revision of this object (as * opposed to the latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteObject(String bucket, String object, long generation) { DeleteObjectRequest request = @@ -2570,7 +2570,7 @@ public final void deleteObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteObject(DeleteObjectRequest request) { deleteObjectCallable().call(request); @@ -2631,7 +2631,7 @@ public final UnaryCallable deleteObjectCallable() { * * @param uploadId Required. The upload_id of the resumable upload to cancel. This should be * copied from the `upload_id` field of `StartResumableWriteResponse`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) { CancelResumableWriteRequest request = @@ -2659,7 +2659,7 @@ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CancelResumableWriteResponse cancelResumableWrite( CancelResumableWriteRequest request) { @@ -2714,7 +2714,7 @@ public final CancelResumableWriteResponse cancelResumableWrite( * * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. Name of the object. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object getObject(String bucket, String object) { GetObjectRequest request = @@ -2746,7 +2746,7 @@ public final Object getObject(String bucket, String object) { * @param object Required. Name of the object. * @param generation If present, selects a specific revision of this object (as opposed to the * latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object getObject(String bucket, String object, long generation) { GetObjectRequest request = @@ -2788,7 +2788,7 @@ public final Object getObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object getObject(GetObjectRequest request) { return getObjectCallable().call(request); @@ -2897,7 +2897,7 @@ public final ServerStreamingCallable read * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object updateObject(Object object, FieldMask updateMask) { UpdateObjectRequest request = @@ -2934,7 +2934,7 @@ public final Object updateObject(Object object, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object updateObject(UpdateObjectRequest request) { return updateObjectCallable().call(request); @@ -3082,7 +3082,7 @@ public final UnaryCallable updateObjectCallable() { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListObjectsPagedResponse listObjects(ProjectName parent) { ListObjectsRequest request = @@ -3113,7 +3113,7 @@ public final ListObjectsPagedResponse listObjects(ProjectName parent) { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListObjectsPagedResponse listObjects(String parent) { ListObjectsRequest request = ListObjectsRequest.newBuilder().setParent(parent).build(); @@ -3153,7 +3153,7 @@ public final ListObjectsPagedResponse listObjects(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListObjectsPagedResponse listObjects(ListObjectsRequest request) { return listObjectsPagedCallable().call(request); @@ -3289,7 +3289,7 @@ public final UnaryCallable listObjectsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final RewriteResponse rewriteObject(RewriteObjectRequest request) { return rewriteObjectCallable().call(request); @@ -3371,7 +3371,7 @@ public final UnaryCallable rewriteObjectC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final StartResumableWriteResponse startResumableWrite(StartResumableWriteRequest request) { return startResumableWriteCallable().call(request); @@ -3439,7 +3439,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite * * @param uploadId Required. The name of the resume token for the object whose write status is * being requested. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { QueryWriteStatusRequest request = @@ -3480,7 +3480,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest request) { return queryWriteStatusCallable().call(request); @@ -3546,7 +3546,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ServiceAccount getServiceAccount(ProjectName project) { GetServiceAccountRequest request = @@ -3576,7 +3576,7 @@ public final ServiceAccount getServiceAccount(ProjectName project) { * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ServiceAccount getServiceAccount(String project) { GetServiceAccountRequest request = @@ -3606,7 +3606,7 @@ public final ServiceAccount getServiceAccount(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ServiceAccount getServiceAccount(GetServiceAccountRequest request) { return getServiceAccountCallable().call(request); @@ -3663,7 +3663,7 @@ public final UnaryCallable getServiceA * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CreateHmacKeyResponse createHmacKey( ProjectName project, String serviceAccountEmail) { @@ -3698,7 +3698,7 @@ public final CreateHmacKeyResponse createHmacKey( * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CreateHmacKeyResponse createHmacKey(String project, String serviceAccountEmail) { CreateHmacKeyRequest request = @@ -3732,7 +3732,7 @@ public final CreateHmacKeyResponse createHmacKey(String project, String serviceA * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) { return createHmacKeyCallable().call(request); @@ -3790,7 +3790,7 @@ public final UnaryCallable createHm * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteHmacKey(String accessId, ProjectName project) { DeleteHmacKeyRequest request = @@ -3824,7 +3824,7 @@ public final void deleteHmacKey(String accessId, ProjectName project) { * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteHmacKey(String accessId, String project) { DeleteHmacKeyRequest request = @@ -3855,7 +3855,7 @@ public final void deleteHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteHmacKey(DeleteHmacKeyRequest request) { deleteHmacKeyCallable().call(request); @@ -3912,7 +3912,7 @@ public final UnaryCallable deleteHmacKeyCallable() * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { GetHmacKeyRequest request = @@ -3946,7 +3946,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata getHmacKey(String accessId, String project) { GetHmacKeyRequest request = @@ -3977,7 +3977,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) { return getHmacKeyCallable().call(request); @@ -4034,7 +4034,7 @@ public final UnaryCallable getHmacKeyCallabl * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { ListHmacKeysRequest request = @@ -4067,7 +4067,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListHmacKeysPagedResponse listHmacKeys(String project) { ListHmacKeysRequest request = ListHmacKeysRequest.newBuilder().setProject(project).build(); @@ -4102,7 +4102,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request) { return listHmacKeysPagedCallable().call(request); @@ -4207,7 +4207,7 @@ public final UnaryCallable listHmacKe * used to identify the key. * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the * `state` field is updated to the value specified in `hmac_key`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) { UpdateHmacKeyRequest request = @@ -4238,7 +4238,7 @@ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask up * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) { return updateHmacKeyCallable().call(request); From f5c93dbe6b37812888cfa7c9bc48e2a7bf46cebf Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 1 Apr 2025 19:11:19 -0700 Subject: [PATCH 02/21] Add selective gapic yaml files and golden files --- .../composer/grpc/goldens/EchoClient.golden | 34 +- .../EchoServiceSelectiveGapicClient.golden | 639 ++++++++++++++++++ .../grpc/goldens/SelectiveGapicStub.golden | 252 +++++++ ...syncChatAgainShouldGenerateAsPublic.golden | 58 ++ .../AsyncChatShouldGenerateAsInternal.golden | 56 ++ .../AsyncChatShouldGenerateAsPublic.golden | 56 ++ .../AsyncEchoShouldGenerateAsInternal.golden | 58 ++ .../AsyncEchoShouldGenerateAsPublic.golden | 56 ++ .../SyncChatShouldGenerateAsInternal.golden | 51 ++ ...tShouldGenerateAsInternalFoobarname.golden | 44 ++ ...cChatShouldGenerateAsInternalNoargs.golden | 42 ++ ...cChatShouldGenerateAsInternalString.golden | 44 ++ .../SyncCreateSetCredentialsProvider.golden | 46 ++ .../SyncCreateSetEndpoint.golden | 43 ++ .../SyncEchoShouldGenerateAsPublic.golden | 51 ++ ...choShouldGenerateAsPublicFoobarname.golden | 44 ++ ...yncEchoShouldGenerateAsPublicNoargs.golden | 42 ++ ...yncEchoShouldGenerateAsPublicString.golden | 44 ++ ...i_generation_generate_omitted_v1beta1.yaml | 27 + .../v1/ConnectionServiceClient.java | 6 +- .../data/v2/BaseBigtableDataClient.java | 40 +- .../compute/v1small/AddressesClient.java | 16 +- .../v1small/RegionOperationsClient.java | 8 +- .../credentials/v1/IamCredentialsClient.java | 24 +- .../com/google/iam/v1/IAMPolicyClient.java | 6 +- .../kms/v1/KeyManagementServiceClient.java | 138 ++-- .../library/v1/LibraryServiceClient.java | 66 +- .../google/cloud/logging/v2/ConfigClient.java | 138 ++-- .../cloud/logging/v2/LoggingClient.java | 30 +- .../cloud/logging/v2/MetricsClient.java | 30 +- .../cloud/pubsub/v1/SchemaServiceClient.java | 62 +- .../pubsub/v1/SubscriptionAdminClient.java | 96 +-- .../cloud/pubsub/v1/TopicAdminClient.java | 52 +- .../cloud/redis/v1beta1/CloudRedisClient.java | 60 +- .../com/google/storage/v2/StorageClient.java | 146 ++-- 35 files changed, 2129 insertions(+), 476 deletions(-) create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsPublic.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsPublic.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsPublic.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublic.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicFoobarname.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicNoargs.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicString.golden create mode 100644 gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden index 431700191c..b4b966cbca 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden @@ -322,7 +322,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo() { EchoRequest request = EchoRequest.newBuilder().build(); @@ -346,7 +346,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(ResourceName parent) { EchoRequest request = @@ -371,7 +371,7 @@ public class EchoClient implements BackgroundResource { * } * * @param error - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(Status error) { EchoRequest request = EchoRequest.newBuilder().setError(error).build(); @@ -395,7 +395,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(FoobarName name) { EchoRequest request = @@ -420,7 +420,7 @@ public class EchoClient implements BackgroundResource { * } * * @param content - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String content) { EchoRequest request = EchoRequest.newBuilder().setContent(content).build(); @@ -444,7 +444,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); @@ -468,7 +468,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String parent) { EchoRequest request = EchoRequest.newBuilder().setParent(parent).build(); @@ -494,7 +494,7 @@ public class EchoClient implements BackgroundResource { * * @param content * @param severity - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(String content, Severity severity) { EchoRequest request = @@ -525,7 +525,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EchoResponse echo(EchoRequest request) { return echoCallable().call(request); @@ -712,7 +712,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PagedExpandPagedResponse pagedExpand(PagedExpandRequest request) { return pagedExpandPagedCallable().call(request); @@ -802,7 +802,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SimplePagedExpandPagedResponse simplePagedExpand() { PagedExpandRequest request = PagedExpandRequest.newBuilder().build(); @@ -833,7 +833,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SimplePagedExpandPagedResponse simplePagedExpand(PagedExpandRequest request) { return simplePagedExpandPagedCallable().call(request); @@ -923,7 +923,7 @@ public class EchoClient implements BackgroundResource { * } * * @param ttl - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture waitAsync(Duration ttl) { WaitRequest request = WaitRequest.newBuilder().setTtl(ttl).build(); @@ -947,7 +947,7 @@ public class EchoClient implements BackgroundResource { * } * * @param endTime - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture waitAsync(Timestamp endTime) { WaitRequest request = WaitRequest.newBuilder().setEndTime(endTime).build(); @@ -971,7 +971,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture waitAsync(WaitRequest request) { return waitOperationCallable().futureCall(request); @@ -1039,7 +1039,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final BlockResponse block(BlockRequest request) { return blockCallable().call(request); @@ -1090,7 +1090,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object collideName(EchoRequest request) { return collideNameCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden new file mode 100644 index 0000000000..0faf7834c5 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -0,0 +1,639 @@ +package com.google.selective.generate.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialPublicStub; +import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialPublicStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * This class provides the ability to make remote calls to the backing service through method calls + * that map to API methods. Sample code to get started: + * + *

    {@code
    + * // 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
    + * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    + *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    + *   EchoResponse response =
    + *       echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic();
    + * }
    + * }
    + * + *

    Note: close() needs to be called on the EchoServiceShouldGeneratePartialPublicClient object to + * clean up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Methods
    MethodDescriptionMethod Variants

    EchoShouldGenerateAsPublic

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • echoShouldGenerateAsPublic(EchoRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • echoShouldGenerateAsPublic() + *

    • echoShouldGenerateAsPublic(FoobarName name) + *

    • echoShouldGenerateAsPublic(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • echoShouldGenerateAsPublicCallable() + *

    + *

    ChatShouldGenerateAsPublic

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • chatShouldGenerateAsPublicCallable() + *

    + *

    ChatAgainShouldGenerateAsPublic

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • chatAgainShouldGenerateAsPublicCallable() + *

    + *

    ChatShouldGenerateAsInternal

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • chatShouldGenerateAsInternal(EchoRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • chatShouldGenerateAsInternal() + *

    • chatShouldGenerateAsInternal(FoobarName name) + *

    • chatShouldGenerateAsInternal(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • chatShouldGenerateAsInternalCallable() + *

    + *

    EchoShouldGenerateAsInternal

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • echoShouldGenerateAsInternalCallable() + *

    + *
    + * + *

    See the individual methods for example code. + * + *

    Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

    This class can be customized by passing in a custom instance of + * EchoServiceShouldGeneratePartialPublicSettings to create(). For example: + * + *

    To customize credentials: + * + *

    {@code
    + * // 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
    + * EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings =
    + *     EchoServiceShouldGeneratePartialPublicSettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    + *     EchoServiceShouldGeneratePartialPublicClient.create(
    + *         echoServiceShouldGeneratePartialPublicSettings);
    + * }
    + * + *

    To customize the endpoint: + * + *

    {@code
    + * // 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
    + * EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings =
    + *     EchoServiceShouldGeneratePartialPublicSettings.newBuilder().setEndpoint(myEndpoint).build();
    + * EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    + *     EchoServiceShouldGeneratePartialPublicClient.create(
    + *         echoServiceShouldGeneratePartialPublicSettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundResource { + private final EchoServiceShouldGeneratePartialPublicSettings settings; + private final EchoServiceShouldGeneratePartialPublicStub stub; + + /** + * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient with default settings. + */ + public static final EchoServiceShouldGeneratePartialPublicClient create() throws IOException { + return create(EchoServiceShouldGeneratePartialPublicSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient, using the given + * settings. The channels are created based on the settings passed in, or defaults for any + * settings that are not set. + */ + public static final EchoServiceShouldGeneratePartialPublicClient create( + EchoServiceShouldGeneratePartialPublicSettings settings) throws IOException { + return new EchoServiceShouldGeneratePartialPublicClient(settings); + } + + /** + * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient, using the given stub + * for making calls. This is for advanced usage - prefer using + * create(EchoServiceShouldGeneratePartialPublicSettings). + */ + public static final EchoServiceShouldGeneratePartialPublicClient create( + EchoServiceShouldGeneratePartialPublicStub stub) { + return new EchoServiceShouldGeneratePartialPublicClient(stub); + } + + /** + * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected EchoServiceShouldGeneratePartialPublicClient( + EchoServiceShouldGeneratePartialPublicSettings settings) throws IOException { + this.settings = settings; + this.stub = + ((EchoServiceShouldGeneratePartialPublicStubSettings) settings.getStubSettings()) + .createStub(); + } + + protected EchoServiceShouldGeneratePartialPublicClient( + EchoServiceShouldGeneratePartialPublicStub stub) { + this.settings = null; + this.stub = stub; + } + + public final EchoServiceShouldGeneratePartialPublicSettings getSettings() { + return settings; + } + + public EchoServiceShouldGeneratePartialPublicStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *

    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + */ + public final EchoResponse echoShouldGenerateAsPublic() { + EchoRequest request = EchoRequest.newBuilder().build(); + return echoShouldGenerateAsPublic(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]");
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(name);
    +   * }
    +   * }
    + * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + */ + public final EchoResponse echoShouldGenerateAsPublic(FoobarName name) { + EchoRequest request = + EchoRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return echoShouldGenerateAsPublic(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString();
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(name);
    +   * }
    +   * }
    + * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + */ + public final EchoResponse echoShouldGenerateAsPublic(String name) { + EchoRequest request = EchoRequest.newBuilder().setName(name).build(); + return echoShouldGenerateAsPublic(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + */ + public final EchoResponse echoShouldGenerateAsPublic(EchoRequest request) { + return echoShouldGenerateAsPublicCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       echoServiceShouldGeneratePartialPublicClient
    +   *           .echoShouldGenerateAsPublicCallable()
    +   *           .futureCall(request);
    +   *   // Do something.
    +   *   EchoResponse response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable echoShouldGenerateAsPublicCallable() { + return stub.echoShouldGenerateAsPublicCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   BidiStream bidiStream =
    +   *       echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsPublicCallable().call();
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   bidiStream.send(request);
    +   *   for (EchoResponse response : bidiStream) {
    +   *     // Do something when a response is received.
    +   *   }
    +   * }
    +   * }
    + */ + public final BidiStreamingCallable + chatShouldGenerateAsPublicCallable() { + return stub.chatShouldGenerateAsPublicCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   BidiStream bidiStream =
    +   *       echoServiceShouldGeneratePartialPublicClient
    +   *           .chatAgainShouldGenerateAsPublicCallable()
    +   *           .call();
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   bidiStream.send(request);
    +   *   for (EchoResponse response : bidiStream) {
    +   *     // Do something when a response is received.
    +   *   }
    +   * }
    +   * }
    + */ + public final BidiStreamingCallable + chatAgainShouldGenerateAsPublicCallable() { + return stub.chatAgainShouldGenerateAsPublicCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * is internal used only. Please do not use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public final EchoResponse chatShouldGenerateAsInternal() { + EchoRequest request = EchoRequest.newBuilder().build(); + return chatShouldGenerateAsInternal(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]");
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name);
    +   * }
    +   * }
    + * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * is internal used only. Please do not use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public final EchoResponse chatShouldGenerateAsInternal(FoobarName name) { + EchoRequest request = + EchoRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return chatShouldGenerateAsInternal(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString();
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name);
    +   * }
    +   * }
    + * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * is internal used only. Please do not use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public final EchoResponse chatShouldGenerateAsInternal(String name) { + EchoRequest request = EchoRequest.newBuilder().setName(name).build(); + return chatShouldGenerateAsInternal(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   EchoResponse response =
    +   *       echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * is internal used only. Please do not use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public final EchoResponse chatShouldGenerateAsInternal(EchoRequest request) { + return chatShouldGenerateAsInternalCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       echoServiceShouldGeneratePartialPublicClient
    +   *           .chatShouldGenerateAsInternalCallable()
    +   *           .futureCall(request);
    +   *   // Do something.
    +   *   EchoResponse response = future.get();
    +   * }
    +   * }
    + * + * @InternalApi This method is internal used only. Please do not use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public final UnaryCallable chatShouldGenerateAsInternalCallable() { + return stub.chatShouldGenerateAsInternalCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sample code: + * + *
    {@code
    +   * // 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
    +   * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient =
    +   *     EchoServiceShouldGeneratePartialPublicClient.create()) {
    +   *   BidiStream bidiStream =
    +   *       echoServiceShouldGeneratePartialPublicClient
    +   *           .echoShouldGenerateAsInternalCallable()
    +   *           .call();
    +   *   EchoRequest request =
    +   *       EchoRequest.newBuilder()
    +   *           .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString())
    +   *           .setFoobar(Foobar.newBuilder().build())
    +   *           .build();
    +   *   bidiStream.send(request);
    +   *   for (EchoResponse response : bidiStream) {
    +   *     // Do something when a response is received.
    +   *   }
    +   * }
    +   * }
    + * + * @InternalApi This method is internal used only. Please do not use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public final BidiStreamingCallable + echoShouldGenerateAsInternalCallable() { + return stub.echoShouldGenerateAsInternalCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden new file mode 100644 index 0000000000..212e88a235 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden @@ -0,0 +1,252 @@ +package com.google.selective.generate.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the EchoServiceShouldGeneratePartialPublic service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcEchoServiceShouldGeneratePartialPublicStub + extends EchoServiceShouldGeneratePartialPublicStub { + private static final MethodDescriptor + echoShouldGenerateAsPublicMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/EchoShouldGenerateAsPublic") + .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + chatShouldGenerateAsPublicMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/ChatShouldGenerateAsPublic") + .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + chatAgainShouldGenerateAsPublicMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/ChatAgainShouldGenerateAsPublic") + .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + chatShouldGenerateAsInternalMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/ChatShouldGenerateAsInternal") + .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + echoShouldGenerateAsInternalMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/EchoShouldGenerateAsInternal") + .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable echoShouldGenerateAsPublicCallable; + private final BidiStreamingCallable chatShouldGenerateAsPublicCallable; + private final BidiStreamingCallable + chatAgainShouldGenerateAsPublicCallable; + private final UnaryCallable chatShouldGenerateAsInternalCallable; + private final BidiStreamingCallable + echoShouldGenerateAsInternalCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEchoServiceShouldGeneratePartialPublicStub create( + EchoServiceShouldGeneratePartialPublicStubSettings settings) throws IOException { + return new GrpcEchoServiceShouldGeneratePartialPublicStub( + settings, ClientContext.create(settings)); + } + + public static final GrpcEchoServiceShouldGeneratePartialPublicStub create( + ClientContext clientContext) throws IOException { + return new GrpcEchoServiceShouldGeneratePartialPublicStub( + EchoServiceShouldGeneratePartialPublicStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEchoServiceShouldGeneratePartialPublicStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEchoServiceShouldGeneratePartialPublicStub( + EchoServiceShouldGeneratePartialPublicStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcEchoServiceShouldGeneratePartialPublicStub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected GrpcEchoServiceShouldGeneratePartialPublicStub( + EchoServiceShouldGeneratePartialPublicStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEchoServiceShouldGeneratePartialPublicCallableFactory()); + } + + /** + * Constructs an instance of GrpcEchoServiceShouldGeneratePartialPublicStub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected GrpcEchoServiceShouldGeneratePartialPublicStub( + EchoServiceShouldGeneratePartialPublicStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings echoShouldGenerateAsPublicTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(echoShouldGenerateAsPublicMethodDescriptor) + .build(); + GrpcCallSettings chatShouldGenerateAsPublicTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(chatShouldGenerateAsPublicMethodDescriptor) + .build(); + GrpcCallSettings chatAgainShouldGenerateAsPublicTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(chatAgainShouldGenerateAsPublicMethodDescriptor) + .build(); + GrpcCallSettings chatShouldGenerateAsInternalTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(chatShouldGenerateAsInternalMethodDescriptor) + .build(); + GrpcCallSettings echoShouldGenerateAsInternalTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(echoShouldGenerateAsInternalMethodDescriptor) + .build(); + + this.echoShouldGenerateAsPublicCallable = + callableFactory.createUnaryCallable( + echoShouldGenerateAsPublicTransportSettings, + settings.echoShouldGenerateAsPublicSettings(), + clientContext); + this.chatShouldGenerateAsPublicCallable = + callableFactory.createBidiStreamingCallable( + chatShouldGenerateAsPublicTransportSettings, + settings.chatShouldGenerateAsPublicSettings(), + clientContext); + this.chatAgainShouldGenerateAsPublicCallable = + callableFactory.createBidiStreamingCallable( + chatAgainShouldGenerateAsPublicTransportSettings, + settings.chatAgainShouldGenerateAsPublicSettings(), + clientContext); + this.chatShouldGenerateAsInternalCallable = + callableFactory.createUnaryCallable( + chatShouldGenerateAsInternalTransportSettings, + settings.chatShouldGenerateAsInternalSettings(), + clientContext); + this.echoShouldGenerateAsInternalCallable = + callableFactory.createBidiStreamingCallable( + echoShouldGenerateAsInternalTransportSettings, + settings.echoShouldGenerateAsInternalSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable echoShouldGenerateAsPublicCallable() { + return echoShouldGenerateAsPublicCallable; + } + + @Override + public BidiStreamingCallable chatShouldGenerateAsPublicCallable() { + return chatShouldGenerateAsPublicCallable; + } + + @Override + public BidiStreamingCallable + chatAgainShouldGenerateAsPublicCallable() { + return chatAgainShouldGenerateAsPublicCallable; + } + + @Override + public UnaryCallable chatShouldGenerateAsInternalCallable() { + return chatShouldGenerateAsInternalCallable; + } + + @Override + public BidiStreamingCallable echoShouldGenerateAsInternalCallable() { + return echoShouldGenerateAsInternalCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsPublic.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsPublic.golden new file mode 100644 index 0000000000..79c040a4c1 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsPublic.golden @@ -0,0 +1,58 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatAgainShouldGenerateAsPublic_async] +import com.google.api.gax.rpc.BidiStream; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncChatAgainShouldGenerateAsPublic { + + public static void main(String[] args) throws Exception { + asyncChatAgainShouldGenerateAsPublic(); + } + + public static void asyncChatAgainShouldGenerateAsPublic() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + BidiStream bidiStream = + echoServiceShouldGeneratePartialPublicClient + .chatAgainShouldGenerateAsPublicCallable() + .call(); + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + bidiStream.send(request); + for (EchoResponse response : bidiStream) { + // Do something when a response is received. + } + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatAgainShouldGenerateAsPublic_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden new file mode 100644 index 0000000000..f0af16cf3e --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden @@ -0,0 +1,56 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_async] +import com.google.api.core.ApiFuture; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncChatShouldGenerateAsInternal { + + public static void main(String[] args) throws Exception { + asyncChatShouldGenerateAsInternal(); + } + + public static void asyncChatShouldGenerateAsInternal() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + ApiFuture future = + echoServiceShouldGeneratePartialPublicClient + .chatShouldGenerateAsInternalCallable() + .futureCall(request); + // Do something. + EchoResponse response = future.get(); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsPublic.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsPublic.golden new file mode 100644 index 0000000000..74eb1d0118 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsPublic.golden @@ -0,0 +1,56 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsPublic_async] +import com.google.api.gax.rpc.BidiStream; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncChatShouldGenerateAsPublic { + + public static void main(String[] args) throws Exception { + asyncChatShouldGenerateAsPublic(); + } + + public static void asyncChatShouldGenerateAsPublic() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + BidiStream bidiStream = + echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsPublicCallable().call(); + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + bidiStream.send(request); + for (EchoResponse response : bidiStream) { + // Do something when a response is received. + } + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsPublic_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden new file mode 100644 index 0000000000..f1df00cdf6 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden @@ -0,0 +1,58 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsInternal_async] +import com.google.api.gax.rpc.BidiStream; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncEchoShouldGenerateAsInternal { + + public static void main(String[] args) throws Exception { + asyncEchoShouldGenerateAsInternal(); + } + + public static void asyncEchoShouldGenerateAsInternal() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + BidiStream bidiStream = + echoServiceShouldGeneratePartialPublicClient + .echoShouldGenerateAsInternalCallable() + .call(); + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + bidiStream.send(request); + for (EchoResponse response : bidiStream) { + // Do something when a response is received. + } + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsInternal_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsPublic.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsPublic.golden new file mode 100644 index 0000000000..1da3c77914 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsPublic.golden @@ -0,0 +1,56 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_async] +import com.google.api.core.ApiFuture; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncEchoShouldGenerateAsPublic { + + public static void main(String[] args) throws Exception { + asyncEchoShouldGenerateAsPublic(); + } + + public static void asyncEchoShouldGenerateAsPublic() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + ApiFuture future = + echoServiceShouldGeneratePartialPublicClient + .echoShouldGenerateAsPublicCallable() + .futureCall(request); + // Do something. + EchoResponse response = future.get(); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden new file mode 100644 index 0000000000..ad4d798f2a --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden @@ -0,0 +1,51 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_sync] +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncChatShouldGenerateAsInternal { + + public static void main(String[] args) throws Exception { + syncChatShouldGenerateAsInternal(); + } + + public static void syncChatShouldGenerateAsInternal() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(request); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden new file mode 100644 index 0000000000..d671ec95f6 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden @@ -0,0 +1,44 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Foobarname_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncChatShouldGenerateAsInternalFoobarname { + + public static void main(String[] args) throws Exception { + syncChatShouldGenerateAsInternalFoobarname(); + } + + public static void syncChatShouldGenerateAsInternalFoobarname() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]"); + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Foobarname_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden new file mode 100644 index 0000000000..eb0962779c --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden @@ -0,0 +1,42 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Noargs_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; + +public class SyncChatShouldGenerateAsInternalNoargs { + + public static void main(String[] args) throws Exception { + syncChatShouldGenerateAsInternalNoargs(); + } + + public static void syncChatShouldGenerateAsInternalNoargs() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Noargs_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden new file mode 100644 index 0000000000..6307bfe9dd --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden @@ -0,0 +1,44 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_String_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncChatShouldGenerateAsInternalString { + + public static void main(String[] args) throws Exception { + syncChatShouldGenerateAsInternalString(); + } + + public static void syncChatShouldGenerateAsInternalString() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString(); + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_String_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden new file mode 100644 index 0000000000..1bbbc37523 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden @@ -0,0 +1,46 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicSettings; +import com.google.selective.generate.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 + EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings = + EchoServiceShouldGeneratePartialPublicSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create( + echoServiceShouldGeneratePartialPublicSettings); + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetCredentialsProvider_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden new file mode 100644 index 0000000000..e7b3026d77 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden @@ -0,0 +1,43 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetEndpoint_sync] +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicSettings; +import com.google.selective.generate.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 + EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings = + EchoServiceShouldGeneratePartialPublicSettings.newBuilder().setEndpoint(myEndpoint).build(); + EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create( + echoServiceShouldGeneratePartialPublicSettings); + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetEndpoint_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublic.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublic.golden new file mode 100644 index 0000000000..02533c5d40 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublic.golden @@ -0,0 +1,51 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_sync] +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncEchoShouldGenerateAsPublic { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsPublic(); + } + + public static void syncEchoShouldGenerateAsPublic() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(request); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicFoobarname.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicFoobarname.golden new file mode 100644 index 0000000000..586d181fe4 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicFoobarname.golden @@ -0,0 +1,44 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_Foobarname_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncEchoShouldGenerateAsPublicFoobarname { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsPublicFoobarname(); + } + + public static void syncEchoShouldGenerateAsPublicFoobarname() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]"); + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(name); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_Foobarname_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicNoargs.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicNoargs.golden new file mode 100644 index 0000000000..9e61ddb98b --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicNoargs.golden @@ -0,0 +1,42 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_Noargs_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; + +public class SyncEchoShouldGenerateAsPublicNoargs { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsPublicNoargs(); + } + + public static void syncEchoShouldGenerateAsPublicNoargs() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_Noargs_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicString.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicString.golden new file mode 100644 index 0000000000..a035c1000e --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsPublicString.golden @@ -0,0 +1,44 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_String_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncEchoShouldGenerateAsPublicString { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsPublicString(); + } + + public static void syncEchoShouldGenerateAsPublicString() 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 + try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = + EchoServiceShouldGeneratePartialPublicClient.create()) { + String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString(); + EchoResponse response = + echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(name); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsPublic_String_sync] diff --git a/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml b/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml new file mode 100644 index 0000000000..342617305a --- /dev/null +++ b/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml @@ -0,0 +1,27 @@ +type: google.api.Service +config_version: 3 +name: selective_api_generation_testing.googleapis.com +title: Selective Generation Testing API + +publishing: + # ... + library_settings: + - version: google.selective.generate.v1beta1 + java_settings: + common: + selective_gapic_generation: + methods: + - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllPublic.EchoShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllPublic.ChatShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllPublic.ChatAgainShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.EchoShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatAgainShouldGenerateAsPublic + generate_omitted_as_internal: true + reference_docs_uri: www.abc.net + destinations: + - PACKAGE_MANAGER + python_settings: + common: + destinations: + - PACKAGE_MANAGER diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java index b1c065a504..7492c30b72 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java @@ -214,7 +214,7 @@ public ConnectionServiceStub getStub() { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { ListConnectionsRequest request = @@ -246,7 +246,7 @@ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListConnectionsPagedResponse listConnections(String parent) { ListConnectionsRequest request = ListConnectionsRequest.newBuilder().setParent(parent).build(); @@ -279,7 +279,7 @@ public final ListConnectionsPagedResponse listConnections(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListConnectionsPagedResponse listConnections(ListConnectionsRequest request) { return listConnectionsPagedCallable().call(request); diff --git a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java index 60b3ef292c..283d320ca1 100644 --- a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java +++ b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java @@ -382,7 +382,7 @@ public final ServerStreamingCallable readRows * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations) { @@ -423,7 +423,7 @@ public final MutateRowResponse mutateRow( * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations) { @@ -468,7 +468,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -514,7 +514,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -554,7 +554,7 @@ public final MutateRowResponse mutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow(MutateRowRequest request) { return mutateRowCallable().call(request); @@ -663,7 +663,7 @@ public final ServerStreamingCallable muta * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -721,7 +721,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -782,7 +782,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -845,7 +845,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -893,7 +893,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request) { return checkAndMutateRowCallable().call(request); @@ -954,7 +954,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowReques * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(InstanceName name) { PingAndWarmRequest request = @@ -983,7 +983,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name) { * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(String name) { PingAndWarmRequest request = PingAndWarmRequest.newBuilder().setName(name).build(); @@ -1014,7 +1014,7 @@ public final PingAndWarmResponse pingAndWarm(String name) { * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfileId) { PingAndWarmRequest request = @@ -1049,7 +1049,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfil * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { PingAndWarmRequest request = @@ -1081,7 +1081,7 @@ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(PingAndWarmRequest request) { return pingAndWarmCallable().call(request); @@ -1149,7 +1149,7 @@ public final UnaryCallable pingAndWarmC * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, ByteString rowKey, List rules) { @@ -1194,7 +1194,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules) { @@ -1242,7 +1242,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, @@ -1294,7 +1294,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules, String appProfileId) { @@ -1336,7 +1336,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request) { return readModifyWriteRowCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java index 9c1bb3031a..4d38b8848f 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java @@ -256,7 +256,7 @@ public AddressesStub getStub() { * } * * @param project Project ID for this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AggregatedListPagedResponse aggregatedList(String project) { AggregatedListAddressesRequest request = @@ -294,7 +294,7 @@ public final AggregatedListPagedResponse aggregatedList(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesRequest request) { return aggregatedListPagedCallable().call(request); @@ -401,7 +401,7 @@ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesR * @param project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAsync( String project, String region, String address) { @@ -439,7 +439,7 @@ public final OperationFuture deleteAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAsync(DeleteAddressRequest request) { return deleteOperationCallable().futureCall(request); @@ -530,7 +530,7 @@ public final UnaryCallable deleteCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param addressResource The body resource for this request - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture insertAsync( String project, String region, Address addressResource) { @@ -568,7 +568,7 @@ public final OperationFuture insertAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture insertAsync(InsertAddressRequest request) { return insertOperationCallable().futureCall(request); @@ -667,7 +667,7 @@ public final UnaryCallable insertCallable() { * in reverse chronological order (newest result first). Use this to sort resources like * operations so that the newest operation is returned first. *

    Currently, only sorting by name or creationTimestamp desc is supported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPagedResponse list(String project, String region, String orderBy) { ListAddressesRequest request = @@ -708,7 +708,7 @@ public final ListPagedResponse list(String project, String region, String orderB * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPagedResponse list(ListAddressesRequest request) { return listPagedCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java index 07cfe43d0b..f11122b18e 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java @@ -209,7 +209,7 @@ public RegionOperationsStub getStub() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation get(String project, String region, String operation) { GetRegionOperationRequest request = @@ -245,7 +245,7 @@ public final Operation get(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation get(GetRegionOperationRequest request) { return getCallable().call(request); @@ -312,7 +312,7 @@ public final UnaryCallable getCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation wait(String project, String region, String operation) { WaitRegionOperationRequest request = @@ -357,7 +357,7 @@ public final Operation wait(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation wait(WaitRegionOperationRequest request) { return waitCallable().call(request); diff --git a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java index fdec74ebd7..e0d2d4a3e7 100644 --- a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java +++ b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java @@ -288,7 +288,7 @@ public IamCredentialsStub getStub() { * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateAccessTokenResponse generateAccessToken( ServiceAccountName name, List delegates, List scope, Duration lifetime) { @@ -342,7 +342,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateAccessTokenResponse generateAccessToken( String name, List delegates, List scope, Duration lifetime) { @@ -381,7 +381,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessTokenRequest request) { return generateAccessTokenCallable().call(request); @@ -457,7 +457,7 @@ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessToken * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateIdTokenResponse generateIdToken( ServiceAccountName name, List delegates, String audience, boolean includeEmail) { @@ -509,7 +509,7 @@ public final GenerateIdTokenResponse generateIdToken( * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateIdTokenResponse generateIdToken( String name, List delegates, String audience, boolean includeEmail) { @@ -548,7 +548,7 @@ public final GenerateIdTokenResponse generateIdToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest request) { return generateIdTokenCallable().call(request); @@ -619,7 +619,7 @@ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest requ * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignBlobResponse signBlob( ServiceAccountName name, List delegates, ByteString payload) { @@ -665,7 +665,7 @@ public final SignBlobResponse signBlob( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignBlobResponse signBlob(String name, List delegates, ByteString payload) { SignBlobRequest request = @@ -701,7 +701,7 @@ public final SignBlobResponse signBlob(String name, List delegates, Byte * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignBlobResponse signBlob(SignBlobRequest request) { return signBlobCallable().call(request); @@ -770,7 +770,7 @@ public final UnaryCallable signBlobCallable() * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignJwtResponse signJwt( ServiceAccountName name, List delegates, String payload) { @@ -816,7 +816,7 @@ public final SignJwtResponse signJwt( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignJwtResponse signJwt(String name, List delegates, String payload) { SignJwtRequest request = @@ -852,7 +852,7 @@ public final SignJwtResponse signJwt(String name, List delegates, String * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignJwtResponse signJwt(SignJwtRequest request) { return signJwtCallable().call(request); diff --git a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java index 5459928ec4..2813d9e10e 100644 --- a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java +++ b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java @@ -238,7 +238,7 @@ public IAMPolicyStub getStub() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -299,7 +299,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -362,7 +362,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java index 4cac1bc846..f2d809d6a6 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java @@ -703,7 +703,7 @@ public KeyManagementServiceStub getStub() { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { ListKeyRingsRequest request = @@ -736,7 +736,7 @@ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeyRingsPagedResponse listKeyRings(String parent) { ListKeyRingsRequest request = ListKeyRingsRequest.newBuilder().setParent(parent).build(); @@ -772,7 +772,7 @@ public final ListKeyRingsPagedResponse listKeyRings(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeyRingsPagedResponse listKeyRings(ListKeyRingsRequest request) { return listKeyRingsPagedCallable().call(request); @@ -879,7 +879,7 @@ public final UnaryCallable listKeyRin * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { ListCryptoKeysRequest request = @@ -912,7 +912,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { ListCryptoKeysRequest request = ListCryptoKeysRequest.newBuilder().setParent(parent).build(); @@ -948,7 +948,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest request) { return listCryptoKeysPagedCallable().call(request); @@ -1058,7 +1058,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest re * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyName parent) { ListCryptoKeyVersionsRequest request = @@ -1093,7 +1093,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyN * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String parent) { ListCryptoKeyVersionsRequest request = @@ -1133,7 +1133,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String par * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( ListCryptoKeyVersionsRequest request) { @@ -1246,7 +1246,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { ListImportJobsRequest request = @@ -1279,7 +1279,7 @@ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListImportJobsPagedResponse listImportJobs(String parent) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build(); @@ -1315,7 +1315,7 @@ public final ListImportJobsPagedResponse listImportJobs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) { return listImportJobsPagedCallable().call(request); @@ -1421,7 +1421,7 @@ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest re * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing getKeyRing(KeyRingName name) { GetKeyRingRequest request = @@ -1450,7 +1450,7 @@ public final KeyRing getKeyRing(KeyRingName name) { * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing getKeyRing(String name) { GetKeyRingRequest request = GetKeyRingRequest.newBuilder().setName(name).build(); @@ -1480,7 +1480,7 @@ public final KeyRing getKeyRing(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing getKeyRing(GetKeyRingRequest request) { return getKeyRingCallable().call(request); @@ -1539,7 +1539,7 @@ public final UnaryCallable getKeyRingCallable() { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey getCryptoKey(CryptoKeyName name) { GetCryptoKeyRequest request = @@ -1571,7 +1571,7 @@ public final CryptoKey getCryptoKey(CryptoKeyName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey getCryptoKey(String name) { GetCryptoKeyRequest request = GetCryptoKeyRequest.newBuilder().setName(name).build(); @@ -1605,7 +1605,7 @@ public final CryptoKey getCryptoKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey getCryptoKey(GetCryptoKeyRequest request) { return getCryptoKeyCallable().call(request); @@ -1667,7 +1667,7 @@ public final UnaryCallable getCryptoKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { GetCryptoKeyVersionRequest request = @@ -1701,7 +1701,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion getCryptoKeyVersion(String name) { GetCryptoKeyVersionRequest request = @@ -1739,7 +1739,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest request) { return getCryptoKeyVersionCallable().call(request); @@ -1808,7 +1808,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest req * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublicKey getPublicKey(CryptoKeyVersionName name) { GetPublicKeyRequest request = @@ -1843,7 +1843,7 @@ public final PublicKey getPublicKey(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublicKey getPublicKey(String name) { GetPublicKeyRequest request = GetPublicKeyRequest.newBuilder().setName(name).build(); @@ -1883,7 +1883,7 @@ public final PublicKey getPublicKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublicKey getPublicKey(GetPublicKeyRequest request) { return getPublicKeyCallable().call(request); @@ -1950,7 +1950,7 @@ public final UnaryCallable getPublicKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob getImportJob(ImportJobName name) { GetImportJobRequest request = @@ -1980,7 +1980,7 @@ public final ImportJob getImportJob(ImportJobName name) { * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob getImportJob(String name) { GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build(); @@ -2012,7 +2012,7 @@ public final ImportJob getImportJob(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob getImportJob(GetImportJobRequest request) { return getImportJobCallable().call(request); @@ -2075,7 +2075,7 @@ public final UnaryCallable getImportJobCallable( * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2113,7 +2113,7 @@ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRin * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2150,7 +2150,7 @@ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(CreateKeyRingRequest request) { return createKeyRingCallable().call(request); @@ -2220,7 +2220,7 @@ public final UnaryCallable createKeyRingCallable( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey createCryptoKey( KeyRingName parent, String cryptoKeyId, CryptoKey cryptoKey) { @@ -2266,7 +2266,7 @@ public final CryptoKey createCryptoKey( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, CryptoKey cryptoKey) { CreateCryptoKeyRequest request = @@ -2309,7 +2309,7 @@ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, Crypto * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey createCryptoKey(CreateCryptoKeyRequest request) { return createCryptoKeyCallable().call(request); @@ -2384,7 +2384,7 @@ public final UnaryCallable createCryptoKeyCal * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion createCryptoKeyVersion( CryptoKeyName parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2428,7 +2428,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion createCryptoKeyVersion( String parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2471,7 +2471,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionRequest request) { return createCryptoKeyVersionCallable().call(request); @@ -2546,7 +2546,7 @@ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionReque * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionRequest request) { return importCryptoKeyVersionCallable().call(request); @@ -2622,7 +2622,7 @@ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionReque * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob createImportJob( KeyRingName parent, String importJobId, ImportJob importJob) { @@ -2667,7 +2667,7 @@ public final ImportJob createImportJob( * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob createImportJob(String parent, String importJobId, ImportJob importJob) { CreateImportJobRequest request = @@ -2707,7 +2707,7 @@ public final ImportJob createImportJob(String parent, String importJobId, Import * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob createImportJob(CreateImportJobRequest request) { return createImportJobCallable().call(request); @@ -2769,7 +2769,7 @@ public final UnaryCallable createImportJobCal * * @param cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask) { UpdateCryptoKeyRequest request = @@ -2804,7 +2804,7 @@ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKey(UpdateCryptoKeyRequest request) { return updateCryptoKeyCallable().call(request); @@ -2872,7 +2872,7 @@ public final UnaryCallable updateCryptoKeyCal * @param cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with * updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion updateCryptoKeyVersion( CryptoKeyVersion cryptoKeyVersion, FieldMask updateMask) { @@ -2916,7 +2916,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request) { return updateCryptoKeyVersionCallable().call(request); @@ -2995,7 +2995,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionReque * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { EncryptRequest request = @@ -3041,7 +3041,7 @@ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EncryptResponse encrypt(String name, ByteString plaintext) { EncryptRequest request = @@ -3081,7 +3081,7 @@ public final EncryptResponse encrypt(String name, ByteString plaintext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EncryptResponse encrypt(EncryptRequest request) { return encryptCallable().call(request); @@ -3153,7 +3153,7 @@ public final UnaryCallable encryptCallable() { * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) { DecryptRequest request = @@ -3192,7 +3192,7 @@ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DecryptResponse decrypt(String name, ByteString ciphertext) { DecryptRequest request = @@ -3232,7 +3232,7 @@ public final DecryptResponse decrypt(String name, ByteString ciphertext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DecryptResponse decrypt(DecryptRequest request) { return decryptCallable().call(request); @@ -3306,7 +3306,7 @@ public final UnaryCallable decryptCallable() { * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Digest digest) { AsymmetricSignRequest request = @@ -3348,7 +3348,7 @@ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Di * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { AsymmetricSignRequest request = @@ -3391,7 +3391,7 @@ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request) { return asymmetricSignCallable().call(request); @@ -3469,7 +3469,7 @@ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricDecryptResponse asymmetricDecrypt( CryptoKeyVersionName name, ByteString ciphertext) { @@ -3512,7 +3512,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt( * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString ciphertext) { AsymmetricDecryptRequest request = @@ -3555,7 +3555,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptRequest request) { return asymmetricDecryptCallable().call(request); @@ -3632,7 +3632,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptReques * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKeyPrimaryVersion( CryptoKeyName name, String cryptoKeyVersionId) { @@ -3673,7 +3673,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) { UpdateCryptoKeyPrimaryVersionRequest request = @@ -3713,7 +3713,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoK * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKeyPrimaryVersion( UpdateCryptoKeyPrimaryVersionRequest request) { @@ -3792,7 +3792,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) { DestroyCryptoKeyVersionRequest request = @@ -3839,7 +3839,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { DestroyCryptoKeyVersionRequest request = @@ -3890,7 +3890,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request) { return destroyCryptoKeyVersionCallable().call(request); @@ -3976,7 +3976,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionReq * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) { RestoreCryptoKeyVersionRequest request = @@ -4017,7 +4017,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { RestoreCryptoKeyVersionRequest request = @@ -4062,7 +4062,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request) { return restoreCryptoKeyVersionCallable().call(request); @@ -4139,7 +4139,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -4206,7 +4206,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { return listLocationsPagedCallable().call(request); @@ -4308,7 +4308,7 @@ public final UnaryCallable listLoca * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Location getLocation(GetLocationRequest request) { return getLocationCallable().call(request); @@ -4367,7 +4367,7 @@ public final UnaryCallable getLocationCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java index 7dba4f5fdd..81a22204e8 100644 --- a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java +++ b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java @@ -420,7 +420,7 @@ public LibraryServiceStub getStub() { * } * * @param shelf The shelf to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf createShelf(Shelf shelf) { CreateShelfRequest request = CreateShelfRequest.newBuilder().setShelf(shelf).build(); @@ -447,7 +447,7 @@ public final Shelf createShelf(Shelf shelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf createShelf(CreateShelfRequest request) { return createShelfCallable().call(request); @@ -497,7 +497,7 @@ public final UnaryCallable createShelfCallable() { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf getShelf(ShelfName name) { GetShelfRequest request = @@ -524,7 +524,7 @@ public final Shelf getShelf(ShelfName name) { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf getShelf(String name) { GetShelfRequest request = GetShelfRequest.newBuilder().setName(name).build(); @@ -551,7 +551,7 @@ public final Shelf getShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf getShelf(GetShelfRequest request) { return getShelfCallable().call(request); @@ -608,7 +608,7 @@ public final UnaryCallable getShelfCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListShelvesPagedResponse listShelves(ListShelvesRequest request) { return listShelvesPagedCallable().call(request); @@ -703,7 +703,7 @@ public final UnaryCallable listShelvesC * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteShelf(ShelfName name) { DeleteShelfRequest request = @@ -730,7 +730,7 @@ public final void deleteShelf(ShelfName name) { * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteShelf(String name) { DeleteShelfRequest request = DeleteShelfRequest.newBuilder().setName(name).build(); @@ -757,7 +757,7 @@ public final void deleteShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteShelf(DeleteShelfRequest request) { deleteShelfCallable().call(request); @@ -814,7 +814,7 @@ public final UnaryCallable deleteShelfCallable() { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -851,7 +851,7 @@ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(ShelfName name, String otherShelf) { MergeShelvesRequest request = @@ -888,7 +888,7 @@ public final Shelf mergeShelves(ShelfName name, String otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(String name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -925,7 +925,7 @@ public final Shelf mergeShelves(String name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(String name, String otherShelf) { MergeShelvesRequest request = @@ -961,7 +961,7 @@ public final Shelf mergeShelves(String name, String otherShelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(MergeShelvesRequest request) { return mergeShelvesCallable().call(request); @@ -1021,7 +1021,7 @@ public final UnaryCallable mergeShelvesCallable() { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book createBook(ShelfName parent, Book book) { CreateBookRequest request = @@ -1053,7 +1053,7 @@ public final Book createBook(ShelfName parent, Book book) { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book createBook(String parent, Book book) { CreateBookRequest request = @@ -1084,7 +1084,7 @@ public final Book createBook(String parent, Book book) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book createBook(CreateBookRequest request) { return createBookCallable().call(request); @@ -1137,7 +1137,7 @@ public final UnaryCallable createBookCallable() { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(BookName name) { GetBookRequest request = @@ -1164,7 +1164,7 @@ public final Book getBook(BookName name) { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(String name) { GetBookRequest request = GetBookRequest.newBuilder().setName(name).build(); @@ -1191,7 +1191,7 @@ public final Book getBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(GetBookRequest request) { return getBookCallable().call(request); @@ -1245,7 +1245,7 @@ public final UnaryCallable getBookCallable() { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBooksPagedResponse listBooks(ShelfName parent) { ListBooksRequest request = @@ -1276,7 +1276,7 @@ public final ListBooksPagedResponse listBooks(ShelfName parent) { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBooksPagedResponse listBooks(String parent) { ListBooksRequest request = ListBooksRequest.newBuilder().setParent(parent).build(); @@ -1311,7 +1311,7 @@ public final ListBooksPagedResponse listBooks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBooksPagedResponse listBooks(ListBooksRequest request) { return listBooksPagedCallable().call(request); @@ -1409,7 +1409,7 @@ public final UnaryCallable listBooksCallabl * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBook(BookName name) { DeleteBookRequest request = @@ -1436,7 +1436,7 @@ public final void deleteBook(BookName name) { * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBook(String name) { DeleteBookRequest request = DeleteBookRequest.newBuilder().setName(name).build(); @@ -1465,7 +1465,7 @@ public final void deleteBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBook(DeleteBookRequest request) { deleteBookCallable().call(request); @@ -1520,7 +1520,7 @@ public final UnaryCallable deleteBookCallable() { * * @param book The name of the book to update. * @param updateMask Required. Mask of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book updateBook(Book book, FieldMask updateMask) { UpdateBookRequest request = @@ -1552,7 +1552,7 @@ public final Book updateBook(Book book, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book updateBook(UpdateBookRequest request) { return updateBookCallable().call(request); @@ -1609,7 +1609,7 @@ public final UnaryCallable updateBookCallable() { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(BookName name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1642,7 +1642,7 @@ public final Book moveBook(BookName name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(BookName name, String otherShelfName) { MoveBookRequest request = @@ -1675,7 +1675,7 @@ public final Book moveBook(BookName name, String otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(String name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1708,7 +1708,7 @@ public final Book moveBook(String name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(String name, String otherShelfName) { MoveBookRequest request = @@ -1740,7 +1740,7 @@ public final Book moveBook(String name, String otherShelfName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(MoveBookRequest request) { return moveBookCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java index dc70a130b5..c7ff1421c9 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java @@ -717,7 +717,7 @@ public final OperationsClient getOperationsClient() { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName parent) { ListBucketsRequest request = @@ -754,7 +754,7 @@ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName par * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { ListBucketsRequest request = @@ -791,7 +791,7 @@ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(LocationName parent) { ListBucketsRequest request = @@ -828,7 +828,7 @@ public final ListBucketsPagedResponse listBuckets(LocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName parent) { ListBucketsRequest request = @@ -865,7 +865,7 @@ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName paren * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -898,7 +898,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -998,7 +998,7 @@ public final UnaryCallable listBucketsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogBucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -1058,7 +1058,7 @@ public final UnaryCallable getBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogBucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1129,7 +1129,7 @@ public final UnaryCallable createBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogBucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1202,7 +1202,7 @@ public final UnaryCallable updateBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -1265,7 +1265,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void undeleteBucket(UndeleteBucketRequest request) { undeleteBucketCallable().call(request); @@ -1323,7 +1323,7 @@ public final UnaryCallable undeleteBucketCallable( * * @param parent Required. The bucket whose views are to be listed: *

    "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListViewsPagedResponse listViews(String parent) { ListViewsRequest request = ListViewsRequest.newBuilder().setParent(parent).build(); @@ -1356,7 +1356,7 @@ public final ListViewsPagedResponse listViews(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListViewsPagedResponse listViews(ListViewsRequest request) { return listViewsPagedCallable().call(request); @@ -1456,7 +1456,7 @@ public final UnaryCallable listViewsCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogView getView(GetViewRequest request) { return getViewCallable().call(request); @@ -1516,7 +1516,7 @@ public final UnaryCallable getViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogView createView(CreateViewRequest request) { return createViewCallable().call(request); @@ -1578,7 +1578,7 @@ public final UnaryCallable createViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogView updateView(UpdateViewRequest request) { return updateViewCallable().call(request); @@ -1643,7 +1643,7 @@ public final UnaryCallable updateViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteView(DeleteViewRequest request) { deleteViewCallable().call(request); @@ -1704,7 +1704,7 @@ public final UnaryCallable deleteViewCallable() { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { ListSinksRequest request = @@ -1735,7 +1735,7 @@ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(FolderName parent) { ListSinksRequest request = @@ -1766,7 +1766,7 @@ public final ListSinksPagedResponse listSinks(FolderName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(OrganizationName parent) { ListSinksRequest request = @@ -1797,7 +1797,7 @@ public final ListSinksPagedResponse listSinks(OrganizationName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(ProjectName parent) { ListSinksRequest request = @@ -1828,7 +1828,7 @@ public final ListSinksPagedResponse listSinks(ProjectName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(String parent) { ListSinksRequest request = ListSinksRequest.newBuilder().setParent(parent).build(); @@ -1861,7 +1861,7 @@ public final ListSinksPagedResponse listSinks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(ListSinksRequest request) { return listSinksPagedCallable().call(request); @@ -1961,7 +1961,7 @@ public final UnaryCallable listSinksCallabl * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink getSink(LogSinkName sinkName) { GetSinkRequest request = @@ -1996,7 +1996,7 @@ public final LogSink getSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink getSink(String sinkName) { GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2025,7 +2025,7 @@ public final LogSink getSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink getSink(GetSinkRequest request) { return getSinkCallable().call(request); @@ -2087,7 +2087,7 @@ public final UnaryCallable getSinkCallable() { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(BillingAccountName parent, LogSink sink) { CreateSinkRequest request = @@ -2127,7 +2127,7 @@ public final LogSink createSink(BillingAccountName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(FolderName parent, LogSink sink) { CreateSinkRequest request = @@ -2167,7 +2167,7 @@ public final LogSink createSink(FolderName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(OrganizationName parent, LogSink sink) { CreateSinkRequest request = @@ -2207,7 +2207,7 @@ public final LogSink createSink(OrganizationName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(ProjectName parent, LogSink sink) { CreateSinkRequest request = @@ -2247,7 +2247,7 @@ public final LogSink createSink(ProjectName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(String parent, LogSink sink) { CreateSinkRequest request = @@ -2282,7 +2282,7 @@ public final LogSink createSink(String parent, LogSink sink) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(CreateSinkRequest request) { return createSinkCallable().call(request); @@ -2353,7 +2353,7 @@ public final UnaryCallable createSinkCallable() { *

    `"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2397,7 +2397,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { *

    `"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(String sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2450,7 +2450,7 @@ public final LogSink updateSink(String sinkName, LogSink sink) { *

    For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

    For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2507,7 +2507,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask up *

    For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

    For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2548,7 +2548,7 @@ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateM * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(UpdateSinkRequest request) { return updateSinkCallable().call(request); @@ -2615,7 +2615,7 @@ public final UnaryCallable updateSinkCallable() { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSink(LogSinkName sinkName) { DeleteSinkRequest request = @@ -2652,7 +2652,7 @@ public final void deleteSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSink(String sinkName) { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2682,7 +2682,7 @@ public final void deleteSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSink(DeleteSinkRequest request) { deleteSinkCallable().call(request); @@ -2739,7 +2739,7 @@ public final UnaryCallable deleteSinkCallable() { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(BillingAccountName parent) { ListExclusionsRequest request = @@ -2772,7 +2772,7 @@ public final ListExclusionsPagedResponse listExclusions(BillingAccountName paren * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { ListExclusionsRequest request = @@ -2805,7 +2805,7 @@ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) { ListExclusionsRequest request = @@ -2838,7 +2838,7 @@ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { ListExclusionsRequest request = @@ -2871,7 +2871,7 @@ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(String parent) { ListExclusionsRequest request = ListExclusionsRequest.newBuilder().setParent(parent).build(); @@ -2904,7 +2904,7 @@ public final ListExclusionsPagedResponse listExclusions(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest request) { return listExclusionsPagedCallable().call(request); @@ -3007,7 +3007,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(LogExclusionName name) { GetExclusionRequest request = @@ -3040,7 +3040,7 @@ public final LogExclusion getExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(String name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name).build(); @@ -3070,7 +3070,7 @@ public final LogExclusion getExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(GetExclusionRequest request) { return getExclusionCallable().call(request); @@ -3131,7 +3131,7 @@ public final UnaryCallable getExclusionCallab *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3169,7 +3169,7 @@ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusio *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3207,7 +3207,7 @@ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclus *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3245,7 +3245,7 @@ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3283,7 +3283,7 @@ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclu *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3315,7 +3315,7 @@ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(CreateExclusionRequest request) { return createExclusionCallable().call(request); @@ -3385,7 +3385,7 @@ public final UnaryCallable createExclusion * mentioned in `update_mask` are not changed and are ignored in the request. *

    For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion updateExclusion( LogExclusionName name, LogExclusion exclusion, FieldMask updateMask) { @@ -3433,7 +3433,7 @@ public final LogExclusion updateExclusion( * mentioned in `update_mask` are not changed and are ignored in the request. *

    For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion updateExclusion( String name, LogExclusion exclusion, FieldMask updateMask) { @@ -3471,7 +3471,7 @@ public final LogExclusion updateExclusion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion updateExclusion(UpdateExclusionRequest request) { return updateExclusionCallable().call(request); @@ -3532,7 +3532,7 @@ public final UnaryCallable updateExclusion * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteExclusion(LogExclusionName name) { DeleteExclusionRequest request = @@ -3565,7 +3565,7 @@ public final void deleteExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteExclusion(String name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); @@ -3595,7 +3595,7 @@ public final void deleteExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteExclusion(DeleteExclusionRequest request) { deleteExclusionCallable().call(request); @@ -3658,7 +3658,7 @@ public final UnaryCallable deleteExclusionCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CmekSettings getCmekSettings(GetCmekSettingsRequest request) { return getCmekSettingsCallable().call(request); @@ -3734,7 +3734,7 @@ public final UnaryCallable getCmekSettings * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CmekSettings updateCmekSettings(UpdateCmekSettingsRequest request) { return updateCmekSettingsCallable().call(request); @@ -3817,7 +3817,7 @@ public final UnaryCallable updateCmekSe * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(SettingsName name) { GetSettingsRequest request = @@ -3860,7 +3860,7 @@ public final Settings getSettings(SettingsName name) { * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(String name) { GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); @@ -3897,7 +3897,7 @@ public final Settings getSettings(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(GetSettingsRequest request) { return getSettingsCallable().call(request); @@ -3978,7 +3978,7 @@ public final UnaryCallable getSettingsCallable() { * fields cannot be updated. *

    See [FieldMask][google.protobuf.FieldMask] for more information. *

    For example: `"updateMask=kmsKeyName"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings updateSettings(Settings settings, FieldMask updateMask) { UpdateSettingsRequest request = @@ -4022,7 +4022,7 @@ public final Settings updateSettings(Settings settings, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings updateSettings(UpdateSettingsRequest request) { return updateSettingsCallable().call(request); @@ -4093,7 +4093,7 @@ public final UnaryCallable updateSettingsCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture copyLogEntriesAsync( CopyLogEntriesRequest request) { diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java index 42f999ea2b..4dc90d0762 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java @@ -307,7 +307,7 @@ public LoggingServiceV2Stub getStub() { *

    `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

    For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLog(LogName logName) { DeleteLogRequest request = @@ -348,7 +348,7 @@ public final void deleteLog(LogName logName) { *

    `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

    For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLog(String logName) { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(logName).build(); @@ -380,7 +380,7 @@ public final void deleteLog(String logName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLog(DeleteLogRequest request) { deleteLogCallable().call(request); @@ -483,7 +483,7 @@ public final UnaryCallable deleteLogCallable() { * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( LogName logName, @@ -567,7 +567,7 @@ public final WriteLogEntriesResponse writeLogEntries( * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( String logName, @@ -614,7 +614,7 @@ public final WriteLogEntriesResponse writeLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { return writeLogEntriesCallable().call(request); @@ -709,7 +709,7 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ * order of increasing values of `LogEntry.timestamp` (oldest first), and the second option * returns entries in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogEntriesPagedResponse listLogEntries( List resourceNames, String filter, String orderBy) { @@ -752,7 +752,7 @@ public final ListLogEntriesPagedResponse listLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest request) { return listLogEntriesPagedCallable().call(request); @@ -863,7 +863,7 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request) { @@ -972,7 +972,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource *

  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { ListLogsRequest request = @@ -1009,7 +1009,7 @@ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(FolderName parent) { ListLogsRequest request = @@ -1046,7 +1046,7 @@ public final ListLogsPagedResponse listLogs(FolderName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(OrganizationName parent) { ListLogsRequest request = @@ -1083,7 +1083,7 @@ public final ListLogsPagedResponse listLogs(OrganizationName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(ProjectName parent) { ListLogsRequest request = @@ -1120,7 +1120,7 @@ public final ListLogsPagedResponse listLogs(ProjectName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(String parent) { ListLogsRequest request = ListLogsRequest.newBuilder().setParent(parent).build(); @@ -1155,7 +1155,7 @@ public final ListLogsPagedResponse listLogs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(ListLogsRequest request) { return listLogsPagedCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java index aa22c688d5..cbeed2501e 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java @@ -277,7 +277,7 @@ public MetricsServiceV2Stub getStub() { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { ListLogMetricsRequest request = @@ -309,7 +309,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder().setParent(parent).build(); @@ -342,7 +342,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest request) { return listLogMetricsPagedCallable().call(request); @@ -439,7 +439,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(LogMetricName metricName) { GetLogMetricRequest request = @@ -469,7 +469,7 @@ public final LogMetric getLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(String metricName) { GetLogMetricRequest request = @@ -499,7 +499,7 @@ public final LogMetric getLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(GetLogMetricRequest request) { return getLogMetricCallable().call(request); @@ -556,7 +556,7 @@ public final UnaryCallable getLogMetricCallable( *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { CreateLogMetricRequest request = @@ -591,7 +591,7 @@ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(String parent, LogMetric metric) { CreateLogMetricRequest request = @@ -622,7 +622,7 @@ public final LogMetric createLogMetric(String parent, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(CreateLogMetricRequest request) { return createLogMetricCallable().call(request); @@ -681,7 +681,7 @@ public final UnaryCallable createLogMetricCal * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -717,7 +717,7 @@ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metri * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -748,7 +748,7 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(UpdateLogMetricRequest request) { return updateLogMetricCallable().call(request); @@ -802,7 +802,7 @@ public final UnaryCallable updateLogMetricCal * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLogMetric(LogMetricName metricName) { DeleteLogMetricRequest request = @@ -832,7 +832,7 @@ public final void deleteLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLogMetric(String metricName) { DeleteLogMetricRequest request = @@ -862,7 +862,7 @@ public final void deleteLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLogMetric(DeleteLogMetricRequest request) { deleteLogMetricCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java index 28ebb54401..74d3f163da 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -437,7 +437,7 @@ public SchemaServiceStub getStub() { * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema createSchema(ProjectName parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -478,7 +478,7 @@ public final Schema createSchema(ProjectName parent, Schema schema, String schem * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema createSchema(String parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -514,7 +514,7 @@ public final Schema createSchema(String parent, Schema schema, String schemaId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema createSchema(CreateSchemaRequest request) { return createSchemaCallable().call(request); @@ -569,7 +569,7 @@ public final UnaryCallable createSchemaCallable() { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema getSchema(SchemaName name) { GetSchemaRequest request = @@ -597,7 +597,7 @@ public final Schema getSchema(SchemaName name) { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema getSchema(String name) { GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(name).build(); @@ -627,7 +627,7 @@ public final Schema getSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema getSchema(GetSchemaRequest request) { return getSchemaCallable().call(request); @@ -683,7 +683,7 @@ public final UnaryCallable getSchemaCallable() { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { ListSchemasRequest request = @@ -715,7 +715,7 @@ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemasPagedResponse listSchemas(String parent) { ListSchemasRequest request = ListSchemasRequest.newBuilder().setParent(parent).build(); @@ -749,7 +749,7 @@ public final ListSchemasPagedResponse listSchemas(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { return listSchemasPagedCallable().call(request); @@ -848,7 +848,7 @@ public final UnaryCallable listSchemasC * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName name) { ListSchemaRevisionsRequest request = @@ -879,7 +879,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName nam * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { ListSchemaRevisionsRequest request = @@ -914,7 +914,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( ListSchemaRevisionsRequest request) { @@ -1018,7 +1018,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema commitSchema(SchemaName name, Schema schema) { CommitSchemaRequest request = @@ -1051,7 +1051,7 @@ public final Schema commitSchema(SchemaName name, Schema schema) { * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema commitSchema(String name, Schema schema) { CommitSchemaRequest request = @@ -1082,7 +1082,7 @@ public final Schema commitSchema(String name, Schema schema) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema commitSchema(CommitSchemaRequest request) { return commitSchemaCallable().call(request); @@ -1139,7 +1139,7 @@ public final UnaryCallable commitSchemaCallable() { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema rollbackSchema(SchemaName name, String revisionId) { RollbackSchemaRequest request = @@ -1173,7 +1173,7 @@ public final Schema rollbackSchema(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema rollbackSchema(String name, String revisionId) { RollbackSchemaRequest request = @@ -1204,7 +1204,7 @@ public final Schema rollbackSchema(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema rollbackSchema(RollbackSchemaRequest request) { return rollbackSchemaCallable().call(request); @@ -1263,7 +1263,7 @@ public final UnaryCallable rollbackSchemaCallable * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1299,7 +1299,7 @@ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema deleteSchemaRevision(String name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1330,7 +1330,7 @@ public final Schema deleteSchemaRevision(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema deleteSchemaRevision(DeleteSchemaRevisionRequest request) { return deleteSchemaRevisionCallable().call(request); @@ -1385,7 +1385,7 @@ public final UnaryCallable deleteSchemaRevi * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSchema(SchemaName name) { DeleteSchemaRequest request = @@ -1413,7 +1413,7 @@ public final void deleteSchema(SchemaName name) { * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSchema(String name) { DeleteSchemaRequest request = DeleteSchemaRequest.newBuilder().setName(name).build(); @@ -1442,7 +1442,7 @@ public final void deleteSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSchema(DeleteSchemaRequest request) { deleteSchemaCallable().call(request); @@ -1497,7 +1497,7 @@ public final UnaryCallable deleteSchemaCallable() { * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema schema) { ValidateSchemaRequest request = @@ -1530,7 +1530,7 @@ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema sc * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) { ValidateSchemaRequest request = @@ -1561,7 +1561,7 @@ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request) { return validateSchemaCallable().call(request); @@ -1621,7 +1621,7 @@ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateMessageResponse validateMessage(ValidateMessageRequest request) { return validateMessageCallable().call(request); @@ -1684,7 +1684,7 @@ public final ValidateMessageResponse validateMessage(ValidateMessageRequest requ * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1745,7 +1745,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1808,7 +1808,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index b7a0f9da81..9539f92063 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -587,7 +587,7 @@ public SubscriberStub getStub() { * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -658,7 +658,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -729,7 +729,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( String name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -800,7 +800,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -860,7 +860,7 @@ public final Subscription createSubscription( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription(Subscription request) { return createSubscriptionCallable().call(request); @@ -938,7 +938,7 @@ public final UnaryCallable createSubscriptionCallabl * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription getSubscription(SubscriptionName subscription) { GetSubscriptionRequest request = @@ -968,7 +968,7 @@ public final Subscription getSubscription(SubscriptionName subscription) { * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription getSubscription(String subscription) { GetSubscriptionRequest request = @@ -998,7 +998,7 @@ public final Subscription getSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription getSubscription(GetSubscriptionRequest request) { return getSubscriptionCallable().call(request); @@ -1056,7 +1056,7 @@ public final UnaryCallable getSubscription * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription updateSubscription(UpdateSubscriptionRequest request) { return updateSubscriptionCallable().call(request); @@ -1114,7 +1114,7 @@ public final UnaryCallable updateSubscr * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName project) { ListSubscriptionsRequest request = @@ -1146,7 +1146,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName projec * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { ListSubscriptionsRequest request = @@ -1180,7 +1180,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsRequest request) { return listSubscriptionsPagedCallable().call(request); @@ -1282,7 +1282,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSubscription(SubscriptionName subscription) { DeleteSubscriptionRequest request = @@ -1315,7 +1315,7 @@ public final void deleteSubscription(SubscriptionName subscription) { * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSubscription(String subscription) { DeleteSubscriptionRequest request = @@ -1348,7 +1348,7 @@ public final void deleteSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSubscription(DeleteSubscriptionRequest request) { deleteSubscriptionCallable().call(request); @@ -1418,7 +1418,7 @@ public final UnaryCallable deleteSubscriptionC * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyAckDeadline( SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) { @@ -1464,7 +1464,7 @@ public final void modifyAckDeadline( * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyAckDeadline( String subscription, List ackIds, int ackDeadlineSeconds) { @@ -1504,7 +1504,7 @@ public final void modifyAckDeadline( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) { modifyAckDeadlineCallable().call(request); @@ -1570,7 +1570,7 @@ public final UnaryCallable modifyAckDeadlineCal * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void acknowledge(SubscriptionName subscription, List ackIds) { AcknowledgeRequest request = @@ -1608,7 +1608,7 @@ public final void acknowledge(SubscriptionName subscription, List ackIds * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void acknowledge(String subscription, List ackIds) { AcknowledgeRequest request = @@ -1643,7 +1643,7 @@ public final void acknowledge(String subscription, List ackIds) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void acknowledge(AcknowledgeRequest request) { acknowledgeCallable().call(request); @@ -1705,7 +1705,7 @@ public final UnaryCallable acknowledgeCallable() { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { PullRequest request = @@ -1740,7 +1740,7 @@ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(String subscription, int maxMessages) { PullRequest request = @@ -1780,7 +1780,7 @@ public final PullResponse pull(String subscription, int maxMessages) { * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull( SubscriptionName subscription, boolean returnImmediately, int maxMessages) { @@ -1825,7 +1825,7 @@ public final PullResponse pull( * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(String subscription, boolean returnImmediately, int maxMessages) { PullRequest request = @@ -1862,7 +1862,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(PullRequest request) { return pullCallable().call(request); @@ -1971,7 +1971,7 @@ public final UnaryCallable pullCallable() { *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2012,7 +2012,7 @@ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pus *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2051,7 +2051,7 @@ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(ModifyPushConfigRequest request) { modifyPushConfigCallable().call(request); @@ -2114,7 +2114,7 @@ public final UnaryCallable modifyPushConfigCalla * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot getSnapshot(SnapshotName snapshot) { GetSnapshotRequest request = @@ -2147,7 +2147,7 @@ public final Snapshot getSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot getSnapshot(String snapshot) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setSnapshot(snapshot).build(); @@ -2179,7 +2179,7 @@ public final Snapshot getSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot getSnapshot(GetSnapshotRequest request) { return getSnapshotCallable().call(request); @@ -2241,7 +2241,7 @@ public final UnaryCallable getSnapshotCallable() { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { ListSnapshotsRequest request = @@ -2276,7 +2276,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(String project) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setProject(project).build(); @@ -2312,7 +2312,7 @@ public final ListSnapshotsPagedResponse listSnapshots(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request) { return listSnapshotsPagedCallable().call(request); @@ -2438,7 +2438,7 @@ public final UnaryCallable listSnap * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2491,7 +2491,7 @@ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscri * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(SnapshotName name, String subscription) { CreateSnapshotRequest request = @@ -2544,7 +2544,7 @@ public final Snapshot createSnapshot(SnapshotName name, String subscription) { * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(String name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2597,7 +2597,7 @@ public final Snapshot createSnapshot(String name, SubscriptionName subscription) * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(String name, String subscription) { CreateSnapshotRequest request = @@ -2640,7 +2640,7 @@ public final Snapshot createSnapshot(String name, String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(CreateSnapshotRequest request) { return createSnapshotCallable().call(request); @@ -2713,7 +2713,7 @@ public final UnaryCallable createSnapshotCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot updateSnapshot(UpdateSnapshotRequest request) { return updateSnapshotCallable().call(request); @@ -2777,7 +2777,7 @@ public final UnaryCallable updateSnapshotCallab * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(SnapshotName snapshot) { DeleteSnapshotRequest request = @@ -2813,7 +2813,7 @@ public final void deleteSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(String snapshot) { DeleteSnapshotRequest request = @@ -2849,7 +2849,7 @@ public final void deleteSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(DeleteSnapshotRequest request) { deleteSnapshotCallable().call(request); @@ -2916,7 +2916,7 @@ public final UnaryCallable deleteSnapshotCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SeekResponse seek(SeekRequest request) { return seekCallable().call(request); @@ -2980,7 +2980,7 @@ public final UnaryCallable seekCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -3041,7 +3041,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -3104,7 +3104,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java index 9e4d8f0752..485cf3b3da 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -406,7 +406,7 @@ public PublisherStub getStub() { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic createTopic(TopicName name) { Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); @@ -437,7 +437,7 @@ public final Topic createTopic(TopicName name) { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic createTopic(String name) { Topic request = Topic.newBuilder().setName(name).build(); @@ -473,7 +473,7 @@ public final Topic createTopic(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic createTopic(Topic request) { return createTopicCallable().call(request); @@ -536,7 +536,7 @@ public final UnaryCallable createTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic updateTopic(UpdateTopicRequest request) { return updateTopicCallable().call(request); @@ -592,7 +592,7 @@ public final UnaryCallable updateTopicCallable() { * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublishResponse publish(TopicName topic, List messages) { PublishRequest request = @@ -625,7 +625,7 @@ public final PublishResponse publish(TopicName topic, List messag * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublishResponse publish(String topic, List messages) { PublishRequest request = @@ -656,7 +656,7 @@ public final PublishResponse publish(String topic, List messages) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublishResponse publish(PublishRequest request) { return publishCallable().call(request); @@ -710,7 +710,7 @@ public final UnaryCallable publishCallable() { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic getTopic(TopicName topic) { GetTopicRequest request = @@ -738,7 +738,7 @@ public final Topic getTopic(TopicName topic) { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic getTopic(String topic) { GetTopicRequest request = GetTopicRequest.newBuilder().setTopic(topic).build(); @@ -767,7 +767,7 @@ public final Topic getTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic getTopic(GetTopicRequest request) { return getTopicCallable().call(request); @@ -822,7 +822,7 @@ public final UnaryCallable getTopicCallable() { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicsPagedResponse listTopics(ProjectName project) { ListTopicsRequest request = @@ -854,7 +854,7 @@ public final ListTopicsPagedResponse listTopics(ProjectName project) { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicsPagedResponse listTopics(String project) { ListTopicsRequest request = ListTopicsRequest.newBuilder().setProject(project).build(); @@ -887,7 +887,7 @@ public final ListTopicsPagedResponse listTopics(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicsPagedResponse listTopics(ListTopicsRequest request) { return listTopicsPagedCallable().call(request); @@ -984,7 +984,7 @@ public final UnaryCallable listTopicsCall * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicName topic) { ListTopicSubscriptionsRequest request = @@ -1016,7 +1016,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicNam * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String topic) { ListTopicSubscriptionsRequest request = @@ -1050,7 +1050,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( ListTopicSubscriptionsRequest request) { @@ -1155,7 +1155,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) { ListTopicSnapshotsRequest request = @@ -1190,7 +1190,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { ListTopicSnapshotsRequest request = @@ -1227,7 +1227,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( ListTopicSnapshotsRequest request) { @@ -1336,7 +1336,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTopic(TopicName topic) { DeleteTopicRequest request = @@ -1367,7 +1367,7 @@ public final void deleteTopic(TopicName topic) { * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTopic(String topic) { DeleteTopicRequest request = DeleteTopicRequest.newBuilder().setTopic(topic).build(); @@ -1399,7 +1399,7 @@ public final void deleteTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTopic(DeleteTopicRequest request) { deleteTopicCallable().call(request); @@ -1459,7 +1459,7 @@ public final UnaryCallable deleteTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionRequest request) { return detachSubscriptionCallable().call(request); @@ -1522,7 +1522,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1583,7 +1583,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1646,7 +1646,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java index a79e735944..7da5fc69f8 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -477,7 +477,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(LocationName parent) { ListInstancesRequest request = @@ -519,7 +519,7 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(String parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); @@ -562,7 +562,7 @@ public final ListInstancesPagedResponse listInstances(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { return listInstancesPagedCallable().call(request); @@ -680,7 +680,7 @@ public final UnaryCallable listInst * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = @@ -709,7 +709,7 @@ public final Instance getInstance(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); @@ -738,7 +738,7 @@ public final Instance getInstance(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(GetInstanceRequest request) { return getInstanceCallable().call(request); @@ -793,7 +793,7 @@ public final UnaryCallable getInstanceCallable() { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final InstanceAuthString getInstanceAuthString(InstanceName name) { GetInstanceAuthStringRequest request = @@ -825,7 +825,7 @@ public final InstanceAuthString getInstanceAuthString(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final InstanceAuthString getInstanceAuthString(String name) { GetInstanceAuthStringRequest request = @@ -856,7 +856,7 @@ public final InstanceAuthString getInstanceAuthString(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringRequest request) { return getInstanceAuthStringCallable().call(request); @@ -936,7 +936,7 @@ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringReque * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( LocationName parent, String instanceId, Instance instance) { @@ -993,7 +993,7 @@ public final OperationFuture createInstanceAsync( * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( String parent, String instanceId, Instance instance) { @@ -1041,7 +1041,7 @@ public final OperationFuture createInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync(CreateInstanceRequest request) { return createInstanceOperationCallable().futureCall(request); @@ -1158,7 +1158,7 @@ public final UnaryCallable createInstanceCalla *

    * `displayName` * `labels` * `memorySizeGb` * `redisConfig` * * `replica_count` * @param instance Required. Update description. Only fields specified in update_mask are updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateInstanceAsync( FieldMask updateMask, Instance instance) { @@ -1194,7 +1194,7 @@ public final OperationFuture updateInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateInstanceAsync(UpdateInstanceRequest request) { return updateInstanceOperationCallable().futureCall(request); @@ -1289,7 +1289,7 @@ public final UnaryCallable updateInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeInstanceAsync( InstanceName name, String redisVersion) { @@ -1324,7 +1324,7 @@ public final OperationFuture upgradeInstanceAsync( * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeInstanceAsync( String name, String redisVersion) { @@ -1356,7 +1356,7 @@ public final OperationFuture upgradeInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeInstanceAsync(UpgradeInstanceRequest request) { return upgradeInstanceOperationCallable().futureCall(request); @@ -1449,7 +1449,7 @@ public final UnaryCallable upgradeInstanceCal * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param inputConfig Required. Specify data to be imported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture importInstanceAsync( String name, InputConfig inputConfig) { @@ -1487,7 +1487,7 @@ public final OperationFuture importInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture importInstanceAsync(ImportInstanceRequest request) { return importInstanceOperationCallable().futureCall(request); @@ -1591,7 +1591,7 @@ public final UnaryCallable importInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param outputConfig Required. Specify data to be exported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture exportInstanceAsync( String name, OutputConfig outputConfig) { @@ -1628,7 +1628,7 @@ public final OperationFuture exportInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture exportInstanceAsync(ExportInstanceRequest request) { return exportInstanceOperationCallable().futureCall(request); @@ -1728,7 +1728,7 @@ public final UnaryCallable exportInstanceCalla * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture failoverInstanceAsync( InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1766,7 +1766,7 @@ public final OperationFuture failoverInstanceAsync( * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture failoverInstanceAsync( String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1801,7 +1801,7 @@ public final OperationFuture failoverInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture failoverInstanceAsync( FailoverInstanceRequest request) { @@ -1887,7 +1887,7 @@ public final UnaryCallable failoverInstanceC * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteInstanceAsync(InstanceName name) { DeleteInstanceRequest request = @@ -1916,7 +1916,7 @@ public final OperationFuture deleteInstanceAsync(InstanceName name) * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteInstanceAsync(String name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); @@ -1945,7 +1945,7 @@ public final OperationFuture deleteInstanceAsync(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteInstanceAsync(DeleteInstanceRequest request) { return deleteInstanceOperationCallable().futureCall(request); @@ -2036,7 +2036,7 @@ public final UnaryCallable deleteInstanceCalla * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture rescheduleMaintenanceAsync( InstanceName name, @@ -2080,7 +2080,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture rescheduleMaintenanceAsync( String name, @@ -2118,7 +2118,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture rescheduleMaintenanceAsync( RescheduleMaintenanceRequest request) { diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java index b25eb42986..a95c284ea3 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java @@ -734,7 +734,7 @@ public StorageStub getStub() { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(BucketName name) { DeleteBucketRequest request = @@ -761,7 +761,7 @@ public final void deleteBucket(BucketName name) { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(String name) { DeleteBucketRequest request = DeleteBucketRequest.newBuilder().setName(name).build(); @@ -792,7 +792,7 @@ public final void deleteBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -846,7 +846,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket getBucket(BucketName name) { GetBucketRequest request = @@ -873,7 +873,7 @@ public final Bucket getBucket(BucketName name) { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket getBucket(String name) { GetBucketRequest request = GetBucketRequest.newBuilder().setName(name).build(); @@ -905,7 +905,7 @@ public final Bucket getBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -968,7 +968,7 @@ public final UnaryCallable getBucketCallable() { * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1007,7 +1007,7 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1045,7 +1045,7 @@ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1103,7 +1103,7 @@ public final UnaryCallable createBucketCallable() { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { ListBucketsRequest request = @@ -1134,7 +1134,7 @@ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -1169,7 +1169,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -1268,7 +1268,7 @@ public final UnaryCallable listBucketsC * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { LockBucketRetentionPolicyRequest request = @@ -1297,7 +1297,7 @@ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket lockBucketRetentionPolicy(String bucket) { LockBucketRetentionPolicyRequest request = @@ -1328,7 +1328,7 @@ public final Bucket lockBucketRetentionPolicy(String bucket) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest request) { return lockBucketRetentionPolicyCallable().call(request); @@ -1387,7 +1387,7 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(ResourceName resource) { GetIamPolicyRequest request = @@ -1420,7 +1420,7 @@ public final Policy getIamPolicy(ResourceName resource) { * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(String resource) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); @@ -1454,7 +1454,7 @@ public final Policy getIamPolicy(String resource) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1519,7 +1519,7 @@ public final UnaryCallable getIamPolicyCallable() { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(ResourceName resource, Policy policy) { SetIamPolicyRequest request = @@ -1557,7 +1557,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(String resource, Policy policy) { SetIamPolicyRequest request = @@ -1593,7 +1593,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1660,7 +1660,7 @@ public final UnaryCallable setIamPolicyCallable() { * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions( ResourceName resource, List permissions) { @@ -1700,7 +1700,7 @@ public final TestIamPermissionsResponse testIamPermissions( * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions( String resource, List permissions) { @@ -1740,7 +1740,7 @@ public final TestIamPermissionsResponse testIamPermissions( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); @@ -1809,7 +1809,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { UpdateBucketRequest request = @@ -1844,7 +1844,7 @@ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1901,7 +1901,7 @@ public final UnaryCallable updateBucketCallable() { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotification(NotificationName name) { DeleteNotificationRequest request = @@ -1930,7 +1930,7 @@ public final void deleteNotification(NotificationName name) { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotification(String name) { DeleteNotificationRequest request = @@ -1960,7 +1960,7 @@ public final void deleteNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotification(DeleteNotificationRequest request) { deleteNotificationCallable().call(request); @@ -2013,7 +2013,7 @@ public final UnaryCallable deleteNotificationC * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification getNotification(BucketName name) { GetNotificationRequest request = @@ -2041,7 +2041,7 @@ public final Notification getNotification(BucketName name) { * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification getNotification(String name) { GetNotificationRequest request = GetNotificationRequest.newBuilder().setName(name).build(); @@ -2070,7 +2070,7 @@ public final Notification getNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification getNotification(GetNotificationRequest request) { return getNotificationCallable().call(request); @@ -2126,7 +2126,7 @@ public final UnaryCallable getNotification * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification createNotification(ProjectName parent, Notification notification) { CreateNotificationRequest request = @@ -2160,7 +2160,7 @@ public final Notification createNotification(ProjectName parent, Notification no * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification createNotification(String parent, Notification notification) { CreateNotificationRequest request = @@ -2196,7 +2196,7 @@ public final Notification createNotification(String parent, Notification notific * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification createNotification(CreateNotificationRequest request) { return createNotificationCallable().call(request); @@ -2254,7 +2254,7 @@ public final UnaryCallable createNotifi * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(ProjectName parent) { ListNotificationsRequest request = @@ -2285,7 +2285,7 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(String parent) { ListNotificationsRequest request = @@ -2319,7 +2319,7 @@ public final ListNotificationsPagedResponse listNotifications(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(ListNotificationsRequest request) { return listNotificationsPagedCallable().call(request); @@ -2429,7 +2429,7 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object composeObject(ComposeObjectRequest request) { return composeObjectCallable().call(request); @@ -2494,7 +2494,7 @@ public final UnaryCallable composeObjectCallable() * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. The name of the finalized object to delete. Note: If you want to delete * an unfinalized resumable upload please use `CancelResumableWrite`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(String bucket, String object) { DeleteObjectRequest request = @@ -2528,7 +2528,7 @@ public final void deleteObject(String bucket, String object) { * an unfinalized resumable upload please use `CancelResumableWrite`. * @param generation If present, permanently deletes a specific revision of this object (as * opposed to the latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(String bucket, String object, long generation) { DeleteObjectRequest request = @@ -2570,7 +2570,7 @@ public final void deleteObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(DeleteObjectRequest request) { deleteObjectCallable().call(request); @@ -2631,7 +2631,7 @@ public final UnaryCallable deleteObjectCallable() { * * @param uploadId Required. The upload_id of the resumable upload to cancel. This should be * copied from the `upload_id` field of `StartResumableWriteResponse`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) { CancelResumableWriteRequest request = @@ -2659,7 +2659,7 @@ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CancelResumableWriteResponse cancelResumableWrite( CancelResumableWriteRequest request) { @@ -2714,7 +2714,7 @@ public final CancelResumableWriteResponse cancelResumableWrite( * * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. Name of the object. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(String bucket, String object) { GetObjectRequest request = @@ -2746,7 +2746,7 @@ public final Object getObject(String bucket, String object) { * @param object Required. Name of the object. * @param generation If present, selects a specific revision of this object (as opposed to the * latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(String bucket, String object, long generation) { GetObjectRequest request = @@ -2788,7 +2788,7 @@ public final Object getObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(GetObjectRequest request) { return getObjectCallable().call(request); @@ -2897,7 +2897,7 @@ public final ServerStreamingCallable read * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object updateObject(Object object, FieldMask updateMask) { UpdateObjectRequest request = @@ -2934,7 +2934,7 @@ public final Object updateObject(Object object, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object updateObject(UpdateObjectRequest request) { return updateObjectCallable().call(request); @@ -3082,7 +3082,7 @@ public final UnaryCallable updateObjectCallable() { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListObjectsPagedResponse listObjects(ProjectName parent) { ListObjectsRequest request = @@ -3113,7 +3113,7 @@ public final ListObjectsPagedResponse listObjects(ProjectName parent) { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListObjectsPagedResponse listObjects(String parent) { ListObjectsRequest request = ListObjectsRequest.newBuilder().setParent(parent).build(); @@ -3153,7 +3153,7 @@ public final ListObjectsPagedResponse listObjects(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListObjectsPagedResponse listObjects(ListObjectsRequest request) { return listObjectsPagedCallable().call(request); @@ -3289,7 +3289,7 @@ public final UnaryCallable listObjectsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RewriteResponse rewriteObject(RewriteObjectRequest request) { return rewriteObjectCallable().call(request); @@ -3371,7 +3371,7 @@ public final UnaryCallable rewriteObjectC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final StartResumableWriteResponse startResumableWrite(StartResumableWriteRequest request) { return startResumableWriteCallable().call(request); @@ -3439,7 +3439,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite * * @param uploadId Required. The name of the resume token for the object whose write status is * being requested. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { QueryWriteStatusRequest request = @@ -3480,7 +3480,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest request) { return queryWriteStatusCallable().call(request); @@ -3546,7 +3546,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServiceAccount getServiceAccount(ProjectName project) { GetServiceAccountRequest request = @@ -3576,7 +3576,7 @@ public final ServiceAccount getServiceAccount(ProjectName project) { * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServiceAccount getServiceAccount(String project) { GetServiceAccountRequest request = @@ -3606,7 +3606,7 @@ public final ServiceAccount getServiceAccount(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServiceAccount getServiceAccount(GetServiceAccountRequest request) { return getServiceAccountCallable().call(request); @@ -3663,7 +3663,7 @@ public final UnaryCallable getServiceA * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CreateHmacKeyResponse createHmacKey( ProjectName project, String serviceAccountEmail) { @@ -3698,7 +3698,7 @@ public final CreateHmacKeyResponse createHmacKey( * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CreateHmacKeyResponse createHmacKey(String project, String serviceAccountEmail) { CreateHmacKeyRequest request = @@ -3732,7 +3732,7 @@ public final CreateHmacKeyResponse createHmacKey(String project, String serviceA * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) { return createHmacKeyCallable().call(request); @@ -3790,7 +3790,7 @@ public final UnaryCallable createHm * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteHmacKey(String accessId, ProjectName project) { DeleteHmacKeyRequest request = @@ -3824,7 +3824,7 @@ public final void deleteHmacKey(String accessId, ProjectName project) { * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteHmacKey(String accessId, String project) { DeleteHmacKeyRequest request = @@ -3855,7 +3855,7 @@ public final void deleteHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteHmacKey(DeleteHmacKeyRequest request) { deleteHmacKeyCallable().call(request); @@ -3912,7 +3912,7 @@ public final UnaryCallable deleteHmacKeyCallable() * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { GetHmacKeyRequest request = @@ -3946,7 +3946,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata getHmacKey(String accessId, String project) { GetHmacKeyRequest request = @@ -3977,7 +3977,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) { return getHmacKeyCallable().call(request); @@ -4034,7 +4034,7 @@ public final UnaryCallable getHmacKeyCallabl * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { ListHmacKeysRequest request = @@ -4067,7 +4067,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHmacKeysPagedResponse listHmacKeys(String project) { ListHmacKeysRequest request = ListHmacKeysRequest.newBuilder().setProject(project).build(); @@ -4102,7 +4102,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request) { return listHmacKeysPagedCallable().call(request); @@ -4207,7 +4207,7 @@ public final UnaryCallable listHmacKe * used to identify the key. * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the * `state` field is updated to the value specified in `hmac_key`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) { UpdateHmacKeyRequest request = @@ -4238,7 +4238,7 @@ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask up * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) { return updateHmacKeyCallable().call(request); From 734efa9ceb015cc316d7e25a8d18cffe327347cb Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 1 Apr 2025 19:43:19 -0700 Subject: [PATCH 03/21] add golden test files --- .../v1/ConnectionServiceClient.java | 6 +- .../cloud/asset/v1/AssetServiceClient.java | 88 +++++------ .../data/v2/BaseBigtableDataClient.java | 40 ++--- .../compute/v1small/AddressesClient.java | 16 +- .../v1small/RegionOperationsClient.java | 8 +- .../credentials/v1/IamCredentialsClient.java | 24 +-- .../com/google/iam/v1/IAMPolicyClient.java | 6 +- .../kms/v1/KeyManagementServiceClient.java | 138 ++++++++--------- .../library/v1/LibraryServiceClient.java | 66 ++++---- .../google/cloud/logging/v2/ConfigClient.java | 138 ++++++++--------- .../cloud/logging/v2/LoggingClient.java | 30 ++-- .../cloud/logging/v2/MetricsClient.java | 30 ++-- .../cloud/pubsub/v1/SchemaServiceClient.java | 62 ++++---- .../pubsub/v1/SubscriptionAdminClient.java | 96 ++++++------ .../cloud/pubsub/v1/TopicAdminClient.java | 52 +++---- .../cloud/redis/v1beta1/CloudRedisClient.java | 60 +++---- .../com/google/storage/v2/StorageClient.java | 146 +++++++++--------- 17 files changed, 503 insertions(+), 503 deletions(-) diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java index 7492c30b72..b1c065a504 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java @@ -214,7 +214,7 @@ public ConnectionServiceStub getStub() { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { ListConnectionsRequest request = @@ -246,7 +246,7 @@ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListConnectionsPagedResponse listConnections(String parent) { ListConnectionsRequest request = ListConnectionsRequest.newBuilder().setParent(parent).build(); @@ -279,7 +279,7 @@ public final ListConnectionsPagedResponse listConnections(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListConnectionsPagedResponse listConnections(ListConnectionsRequest request) { return listConnectionsPagedCallable().call(request); diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java index a1c65853fb..d93f39939e 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java @@ -590,7 +590,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture exportAssetsAsync( ExportAssetsRequest request) { @@ -701,7 +701,7 @@ public final UnaryCallable exportAssetsCallable( * Format: "organizations/[organization-number]" (such as "organizations/123"), * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListAssetsPagedResponse listAssets(ResourceName parent) { ListAssetsRequest request = @@ -733,7 +733,7 @@ public final ListAssetsPagedResponse listAssets(ResourceName parent) { * Format: "organizations/[organization-number]" (such as "organizations/123"), * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListAssetsPagedResponse listAssets(String parent) { ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); @@ -770,7 +770,7 @@ public final ListAssetsPagedResponse listAssets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { return listAssetsPagedCallable().call(request); @@ -883,7 +883,7 @@ public final UnaryCallable listAssetsCall * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( BatchGetAssetsHistoryRequest request) { @@ -949,7 +949,7 @@ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( * created in. It can only be an organization number (such as "organizations/123"), a folder * number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a * project number (such as "projects/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed createFeed(String parent) { CreateFeedRequest request = CreateFeedRequest.newBuilder().setParent(parent).build(); @@ -980,7 +980,7 @@ public final Feed createFeed(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed createFeed(CreateFeedRequest request) { return createFeedCallable().call(request); @@ -1036,7 +1036,7 @@ public final UnaryCallable createFeedCallable() { * @param name Required. The name of the Feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed getFeed(FeedName name) { GetFeedRequest request = @@ -1065,7 +1065,7 @@ public final Feed getFeed(FeedName name) { * @param name Required. The name of the Feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed getFeed(String name) { GetFeedRequest request = GetFeedRequest.newBuilder().setName(name).build(); @@ -1094,7 +1094,7 @@ public final Feed getFeed(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed getFeed(GetFeedRequest request) { return getFeedCallable().call(request); @@ -1148,7 +1148,7 @@ public final UnaryCallable getFeedCallable() { * @param parent Required. The parent project/folder/organization whose feeds are to be listed. It * can only be using project/folder/organization number (such as "folders/12345")", or a * project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListFeedsResponse listFeeds(String parent) { ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent(parent).build(); @@ -1175,7 +1175,7 @@ public final ListFeedsResponse listFeeds(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListFeedsResponse listFeeds(ListFeedsRequest request) { return listFeedsCallable().call(request); @@ -1228,7 +1228,7 @@ public final UnaryCallable listFeedsCallabl * @param feed Required. The new values of feed details. It must match an existing feed and the * field `name` must be in the format of: projects/project_number/feeds/feed_id or * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed updateFeed(Feed feed) { UpdateFeedRequest request = UpdateFeedRequest.newBuilder().setFeed(feed).build(); @@ -1258,7 +1258,7 @@ public final Feed updateFeed(Feed feed) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Feed updateFeed(UpdateFeedRequest request) { return updateFeedCallable().call(request); @@ -1313,7 +1313,7 @@ public final UnaryCallable updateFeedCallable() { * @param name Required. The name of the feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteFeed(FeedName name) { DeleteFeedRequest request = @@ -1342,7 +1342,7 @@ public final void deleteFeed(FeedName name) { * @param name Required. The name of the feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteFeed(String name) { DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); @@ -1371,7 +1371,7 @@ public final void deleteFeed(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteFeed(DeleteFeedRequest request) { deleteFeedCallable().call(request); @@ -1500,7 +1500,7 @@ public final UnaryCallable deleteFeedCallable() { *

    See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular * expression syntax. If the regular expression does not match any supported asset type, an * INVALID_ARGUMENT error will be returned. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SearchAllResourcesPagedResponse searchAllResources( String scope, String query, List assetTypes) { @@ -1546,7 +1546,7 @@ public final SearchAllResourcesPagedResponse searchAllResources( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SearchAllResourcesPagedResponse searchAllResources( SearchAllResourcesRequest request) { @@ -1712,7 +1712,7 @@ public final SearchAllResourcesPagedResponse searchAllResources( * "user". * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) { SearchAllIamPoliciesRequest request = @@ -1752,7 +1752,7 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( SearchAllIamPoliciesRequest request) { @@ -1866,7 +1866,7 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest request) { return analyzeIamPolicyCallable().call(request); @@ -1935,7 +1935,7 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture< AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> @@ -2049,7 +2049,7 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AnalyzeMoveResponse analyzeMove(AnalyzeMoveRequest request) { return analyzeMoveCallable().call(request); @@ -2124,7 +2124,7 @@ public final UnaryCallable analyzeMoveC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final QueryAssetsResponse queryAssets(QueryAssetsRequest request) { return queryAssetsCallable().call(request); @@ -2204,7 +2204,7 @@ public final UnaryCallable queryAssetsC *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery createSavedQuery( FolderName parent, SavedQuery savedQuery, String savedQueryId) { @@ -2248,7 +2248,7 @@ public final SavedQuery createSavedQuery( *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery createSavedQuery( OrganizationName parent, SavedQuery savedQuery, String savedQueryId) { @@ -2292,7 +2292,7 @@ public final SavedQuery createSavedQuery( *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery createSavedQuery( ProjectName parent, SavedQuery savedQuery, String savedQueryId) { @@ -2336,7 +2336,7 @@ public final SavedQuery createSavedQuery( *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery createSavedQuery( String parent, SavedQuery savedQuery, String savedQueryId) { @@ -2373,7 +2373,7 @@ public final SavedQuery createSavedQuery( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery createSavedQuery(CreateSavedQueryRequest request) { return createSavedQueryCallable().call(request); @@ -2434,7 +2434,7 @@ public final UnaryCallable createSavedQuery *

  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery getSavedQuery(SavedQueryName name) { GetSavedQueryRequest request = @@ -2467,7 +2467,7 @@ public final SavedQuery getSavedQuery(SavedQueryName name) { *
  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery getSavedQuery(String name) { GetSavedQueryRequest request = GetSavedQueryRequest.newBuilder().setName(name).build(); @@ -2497,7 +2497,7 @@ public final SavedQuery getSavedQuery(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery getSavedQuery(GetSavedQueryRequest request) { return getSavedQueryCallable().call(request); @@ -2554,7 +2554,7 @@ public final UnaryCallable getSavedQueryCallab * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSavedQueriesPagedResponse listSavedQueries(FolderName parent) { ListSavedQueriesRequest request = @@ -2587,7 +2587,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(FolderName parent) { * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSavedQueriesPagedResponse listSavedQueries(OrganizationName parent) { ListSavedQueriesRequest request = @@ -2620,7 +2620,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(OrganizationName par * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSavedQueriesPagedResponse listSavedQueries(ProjectName parent) { ListSavedQueriesRequest request = @@ -2653,7 +2653,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(ProjectName parent) * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSavedQueriesPagedResponse listSavedQueries(String parent) { ListSavedQueriesRequest request = @@ -2688,7 +2688,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSavedQueriesPagedResponse listSavedQueries(ListSavedQueriesRequest request) { return listSavedQueriesPagedCallable().call(request); @@ -2798,7 +2798,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(ListSavedQueriesRequ * * * @param updateMask Required. The list of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery updateSavedQuery(SavedQuery savedQuery, FieldMask updateMask) { UpdateSavedQueryRequest request = @@ -2832,7 +2832,7 @@ public final SavedQuery updateSavedQuery(SavedQuery savedQuery, FieldMask update * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SavedQuery updateSavedQuery(UpdateSavedQueryRequest request) { return updateSavedQueryCallable().call(request); @@ -2892,7 +2892,7 @@ public final UnaryCallable updateSavedQuery *
  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSavedQuery(SavedQueryName name) { DeleteSavedQueryRequest request = @@ -2925,7 +2925,7 @@ public final void deleteSavedQuery(SavedQueryName name) { *
  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSavedQuery(String name) { DeleteSavedQueryRequest request = DeleteSavedQueryRequest.newBuilder().setName(name).build(); @@ -2955,7 +2955,7 @@ public final void deleteSavedQuery(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSavedQuery(DeleteSavedQueryRequest request) { deleteSavedQueryCallable().call(request); @@ -3013,7 +3013,7 @@ public final UnaryCallable deleteSavedQueryCalla * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final BatchGetEffectiveIamPoliciesResponse batchGetEffectiveIamPolicies( BatchGetEffectiveIamPoliciesRequest request) { diff --git a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java index 283d320ca1..60b3ef292c 100644 --- a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java +++ b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java @@ -382,7 +382,7 @@ public final ServerStreamingCallable readRows * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations) { @@ -423,7 +423,7 @@ public final MutateRowResponse mutateRow( * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations) { @@ -468,7 +468,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -514,7 +514,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -554,7 +554,7 @@ public final MutateRowResponse mutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final MutateRowResponse mutateRow(MutateRowRequest request) { return mutateRowCallable().call(request); @@ -663,7 +663,7 @@ public final ServerStreamingCallable muta * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -721,7 +721,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -782,7 +782,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -845,7 +845,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -893,7 +893,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request) { return checkAndMutateRowCallable().call(request); @@ -954,7 +954,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowReques * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(InstanceName name) { PingAndWarmRequest request = @@ -983,7 +983,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name) { * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(String name) { PingAndWarmRequest request = PingAndWarmRequest.newBuilder().setName(name).build(); @@ -1014,7 +1014,7 @@ public final PingAndWarmResponse pingAndWarm(String name) { * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfileId) { PingAndWarmRequest request = @@ -1049,7 +1049,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfil * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { PingAndWarmRequest request = @@ -1081,7 +1081,7 @@ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PingAndWarmResponse pingAndWarm(PingAndWarmRequest request) { return pingAndWarmCallable().call(request); @@ -1149,7 +1149,7 @@ public final UnaryCallable pingAndWarmC * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, ByteString rowKey, List rules) { @@ -1194,7 +1194,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules) { @@ -1242,7 +1242,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, @@ -1294,7 +1294,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules, String appProfileId) { @@ -1336,7 +1336,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request) { return readModifyWriteRowCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java index 4d38b8848f..9c1bb3031a 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java @@ -256,7 +256,7 @@ public AddressesStub getStub() { * } * * @param project Project ID for this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AggregatedListPagedResponse aggregatedList(String project) { AggregatedListAddressesRequest request = @@ -294,7 +294,7 @@ public final AggregatedListPagedResponse aggregatedList(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesRequest request) { return aggregatedListPagedCallable().call(request); @@ -401,7 +401,7 @@ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesR * @param project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteAsync( String project, String region, String address) { @@ -439,7 +439,7 @@ public final OperationFuture deleteAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteAsync(DeleteAddressRequest request) { return deleteOperationCallable().futureCall(request); @@ -530,7 +530,7 @@ public final UnaryCallable deleteCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param addressResource The body resource for this request - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture insertAsync( String project, String region, Address addressResource) { @@ -568,7 +568,7 @@ public final OperationFuture insertAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture insertAsync(InsertAddressRequest request) { return insertOperationCallable().futureCall(request); @@ -667,7 +667,7 @@ public final UnaryCallable insertCallable() { * in reverse chronological order (newest result first). Use this to sort resources like * operations so that the newest operation is returned first. *

    Currently, only sorting by name or creationTimestamp desc is supported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListPagedResponse list(String project, String region, String orderBy) { ListAddressesRequest request = @@ -708,7 +708,7 @@ public final ListPagedResponse list(String project, String region, String orderB * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListPagedResponse list(ListAddressesRequest request) { return listPagedCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java index f11122b18e..07cfe43d0b 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java @@ -209,7 +209,7 @@ public RegionOperationsStub getStub() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation get(String project, String region, String operation) { GetRegionOperationRequest request = @@ -245,7 +245,7 @@ public final Operation get(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation get(GetRegionOperationRequest request) { return getCallable().call(request); @@ -312,7 +312,7 @@ public final UnaryCallable getCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation wait(String project, String region, String operation) { WaitRegionOperationRequest request = @@ -357,7 +357,7 @@ public final Operation wait(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Operation wait(WaitRegionOperationRequest request) { return waitCallable().call(request); diff --git a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java index e0d2d4a3e7..fdec74ebd7 100644 --- a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java +++ b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java @@ -288,7 +288,7 @@ public IamCredentialsStub getStub() { * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateAccessTokenResponse generateAccessToken( ServiceAccountName name, List delegates, List scope, Duration lifetime) { @@ -342,7 +342,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateAccessTokenResponse generateAccessToken( String name, List delegates, List scope, Duration lifetime) { @@ -381,7 +381,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessTokenRequest request) { return generateAccessTokenCallable().call(request); @@ -457,7 +457,7 @@ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessToken * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateIdTokenResponse generateIdToken( ServiceAccountName name, List delegates, String audience, boolean includeEmail) { @@ -509,7 +509,7 @@ public final GenerateIdTokenResponse generateIdToken( * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateIdTokenResponse generateIdToken( String name, List delegates, String audience, boolean includeEmail) { @@ -548,7 +548,7 @@ public final GenerateIdTokenResponse generateIdToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest request) { return generateIdTokenCallable().call(request); @@ -619,7 +619,7 @@ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest requ * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignBlobResponse signBlob( ServiceAccountName name, List delegates, ByteString payload) { @@ -665,7 +665,7 @@ public final SignBlobResponse signBlob( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignBlobResponse signBlob(String name, List delegates, ByteString payload) { SignBlobRequest request = @@ -701,7 +701,7 @@ public final SignBlobResponse signBlob(String name, List delegates, Byte * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignBlobResponse signBlob(SignBlobRequest request) { return signBlobCallable().call(request); @@ -770,7 +770,7 @@ public final UnaryCallable signBlobCallable() * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignJwtResponse signJwt( ServiceAccountName name, List delegates, String payload) { @@ -816,7 +816,7 @@ public final SignJwtResponse signJwt( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignJwtResponse signJwt(String name, List delegates, String payload) { SignJwtRequest request = @@ -852,7 +852,7 @@ public final SignJwtResponse signJwt(String name, List delegates, String * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SignJwtResponse signJwt(SignJwtRequest request) { return signJwtCallable().call(request); diff --git a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java index 2813d9e10e..5459928ec4 100644 --- a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java +++ b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java @@ -238,7 +238,7 @@ public IAMPolicyStub getStub() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -299,7 +299,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -362,7 +362,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java index f2d809d6a6..4cac1bc846 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java @@ -703,7 +703,7 @@ public KeyManagementServiceStub getStub() { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { ListKeyRingsRequest request = @@ -736,7 +736,7 @@ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListKeyRingsPagedResponse listKeyRings(String parent) { ListKeyRingsRequest request = ListKeyRingsRequest.newBuilder().setParent(parent).build(); @@ -772,7 +772,7 @@ public final ListKeyRingsPagedResponse listKeyRings(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListKeyRingsPagedResponse listKeyRings(ListKeyRingsRequest request) { return listKeyRingsPagedCallable().call(request); @@ -879,7 +879,7 @@ public final UnaryCallable listKeyRin * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { ListCryptoKeysRequest request = @@ -912,7 +912,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { ListCryptoKeysRequest request = ListCryptoKeysRequest.newBuilder().setParent(parent).build(); @@ -948,7 +948,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest request) { return listCryptoKeysPagedCallable().call(request); @@ -1058,7 +1058,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest re * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyName parent) { ListCryptoKeyVersionsRequest request = @@ -1093,7 +1093,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyN * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String parent) { ListCryptoKeyVersionsRequest request = @@ -1133,7 +1133,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String par * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( ListCryptoKeyVersionsRequest request) { @@ -1246,7 +1246,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { ListImportJobsRequest request = @@ -1279,7 +1279,7 @@ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListImportJobsPagedResponse listImportJobs(String parent) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build(); @@ -1315,7 +1315,7 @@ public final ListImportJobsPagedResponse listImportJobs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) { return listImportJobsPagedCallable().call(request); @@ -1421,7 +1421,7 @@ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest re * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing getKeyRing(KeyRingName name) { GetKeyRingRequest request = @@ -1450,7 +1450,7 @@ public final KeyRing getKeyRing(KeyRingName name) { * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing getKeyRing(String name) { GetKeyRingRequest request = GetKeyRingRequest.newBuilder().setName(name).build(); @@ -1480,7 +1480,7 @@ public final KeyRing getKeyRing(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing getKeyRing(GetKeyRingRequest request) { return getKeyRingCallable().call(request); @@ -1539,7 +1539,7 @@ public final UnaryCallable getKeyRingCallable() { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey getCryptoKey(CryptoKeyName name) { GetCryptoKeyRequest request = @@ -1571,7 +1571,7 @@ public final CryptoKey getCryptoKey(CryptoKeyName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey getCryptoKey(String name) { GetCryptoKeyRequest request = GetCryptoKeyRequest.newBuilder().setName(name).build(); @@ -1605,7 +1605,7 @@ public final CryptoKey getCryptoKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey getCryptoKey(GetCryptoKeyRequest request) { return getCryptoKeyCallable().call(request); @@ -1667,7 +1667,7 @@ public final UnaryCallable getCryptoKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { GetCryptoKeyVersionRequest request = @@ -1701,7 +1701,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion getCryptoKeyVersion(String name) { GetCryptoKeyVersionRequest request = @@ -1739,7 +1739,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest request) { return getCryptoKeyVersionCallable().call(request); @@ -1808,7 +1808,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest req * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublicKey getPublicKey(CryptoKeyVersionName name) { GetPublicKeyRequest request = @@ -1843,7 +1843,7 @@ public final PublicKey getPublicKey(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublicKey getPublicKey(String name) { GetPublicKeyRequest request = GetPublicKeyRequest.newBuilder().setName(name).build(); @@ -1883,7 +1883,7 @@ public final PublicKey getPublicKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublicKey getPublicKey(GetPublicKeyRequest request) { return getPublicKeyCallable().call(request); @@ -1950,7 +1950,7 @@ public final UnaryCallable getPublicKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob getImportJob(ImportJobName name) { GetImportJobRequest request = @@ -1980,7 +1980,7 @@ public final ImportJob getImportJob(ImportJobName name) { * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob getImportJob(String name) { GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build(); @@ -2012,7 +2012,7 @@ public final ImportJob getImportJob(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob getImportJob(GetImportJobRequest request) { return getImportJobCallable().call(request); @@ -2075,7 +2075,7 @@ public final UnaryCallable getImportJobCallable( * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2113,7 +2113,7 @@ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRin * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2150,7 +2150,7 @@ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final KeyRing createKeyRing(CreateKeyRingRequest request) { return createKeyRingCallable().call(request); @@ -2220,7 +2220,7 @@ public final UnaryCallable createKeyRingCallable( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey createCryptoKey( KeyRingName parent, String cryptoKeyId, CryptoKey cryptoKey) { @@ -2266,7 +2266,7 @@ public final CryptoKey createCryptoKey( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, CryptoKey cryptoKey) { CreateCryptoKeyRequest request = @@ -2309,7 +2309,7 @@ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, Crypto * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey createCryptoKey(CreateCryptoKeyRequest request) { return createCryptoKeyCallable().call(request); @@ -2384,7 +2384,7 @@ public final UnaryCallable createCryptoKeyCal * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion createCryptoKeyVersion( CryptoKeyName parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2428,7 +2428,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion createCryptoKeyVersion( String parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2471,7 +2471,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionRequest request) { return createCryptoKeyVersionCallable().call(request); @@ -2546,7 +2546,7 @@ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionReque * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionRequest request) { return importCryptoKeyVersionCallable().call(request); @@ -2622,7 +2622,7 @@ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionReque * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob createImportJob( KeyRingName parent, String importJobId, ImportJob importJob) { @@ -2667,7 +2667,7 @@ public final ImportJob createImportJob( * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob createImportJob(String parent, String importJobId, ImportJob importJob) { CreateImportJobRequest request = @@ -2707,7 +2707,7 @@ public final ImportJob createImportJob(String parent, String importJobId, Import * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ImportJob createImportJob(CreateImportJobRequest request) { return createImportJobCallable().call(request); @@ -2769,7 +2769,7 @@ public final UnaryCallable createImportJobCal * * @param cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask) { UpdateCryptoKeyRequest request = @@ -2804,7 +2804,7 @@ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKey(UpdateCryptoKeyRequest request) { return updateCryptoKeyCallable().call(request); @@ -2872,7 +2872,7 @@ public final UnaryCallable updateCryptoKeyCal * @param cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with * updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion updateCryptoKeyVersion( CryptoKeyVersion cryptoKeyVersion, FieldMask updateMask) { @@ -2916,7 +2916,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request) { return updateCryptoKeyVersionCallable().call(request); @@ -2995,7 +2995,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionReque * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { EncryptRequest request = @@ -3041,7 +3041,7 @@ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EncryptResponse encrypt(String name, ByteString plaintext) { EncryptRequest request = @@ -3081,7 +3081,7 @@ public final EncryptResponse encrypt(String name, ByteString plaintext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final EncryptResponse encrypt(EncryptRequest request) { return encryptCallable().call(request); @@ -3153,7 +3153,7 @@ public final UnaryCallable encryptCallable() { * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) { DecryptRequest request = @@ -3192,7 +3192,7 @@ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DecryptResponse decrypt(String name, ByteString ciphertext) { DecryptRequest request = @@ -3232,7 +3232,7 @@ public final DecryptResponse decrypt(String name, ByteString ciphertext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DecryptResponse decrypt(DecryptRequest request) { return decryptCallable().call(request); @@ -3306,7 +3306,7 @@ public final UnaryCallable decryptCallable() { * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Digest digest) { AsymmetricSignRequest request = @@ -3348,7 +3348,7 @@ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Di * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { AsymmetricSignRequest request = @@ -3391,7 +3391,7 @@ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request) { return asymmetricSignCallable().call(request); @@ -3469,7 +3469,7 @@ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricDecryptResponse asymmetricDecrypt( CryptoKeyVersionName name, ByteString ciphertext) { @@ -3512,7 +3512,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt( * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString ciphertext) { AsymmetricDecryptRequest request = @@ -3555,7 +3555,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptRequest request) { return asymmetricDecryptCallable().call(request); @@ -3632,7 +3632,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptReques * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKeyPrimaryVersion( CryptoKeyName name, String cryptoKeyVersionId) { @@ -3673,7 +3673,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) { UpdateCryptoKeyPrimaryVersionRequest request = @@ -3713,7 +3713,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoK * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKey updateCryptoKeyPrimaryVersion( UpdateCryptoKeyPrimaryVersionRequest request) { @@ -3792,7 +3792,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) { DestroyCryptoKeyVersionRequest request = @@ -3839,7 +3839,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { DestroyCryptoKeyVersionRequest request = @@ -3890,7 +3890,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request) { return destroyCryptoKeyVersionCallable().call(request); @@ -3976,7 +3976,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionReq * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) { RestoreCryptoKeyVersionRequest request = @@ -4017,7 +4017,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { RestoreCryptoKeyVersionRequest request = @@ -4062,7 +4062,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request) { return restoreCryptoKeyVersionCallable().call(request); @@ -4139,7 +4139,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -4206,7 +4206,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { return listLocationsPagedCallable().call(request); @@ -4308,7 +4308,7 @@ public final UnaryCallable listLoca * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Location getLocation(GetLocationRequest request) { return getLocationCallable().call(request); @@ -4367,7 +4367,7 @@ public final UnaryCallable getLocationCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java index 81a22204e8..7dba4f5fdd 100644 --- a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java +++ b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java @@ -420,7 +420,7 @@ public LibraryServiceStub getStub() { * } * * @param shelf The shelf to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf createShelf(Shelf shelf) { CreateShelfRequest request = CreateShelfRequest.newBuilder().setShelf(shelf).build(); @@ -447,7 +447,7 @@ public final Shelf createShelf(Shelf shelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf createShelf(CreateShelfRequest request) { return createShelfCallable().call(request); @@ -497,7 +497,7 @@ public final UnaryCallable createShelfCallable() { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf getShelf(ShelfName name) { GetShelfRequest request = @@ -524,7 +524,7 @@ public final Shelf getShelf(ShelfName name) { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf getShelf(String name) { GetShelfRequest request = GetShelfRequest.newBuilder().setName(name).build(); @@ -551,7 +551,7 @@ public final Shelf getShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf getShelf(GetShelfRequest request) { return getShelfCallable().call(request); @@ -608,7 +608,7 @@ public final UnaryCallable getShelfCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListShelvesPagedResponse listShelves(ListShelvesRequest request) { return listShelvesPagedCallable().call(request); @@ -703,7 +703,7 @@ public final UnaryCallable listShelvesC * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteShelf(ShelfName name) { DeleteShelfRequest request = @@ -730,7 +730,7 @@ public final void deleteShelf(ShelfName name) { * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteShelf(String name) { DeleteShelfRequest request = DeleteShelfRequest.newBuilder().setName(name).build(); @@ -757,7 +757,7 @@ public final void deleteShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteShelf(DeleteShelfRequest request) { deleteShelfCallable().call(request); @@ -814,7 +814,7 @@ public final UnaryCallable deleteShelfCallable() { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -851,7 +851,7 @@ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(ShelfName name, String otherShelf) { MergeShelvesRequest request = @@ -888,7 +888,7 @@ public final Shelf mergeShelves(ShelfName name, String otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(String name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -925,7 +925,7 @@ public final Shelf mergeShelves(String name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(String name, String otherShelf) { MergeShelvesRequest request = @@ -961,7 +961,7 @@ public final Shelf mergeShelves(String name, String otherShelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Shelf mergeShelves(MergeShelvesRequest request) { return mergeShelvesCallable().call(request); @@ -1021,7 +1021,7 @@ public final UnaryCallable mergeShelvesCallable() { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book createBook(ShelfName parent, Book book) { CreateBookRequest request = @@ -1053,7 +1053,7 @@ public final Book createBook(ShelfName parent, Book book) { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book createBook(String parent, Book book) { CreateBookRequest request = @@ -1084,7 +1084,7 @@ public final Book createBook(String parent, Book book) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book createBook(CreateBookRequest request) { return createBookCallable().call(request); @@ -1137,7 +1137,7 @@ public final UnaryCallable createBookCallable() { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(BookName name) { GetBookRequest request = @@ -1164,7 +1164,7 @@ public final Book getBook(BookName name) { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(String name) { GetBookRequest request = GetBookRequest.newBuilder().setName(name).build(); @@ -1191,7 +1191,7 @@ public final Book getBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book getBook(GetBookRequest request) { return getBookCallable().call(request); @@ -1245,7 +1245,7 @@ public final UnaryCallable getBookCallable() { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBooksPagedResponse listBooks(ShelfName parent) { ListBooksRequest request = @@ -1276,7 +1276,7 @@ public final ListBooksPagedResponse listBooks(ShelfName parent) { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBooksPagedResponse listBooks(String parent) { ListBooksRequest request = ListBooksRequest.newBuilder().setParent(parent).build(); @@ -1311,7 +1311,7 @@ public final ListBooksPagedResponse listBooks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBooksPagedResponse listBooks(ListBooksRequest request) { return listBooksPagedCallable().call(request); @@ -1409,7 +1409,7 @@ public final UnaryCallable listBooksCallabl * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBook(BookName name) { DeleteBookRequest request = @@ -1436,7 +1436,7 @@ public final void deleteBook(BookName name) { * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBook(String name) { DeleteBookRequest request = DeleteBookRequest.newBuilder().setName(name).build(); @@ -1465,7 +1465,7 @@ public final void deleteBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBook(DeleteBookRequest request) { deleteBookCallable().call(request); @@ -1520,7 +1520,7 @@ public final UnaryCallable deleteBookCallable() { * * @param book The name of the book to update. * @param updateMask Required. Mask of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book updateBook(Book book, FieldMask updateMask) { UpdateBookRequest request = @@ -1552,7 +1552,7 @@ public final Book updateBook(Book book, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book updateBook(UpdateBookRequest request) { return updateBookCallable().call(request); @@ -1609,7 +1609,7 @@ public final UnaryCallable updateBookCallable() { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(BookName name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1642,7 +1642,7 @@ public final Book moveBook(BookName name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(BookName name, String otherShelfName) { MoveBookRequest request = @@ -1675,7 +1675,7 @@ public final Book moveBook(BookName name, String otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(String name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1708,7 +1708,7 @@ public final Book moveBook(String name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(String name, String otherShelfName) { MoveBookRequest request = @@ -1740,7 +1740,7 @@ public final Book moveBook(String name, String otherShelfName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Book moveBook(MoveBookRequest request) { return moveBookCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java index c7ff1421c9..dc70a130b5 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java @@ -717,7 +717,7 @@ public final OperationsClient getOperationsClient() { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName parent) { ListBucketsRequest request = @@ -754,7 +754,7 @@ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName par * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { ListBucketsRequest request = @@ -791,7 +791,7 @@ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(LocationName parent) { ListBucketsRequest request = @@ -828,7 +828,7 @@ public final ListBucketsPagedResponse listBuckets(LocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName parent) { ListBucketsRequest request = @@ -865,7 +865,7 @@ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName paren * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -898,7 +898,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -998,7 +998,7 @@ public final UnaryCallable listBucketsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogBucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -1058,7 +1058,7 @@ public final UnaryCallable getBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogBucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1129,7 +1129,7 @@ public final UnaryCallable createBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogBucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1202,7 +1202,7 @@ public final UnaryCallable updateBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -1265,7 +1265,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void undeleteBucket(UndeleteBucketRequest request) { undeleteBucketCallable().call(request); @@ -1323,7 +1323,7 @@ public final UnaryCallable undeleteBucketCallable( * * @param parent Required. The bucket whose views are to be listed: *

    "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListViewsPagedResponse listViews(String parent) { ListViewsRequest request = ListViewsRequest.newBuilder().setParent(parent).build(); @@ -1356,7 +1356,7 @@ public final ListViewsPagedResponse listViews(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListViewsPagedResponse listViews(ListViewsRequest request) { return listViewsPagedCallable().call(request); @@ -1456,7 +1456,7 @@ public final UnaryCallable listViewsCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogView getView(GetViewRequest request) { return getViewCallable().call(request); @@ -1516,7 +1516,7 @@ public final UnaryCallable getViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogView createView(CreateViewRequest request) { return createViewCallable().call(request); @@ -1578,7 +1578,7 @@ public final UnaryCallable createViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogView updateView(UpdateViewRequest request) { return updateViewCallable().call(request); @@ -1643,7 +1643,7 @@ public final UnaryCallable updateViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteView(DeleteViewRequest request) { deleteViewCallable().call(request); @@ -1704,7 +1704,7 @@ public final UnaryCallable deleteViewCallable() { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { ListSinksRequest request = @@ -1735,7 +1735,7 @@ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(FolderName parent) { ListSinksRequest request = @@ -1766,7 +1766,7 @@ public final ListSinksPagedResponse listSinks(FolderName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(OrganizationName parent) { ListSinksRequest request = @@ -1797,7 +1797,7 @@ public final ListSinksPagedResponse listSinks(OrganizationName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(ProjectName parent) { ListSinksRequest request = @@ -1828,7 +1828,7 @@ public final ListSinksPagedResponse listSinks(ProjectName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(String parent) { ListSinksRequest request = ListSinksRequest.newBuilder().setParent(parent).build(); @@ -1861,7 +1861,7 @@ public final ListSinksPagedResponse listSinks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSinksPagedResponse listSinks(ListSinksRequest request) { return listSinksPagedCallable().call(request); @@ -1961,7 +1961,7 @@ public final UnaryCallable listSinksCallabl * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink getSink(LogSinkName sinkName) { GetSinkRequest request = @@ -1996,7 +1996,7 @@ public final LogSink getSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink getSink(String sinkName) { GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2025,7 +2025,7 @@ public final LogSink getSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink getSink(GetSinkRequest request) { return getSinkCallable().call(request); @@ -2087,7 +2087,7 @@ public final UnaryCallable getSinkCallable() { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(BillingAccountName parent, LogSink sink) { CreateSinkRequest request = @@ -2127,7 +2127,7 @@ public final LogSink createSink(BillingAccountName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(FolderName parent, LogSink sink) { CreateSinkRequest request = @@ -2167,7 +2167,7 @@ public final LogSink createSink(FolderName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(OrganizationName parent, LogSink sink) { CreateSinkRequest request = @@ -2207,7 +2207,7 @@ public final LogSink createSink(OrganizationName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(ProjectName parent, LogSink sink) { CreateSinkRequest request = @@ -2247,7 +2247,7 @@ public final LogSink createSink(ProjectName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(String parent, LogSink sink) { CreateSinkRequest request = @@ -2282,7 +2282,7 @@ public final LogSink createSink(String parent, LogSink sink) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink createSink(CreateSinkRequest request) { return createSinkCallable().call(request); @@ -2353,7 +2353,7 @@ public final UnaryCallable createSinkCallable() { *

    `"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2397,7 +2397,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { *

    `"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(String sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2450,7 +2450,7 @@ public final LogSink updateSink(String sinkName, LogSink sink) { *

    For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

    For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2507,7 +2507,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask up *

    For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

    For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2548,7 +2548,7 @@ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateM * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogSink updateSink(UpdateSinkRequest request) { return updateSinkCallable().call(request); @@ -2615,7 +2615,7 @@ public final UnaryCallable updateSinkCallable() { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSink(LogSinkName sinkName) { DeleteSinkRequest request = @@ -2652,7 +2652,7 @@ public final void deleteSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSink(String sinkName) { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2682,7 +2682,7 @@ public final void deleteSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSink(DeleteSinkRequest request) { deleteSinkCallable().call(request); @@ -2739,7 +2739,7 @@ public final UnaryCallable deleteSinkCallable() { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(BillingAccountName parent) { ListExclusionsRequest request = @@ -2772,7 +2772,7 @@ public final ListExclusionsPagedResponse listExclusions(BillingAccountName paren * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { ListExclusionsRequest request = @@ -2805,7 +2805,7 @@ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) { ListExclusionsRequest request = @@ -2838,7 +2838,7 @@ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { ListExclusionsRequest request = @@ -2871,7 +2871,7 @@ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(String parent) { ListExclusionsRequest request = ListExclusionsRequest.newBuilder().setParent(parent).build(); @@ -2904,7 +2904,7 @@ public final ListExclusionsPagedResponse listExclusions(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest request) { return listExclusionsPagedCallable().call(request); @@ -3007,7 +3007,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion getExclusion(LogExclusionName name) { GetExclusionRequest request = @@ -3040,7 +3040,7 @@ public final LogExclusion getExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion getExclusion(String name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name).build(); @@ -3070,7 +3070,7 @@ public final LogExclusion getExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion getExclusion(GetExclusionRequest request) { return getExclusionCallable().call(request); @@ -3131,7 +3131,7 @@ public final UnaryCallable getExclusionCallab *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3169,7 +3169,7 @@ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusio *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3207,7 +3207,7 @@ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclus *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3245,7 +3245,7 @@ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3283,7 +3283,7 @@ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclu *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3315,7 +3315,7 @@ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion createExclusion(CreateExclusionRequest request) { return createExclusionCallable().call(request); @@ -3385,7 +3385,7 @@ public final UnaryCallable createExclusion * mentioned in `update_mask` are not changed and are ignored in the request. *

    For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion updateExclusion( LogExclusionName name, LogExclusion exclusion, FieldMask updateMask) { @@ -3433,7 +3433,7 @@ public final LogExclusion updateExclusion( * mentioned in `update_mask` are not changed and are ignored in the request. *

    For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion updateExclusion( String name, LogExclusion exclusion, FieldMask updateMask) { @@ -3471,7 +3471,7 @@ public final LogExclusion updateExclusion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogExclusion updateExclusion(UpdateExclusionRequest request) { return updateExclusionCallable().call(request); @@ -3532,7 +3532,7 @@ public final UnaryCallable updateExclusion * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteExclusion(LogExclusionName name) { DeleteExclusionRequest request = @@ -3565,7 +3565,7 @@ public final void deleteExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteExclusion(String name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); @@ -3595,7 +3595,7 @@ public final void deleteExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteExclusion(DeleteExclusionRequest request) { deleteExclusionCallable().call(request); @@ -3658,7 +3658,7 @@ public final UnaryCallable deleteExclusionCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CmekSettings getCmekSettings(GetCmekSettingsRequest request) { return getCmekSettingsCallable().call(request); @@ -3734,7 +3734,7 @@ public final UnaryCallable getCmekSettings * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CmekSettings updateCmekSettings(UpdateCmekSettingsRequest request) { return updateCmekSettingsCallable().call(request); @@ -3817,7 +3817,7 @@ public final UnaryCallable updateCmekSe * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings getSettings(SettingsName name) { GetSettingsRequest request = @@ -3860,7 +3860,7 @@ public final Settings getSettings(SettingsName name) { * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings getSettings(String name) { GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); @@ -3897,7 +3897,7 @@ public final Settings getSettings(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings getSettings(GetSettingsRequest request) { return getSettingsCallable().call(request); @@ -3978,7 +3978,7 @@ public final UnaryCallable getSettingsCallable() { * fields cannot be updated. *

    See [FieldMask][google.protobuf.FieldMask] for more information. *

    For example: `"updateMask=kmsKeyName"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings updateSettings(Settings settings, FieldMask updateMask) { UpdateSettingsRequest request = @@ -4022,7 +4022,7 @@ public final Settings updateSettings(Settings settings, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Settings updateSettings(UpdateSettingsRequest request) { return updateSettingsCallable().call(request); @@ -4093,7 +4093,7 @@ public final UnaryCallable updateSettingsCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture copyLogEntriesAsync( CopyLogEntriesRequest request) { diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java index 4dc90d0762..42f999ea2b 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java @@ -307,7 +307,7 @@ public LoggingServiceV2Stub getStub() { *

    `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

    For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLog(LogName logName) { DeleteLogRequest request = @@ -348,7 +348,7 @@ public final void deleteLog(LogName logName) { *

    `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

    For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLog(String logName) { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(logName).build(); @@ -380,7 +380,7 @@ public final void deleteLog(String logName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLog(DeleteLogRequest request) { deleteLogCallable().call(request); @@ -483,7 +483,7 @@ public final UnaryCallable deleteLogCallable() { * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final WriteLogEntriesResponse writeLogEntries( LogName logName, @@ -567,7 +567,7 @@ public final WriteLogEntriesResponse writeLogEntries( * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final WriteLogEntriesResponse writeLogEntries( String logName, @@ -614,7 +614,7 @@ public final WriteLogEntriesResponse writeLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { return writeLogEntriesCallable().call(request); @@ -709,7 +709,7 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ * order of increasing values of `LogEntry.timestamp` (oldest first), and the second option * returns entries in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogEntriesPagedResponse listLogEntries( List resourceNames, String filter, String orderBy) { @@ -752,7 +752,7 @@ public final ListLogEntriesPagedResponse listLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest request) { return listLogEntriesPagedCallable().call(request); @@ -863,7 +863,7 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request) { @@ -972,7 +972,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource *

  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { ListLogsRequest request = @@ -1009,7 +1009,7 @@ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(FolderName parent) { ListLogsRequest request = @@ -1046,7 +1046,7 @@ public final ListLogsPagedResponse listLogs(FolderName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(OrganizationName parent) { ListLogsRequest request = @@ -1083,7 +1083,7 @@ public final ListLogsPagedResponse listLogs(OrganizationName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(ProjectName parent) { ListLogsRequest request = @@ -1120,7 +1120,7 @@ public final ListLogsPagedResponse listLogs(ProjectName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(String parent) { ListLogsRequest request = ListLogsRequest.newBuilder().setParent(parent).build(); @@ -1155,7 +1155,7 @@ public final ListLogsPagedResponse listLogs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogsPagedResponse listLogs(ListLogsRequest request) { return listLogsPagedCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java index cbeed2501e..aa22c688d5 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java @@ -277,7 +277,7 @@ public MetricsServiceV2Stub getStub() { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { ListLogMetricsRequest request = @@ -309,7 +309,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder().setParent(parent).build(); @@ -342,7 +342,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest request) { return listLogMetricsPagedCallable().call(request); @@ -439,7 +439,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric getLogMetric(LogMetricName metricName) { GetLogMetricRequest request = @@ -469,7 +469,7 @@ public final LogMetric getLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric getLogMetric(String metricName) { GetLogMetricRequest request = @@ -499,7 +499,7 @@ public final LogMetric getLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric getLogMetric(GetLogMetricRequest request) { return getLogMetricCallable().call(request); @@ -556,7 +556,7 @@ public final UnaryCallable getLogMetricCallable( *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { CreateLogMetricRequest request = @@ -591,7 +591,7 @@ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric createLogMetric(String parent, LogMetric metric) { CreateLogMetricRequest request = @@ -622,7 +622,7 @@ public final LogMetric createLogMetric(String parent, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric createLogMetric(CreateLogMetricRequest request) { return createLogMetricCallable().call(request); @@ -681,7 +681,7 @@ public final UnaryCallable createLogMetricCal * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -717,7 +717,7 @@ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metri * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -748,7 +748,7 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final LogMetric updateLogMetric(UpdateLogMetricRequest request) { return updateLogMetricCallable().call(request); @@ -802,7 +802,7 @@ public final UnaryCallable updateLogMetricCal * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLogMetric(LogMetricName metricName) { DeleteLogMetricRequest request = @@ -832,7 +832,7 @@ public final void deleteLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLogMetric(String metricName) { DeleteLogMetricRequest request = @@ -862,7 +862,7 @@ public final void deleteLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteLogMetric(DeleteLogMetricRequest request) { deleteLogMetricCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java index 74d3f163da..28ebb54401 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -437,7 +437,7 @@ public SchemaServiceStub getStub() { * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema createSchema(ProjectName parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -478,7 +478,7 @@ public final Schema createSchema(ProjectName parent, Schema schema, String schem * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema createSchema(String parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -514,7 +514,7 @@ public final Schema createSchema(String parent, Schema schema, String schemaId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema createSchema(CreateSchemaRequest request) { return createSchemaCallable().call(request); @@ -569,7 +569,7 @@ public final UnaryCallable createSchemaCallable() { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema getSchema(SchemaName name) { GetSchemaRequest request = @@ -597,7 +597,7 @@ public final Schema getSchema(SchemaName name) { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema getSchema(String name) { GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(name).build(); @@ -627,7 +627,7 @@ public final Schema getSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema getSchema(GetSchemaRequest request) { return getSchemaCallable().call(request); @@ -683,7 +683,7 @@ public final UnaryCallable getSchemaCallable() { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { ListSchemasRequest request = @@ -715,7 +715,7 @@ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemasPagedResponse listSchemas(String parent) { ListSchemasRequest request = ListSchemasRequest.newBuilder().setParent(parent).build(); @@ -749,7 +749,7 @@ public final ListSchemasPagedResponse listSchemas(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { return listSchemasPagedCallable().call(request); @@ -848,7 +848,7 @@ public final UnaryCallable listSchemasC * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName name) { ListSchemaRevisionsRequest request = @@ -879,7 +879,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName nam * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { ListSchemaRevisionsRequest request = @@ -914,7 +914,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( ListSchemaRevisionsRequest request) { @@ -1018,7 +1018,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema commitSchema(SchemaName name, Schema schema) { CommitSchemaRequest request = @@ -1051,7 +1051,7 @@ public final Schema commitSchema(SchemaName name, Schema schema) { * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema commitSchema(String name, Schema schema) { CommitSchemaRequest request = @@ -1082,7 +1082,7 @@ public final Schema commitSchema(String name, Schema schema) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema commitSchema(CommitSchemaRequest request) { return commitSchemaCallable().call(request); @@ -1139,7 +1139,7 @@ public final UnaryCallable commitSchemaCallable() { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema rollbackSchema(SchemaName name, String revisionId) { RollbackSchemaRequest request = @@ -1173,7 +1173,7 @@ public final Schema rollbackSchema(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema rollbackSchema(String name, String revisionId) { RollbackSchemaRequest request = @@ -1204,7 +1204,7 @@ public final Schema rollbackSchema(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema rollbackSchema(RollbackSchemaRequest request) { return rollbackSchemaCallable().call(request); @@ -1263,7 +1263,7 @@ public final UnaryCallable rollbackSchemaCallable * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1299,7 +1299,7 @@ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema deleteSchemaRevision(String name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1330,7 +1330,7 @@ public final Schema deleteSchemaRevision(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Schema deleteSchemaRevision(DeleteSchemaRevisionRequest request) { return deleteSchemaRevisionCallable().call(request); @@ -1385,7 +1385,7 @@ public final UnaryCallable deleteSchemaRevi * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSchema(SchemaName name) { DeleteSchemaRequest request = @@ -1413,7 +1413,7 @@ public final void deleteSchema(SchemaName name) { * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSchema(String name) { DeleteSchemaRequest request = DeleteSchemaRequest.newBuilder().setName(name).build(); @@ -1442,7 +1442,7 @@ public final void deleteSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSchema(DeleteSchemaRequest request) { deleteSchemaCallable().call(request); @@ -1497,7 +1497,7 @@ public final UnaryCallable deleteSchemaCallable() { * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema schema) { ValidateSchemaRequest request = @@ -1530,7 +1530,7 @@ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema sc * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) { ValidateSchemaRequest request = @@ -1561,7 +1561,7 @@ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request) { return validateSchemaCallable().call(request); @@ -1621,7 +1621,7 @@ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ValidateMessageResponse validateMessage(ValidateMessageRequest request) { return validateMessageCallable().call(request); @@ -1684,7 +1684,7 @@ public final ValidateMessageResponse validateMessage(ValidateMessageRequest requ * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1745,7 +1745,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1808,7 +1808,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 9539f92063..b7a0f9da81 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -587,7 +587,7 @@ public SubscriberStub getStub() { * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -658,7 +658,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -729,7 +729,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( String name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -800,7 +800,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription( String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -860,7 +860,7 @@ public final Subscription createSubscription( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription createSubscription(Subscription request) { return createSubscriptionCallable().call(request); @@ -938,7 +938,7 @@ public final UnaryCallable createSubscriptionCallabl * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription getSubscription(SubscriptionName subscription) { GetSubscriptionRequest request = @@ -968,7 +968,7 @@ public final Subscription getSubscription(SubscriptionName subscription) { * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription getSubscription(String subscription) { GetSubscriptionRequest request = @@ -998,7 +998,7 @@ public final Subscription getSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription getSubscription(GetSubscriptionRequest request) { return getSubscriptionCallable().call(request); @@ -1056,7 +1056,7 @@ public final UnaryCallable getSubscription * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Subscription updateSubscription(UpdateSubscriptionRequest request) { return updateSubscriptionCallable().call(request); @@ -1114,7 +1114,7 @@ public final UnaryCallable updateSubscr * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName project) { ListSubscriptionsRequest request = @@ -1146,7 +1146,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName projec * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { ListSubscriptionsRequest request = @@ -1180,7 +1180,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsRequest request) { return listSubscriptionsPagedCallable().call(request); @@ -1282,7 +1282,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSubscription(SubscriptionName subscription) { DeleteSubscriptionRequest request = @@ -1315,7 +1315,7 @@ public final void deleteSubscription(SubscriptionName subscription) { * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSubscription(String subscription) { DeleteSubscriptionRequest request = @@ -1348,7 +1348,7 @@ public final void deleteSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSubscription(DeleteSubscriptionRequest request) { deleteSubscriptionCallable().call(request); @@ -1418,7 +1418,7 @@ public final UnaryCallable deleteSubscriptionC * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyAckDeadline( SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) { @@ -1464,7 +1464,7 @@ public final void modifyAckDeadline( * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyAckDeadline( String subscription, List ackIds, int ackDeadlineSeconds) { @@ -1504,7 +1504,7 @@ public final void modifyAckDeadline( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) { modifyAckDeadlineCallable().call(request); @@ -1570,7 +1570,7 @@ public final UnaryCallable modifyAckDeadlineCal * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void acknowledge(SubscriptionName subscription, List ackIds) { AcknowledgeRequest request = @@ -1608,7 +1608,7 @@ public final void acknowledge(SubscriptionName subscription, List ackIds * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void acknowledge(String subscription, List ackIds) { AcknowledgeRequest request = @@ -1643,7 +1643,7 @@ public final void acknowledge(String subscription, List ackIds) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void acknowledge(AcknowledgeRequest request) { acknowledgeCallable().call(request); @@ -1705,7 +1705,7 @@ public final UnaryCallable acknowledgeCallable() { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { PullRequest request = @@ -1740,7 +1740,7 @@ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(String subscription, int maxMessages) { PullRequest request = @@ -1780,7 +1780,7 @@ public final PullResponse pull(String subscription, int maxMessages) { * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull( SubscriptionName subscription, boolean returnImmediately, int maxMessages) { @@ -1825,7 +1825,7 @@ public final PullResponse pull( * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(String subscription, boolean returnImmediately, int maxMessages) { PullRequest request = @@ -1862,7 +1862,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PullResponse pull(PullRequest request) { return pullCallable().call(request); @@ -1971,7 +1971,7 @@ public final UnaryCallable pullCallable() { *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2012,7 +2012,7 @@ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pus *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2051,7 +2051,7 @@ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void modifyPushConfig(ModifyPushConfigRequest request) { modifyPushConfigCallable().call(request); @@ -2114,7 +2114,7 @@ public final UnaryCallable modifyPushConfigCalla * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot getSnapshot(SnapshotName snapshot) { GetSnapshotRequest request = @@ -2147,7 +2147,7 @@ public final Snapshot getSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot getSnapshot(String snapshot) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setSnapshot(snapshot).build(); @@ -2179,7 +2179,7 @@ public final Snapshot getSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot getSnapshot(GetSnapshotRequest request) { return getSnapshotCallable().call(request); @@ -2241,7 +2241,7 @@ public final UnaryCallable getSnapshotCallable() { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { ListSnapshotsRequest request = @@ -2276,7 +2276,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSnapshotsPagedResponse listSnapshots(String project) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setProject(project).build(); @@ -2312,7 +2312,7 @@ public final ListSnapshotsPagedResponse listSnapshots(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request) { return listSnapshotsPagedCallable().call(request); @@ -2438,7 +2438,7 @@ public final UnaryCallable listSnap * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2491,7 +2491,7 @@ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscri * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(SnapshotName name, String subscription) { CreateSnapshotRequest request = @@ -2544,7 +2544,7 @@ public final Snapshot createSnapshot(SnapshotName name, String subscription) { * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(String name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2597,7 +2597,7 @@ public final Snapshot createSnapshot(String name, SubscriptionName subscription) * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(String name, String subscription) { CreateSnapshotRequest request = @@ -2640,7 +2640,7 @@ public final Snapshot createSnapshot(String name, String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot createSnapshot(CreateSnapshotRequest request) { return createSnapshotCallable().call(request); @@ -2713,7 +2713,7 @@ public final UnaryCallable createSnapshotCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Snapshot updateSnapshot(UpdateSnapshotRequest request) { return updateSnapshotCallable().call(request); @@ -2777,7 +2777,7 @@ public final UnaryCallable updateSnapshotCallab * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSnapshot(SnapshotName snapshot) { DeleteSnapshotRequest request = @@ -2813,7 +2813,7 @@ public final void deleteSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSnapshot(String snapshot) { DeleteSnapshotRequest request = @@ -2849,7 +2849,7 @@ public final void deleteSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteSnapshot(DeleteSnapshotRequest request) { deleteSnapshotCallable().call(request); @@ -2916,7 +2916,7 @@ public final UnaryCallable deleteSnapshotCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final SeekResponse seek(SeekRequest request) { return seekCallable().call(request); @@ -2980,7 +2980,7 @@ public final UnaryCallable seekCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -3041,7 +3041,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -3104,7 +3104,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java index 485cf3b3da..9e4d8f0752 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -406,7 +406,7 @@ public PublisherStub getStub() { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic createTopic(TopicName name) { Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); @@ -437,7 +437,7 @@ public final Topic createTopic(TopicName name) { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic createTopic(String name) { Topic request = Topic.newBuilder().setName(name).build(); @@ -473,7 +473,7 @@ public final Topic createTopic(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic createTopic(Topic request) { return createTopicCallable().call(request); @@ -536,7 +536,7 @@ public final UnaryCallable createTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic updateTopic(UpdateTopicRequest request) { return updateTopicCallable().call(request); @@ -592,7 +592,7 @@ public final UnaryCallable updateTopicCallable() { * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublishResponse publish(TopicName topic, List messages) { PublishRequest request = @@ -625,7 +625,7 @@ public final PublishResponse publish(TopicName topic, List messag * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublishResponse publish(String topic, List messages) { PublishRequest request = @@ -656,7 +656,7 @@ public final PublishResponse publish(String topic, List messages) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final PublishResponse publish(PublishRequest request) { return publishCallable().call(request); @@ -710,7 +710,7 @@ public final UnaryCallable publishCallable() { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic getTopic(TopicName topic) { GetTopicRequest request = @@ -738,7 +738,7 @@ public final Topic getTopic(TopicName topic) { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic getTopic(String topic) { GetTopicRequest request = GetTopicRequest.newBuilder().setTopic(topic).build(); @@ -767,7 +767,7 @@ public final Topic getTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Topic getTopic(GetTopicRequest request) { return getTopicCallable().call(request); @@ -822,7 +822,7 @@ public final UnaryCallable getTopicCallable() { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicsPagedResponse listTopics(ProjectName project) { ListTopicsRequest request = @@ -854,7 +854,7 @@ public final ListTopicsPagedResponse listTopics(ProjectName project) { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicsPagedResponse listTopics(String project) { ListTopicsRequest request = ListTopicsRequest.newBuilder().setProject(project).build(); @@ -887,7 +887,7 @@ public final ListTopicsPagedResponse listTopics(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicsPagedResponse listTopics(ListTopicsRequest request) { return listTopicsPagedCallable().call(request); @@ -984,7 +984,7 @@ public final UnaryCallable listTopicsCall * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicName topic) { ListTopicSubscriptionsRequest request = @@ -1016,7 +1016,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicNam * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String topic) { ListTopicSubscriptionsRequest request = @@ -1050,7 +1050,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( ListTopicSubscriptionsRequest request) { @@ -1155,7 +1155,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) { ListTopicSnapshotsRequest request = @@ -1190,7 +1190,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { ListTopicSnapshotsRequest request = @@ -1227,7 +1227,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( ListTopicSnapshotsRequest request) { @@ -1336,7 +1336,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteTopic(TopicName topic) { DeleteTopicRequest request = @@ -1367,7 +1367,7 @@ public final void deleteTopic(TopicName topic) { * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteTopic(String topic) { DeleteTopicRequest request = DeleteTopicRequest.newBuilder().setTopic(topic).build(); @@ -1399,7 +1399,7 @@ public final void deleteTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteTopic(DeleteTopicRequest request) { deleteTopicCallable().call(request); @@ -1459,7 +1459,7 @@ public final UnaryCallable deleteTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionRequest request) { return detachSubscriptionCallable().call(request); @@ -1522,7 +1522,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1583,7 +1583,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1646,7 +1646,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java index 7da5fc69f8..a79e735944 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -477,7 +477,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListInstancesPagedResponse listInstances(LocationName parent) { ListInstancesRequest request = @@ -519,7 +519,7 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListInstancesPagedResponse listInstances(String parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); @@ -562,7 +562,7 @@ public final ListInstancesPagedResponse listInstances(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { return listInstancesPagedCallable().call(request); @@ -680,7 +680,7 @@ public final UnaryCallable listInst * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = @@ -709,7 +709,7 @@ public final Instance getInstance(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); @@ -738,7 +738,7 @@ public final Instance getInstance(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Instance getInstance(GetInstanceRequest request) { return getInstanceCallable().call(request); @@ -793,7 +793,7 @@ public final UnaryCallable getInstanceCallable() { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final InstanceAuthString getInstanceAuthString(InstanceName name) { GetInstanceAuthStringRequest request = @@ -825,7 +825,7 @@ public final InstanceAuthString getInstanceAuthString(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final InstanceAuthString getInstanceAuthString(String name) { GetInstanceAuthStringRequest request = @@ -856,7 +856,7 @@ public final InstanceAuthString getInstanceAuthString(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringRequest request) { return getInstanceAuthStringCallable().call(request); @@ -936,7 +936,7 @@ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringReque * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture createInstanceAsync( LocationName parent, String instanceId, Instance instance) { @@ -993,7 +993,7 @@ public final OperationFuture createInstanceAsync( * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture createInstanceAsync( String parent, String instanceId, Instance instance) { @@ -1041,7 +1041,7 @@ public final OperationFuture createInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture createInstanceAsync(CreateInstanceRequest request) { return createInstanceOperationCallable().futureCall(request); @@ -1158,7 +1158,7 @@ public final UnaryCallable createInstanceCalla *

    * `displayName` * `labels` * `memorySizeGb` * `redisConfig` * * `replica_count` * @param instance Required. Update description. Only fields specified in update_mask are updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture updateInstanceAsync( FieldMask updateMask, Instance instance) { @@ -1194,7 +1194,7 @@ public final OperationFuture updateInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture updateInstanceAsync(UpdateInstanceRequest request) { return updateInstanceOperationCallable().futureCall(request); @@ -1289,7 +1289,7 @@ public final UnaryCallable updateInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture upgradeInstanceAsync( InstanceName name, String redisVersion) { @@ -1324,7 +1324,7 @@ public final OperationFuture upgradeInstanceAsync( * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture upgradeInstanceAsync( String name, String redisVersion) { @@ -1356,7 +1356,7 @@ public final OperationFuture upgradeInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture upgradeInstanceAsync(UpgradeInstanceRequest request) { return upgradeInstanceOperationCallable().futureCall(request); @@ -1449,7 +1449,7 @@ public final UnaryCallable upgradeInstanceCal * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param inputConfig Required. Specify data to be imported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture importInstanceAsync( String name, InputConfig inputConfig) { @@ -1487,7 +1487,7 @@ public final OperationFuture importInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture importInstanceAsync(ImportInstanceRequest request) { return importInstanceOperationCallable().futureCall(request); @@ -1591,7 +1591,7 @@ public final UnaryCallable importInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param outputConfig Required. Specify data to be exported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture exportInstanceAsync( String name, OutputConfig outputConfig) { @@ -1628,7 +1628,7 @@ public final OperationFuture exportInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture exportInstanceAsync(ExportInstanceRequest request) { return exportInstanceOperationCallable().futureCall(request); @@ -1728,7 +1728,7 @@ public final UnaryCallable exportInstanceCalla * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture failoverInstanceAsync( InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1766,7 +1766,7 @@ public final OperationFuture failoverInstanceAsync( * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture failoverInstanceAsync( String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1801,7 +1801,7 @@ public final OperationFuture failoverInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture failoverInstanceAsync( FailoverInstanceRequest request) { @@ -1887,7 +1887,7 @@ public final UnaryCallable failoverInstanceC * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteInstanceAsync(InstanceName name) { DeleteInstanceRequest request = @@ -1916,7 +1916,7 @@ public final OperationFuture deleteInstanceAsync(InstanceName name) * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteInstanceAsync(String name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); @@ -1945,7 +1945,7 @@ public final OperationFuture deleteInstanceAsync(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture deleteInstanceAsync(DeleteInstanceRequest request) { return deleteInstanceOperationCallable().futureCall(request); @@ -2036,7 +2036,7 @@ public final UnaryCallable deleteInstanceCalla * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture rescheduleMaintenanceAsync( InstanceName name, @@ -2080,7 +2080,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture rescheduleMaintenanceAsync( String name, @@ -2118,7 +2118,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final OperationFuture rescheduleMaintenanceAsync( RescheduleMaintenanceRequest request) { diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java index a95c284ea3..b25eb42986 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java @@ -734,7 +734,7 @@ public StorageStub getStub() { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(BucketName name) { DeleteBucketRequest request = @@ -761,7 +761,7 @@ public final void deleteBucket(BucketName name) { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(String name) { DeleteBucketRequest request = DeleteBucketRequest.newBuilder().setName(name).build(); @@ -792,7 +792,7 @@ public final void deleteBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -846,7 +846,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket getBucket(BucketName name) { GetBucketRequest request = @@ -873,7 +873,7 @@ public final Bucket getBucket(BucketName name) { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket getBucket(String name) { GetBucketRequest request = GetBucketRequest.newBuilder().setName(name).build(); @@ -905,7 +905,7 @@ public final Bucket getBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -968,7 +968,7 @@ public final UnaryCallable getBucketCallable() { * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1007,7 +1007,7 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1045,7 +1045,7 @@ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1103,7 +1103,7 @@ public final UnaryCallable createBucketCallable() { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { ListBucketsRequest request = @@ -1134,7 +1134,7 @@ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -1169,7 +1169,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -1268,7 +1268,7 @@ public final UnaryCallable listBucketsC * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { LockBucketRetentionPolicyRequest request = @@ -1297,7 +1297,7 @@ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket lockBucketRetentionPolicy(String bucket) { LockBucketRetentionPolicyRequest request = @@ -1328,7 +1328,7 @@ public final Bucket lockBucketRetentionPolicy(String bucket) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest request) { return lockBucketRetentionPolicyCallable().call(request); @@ -1387,7 +1387,7 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(ResourceName resource) { GetIamPolicyRequest request = @@ -1420,7 +1420,7 @@ public final Policy getIamPolicy(ResourceName resource) { * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(String resource) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); @@ -1454,7 +1454,7 @@ public final Policy getIamPolicy(String resource) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1519,7 +1519,7 @@ public final UnaryCallable getIamPolicyCallable() { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(ResourceName resource, Policy policy) { SetIamPolicyRequest request = @@ -1557,7 +1557,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(String resource, Policy policy) { SetIamPolicyRequest request = @@ -1593,7 +1593,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1660,7 +1660,7 @@ public final UnaryCallable setIamPolicyCallable() { * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions( ResourceName resource, List permissions) { @@ -1700,7 +1700,7 @@ public final TestIamPermissionsResponse testIamPermissions( * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions( String resource, List permissions) { @@ -1740,7 +1740,7 @@ public final TestIamPermissionsResponse testIamPermissions( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); @@ -1809,7 +1809,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { UpdateBucketRequest request = @@ -1844,7 +1844,7 @@ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Bucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1901,7 +1901,7 @@ public final UnaryCallable updateBucketCallable() { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteNotification(NotificationName name) { DeleteNotificationRequest request = @@ -1930,7 +1930,7 @@ public final void deleteNotification(NotificationName name) { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteNotification(String name) { DeleteNotificationRequest request = @@ -1960,7 +1960,7 @@ public final void deleteNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteNotification(DeleteNotificationRequest request) { deleteNotificationCallable().call(request); @@ -2013,7 +2013,7 @@ public final UnaryCallable deleteNotificationC * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification getNotification(BucketName name) { GetNotificationRequest request = @@ -2041,7 +2041,7 @@ public final Notification getNotification(BucketName name) { * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification getNotification(String name) { GetNotificationRequest request = GetNotificationRequest.newBuilder().setName(name).build(); @@ -2070,7 +2070,7 @@ public final Notification getNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification getNotification(GetNotificationRequest request) { return getNotificationCallable().call(request); @@ -2126,7 +2126,7 @@ public final UnaryCallable getNotification * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification createNotification(ProjectName parent, Notification notification) { CreateNotificationRequest request = @@ -2160,7 +2160,7 @@ public final Notification createNotification(ProjectName parent, Notification no * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification createNotification(String parent, Notification notification) { CreateNotificationRequest request = @@ -2196,7 +2196,7 @@ public final Notification createNotification(String parent, Notification notific * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Notification createNotification(CreateNotificationRequest request) { return createNotificationCallable().call(request); @@ -2254,7 +2254,7 @@ public final UnaryCallable createNotifi * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListNotificationsPagedResponse listNotifications(ProjectName parent) { ListNotificationsRequest request = @@ -2285,7 +2285,7 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListNotificationsPagedResponse listNotifications(String parent) { ListNotificationsRequest request = @@ -2319,7 +2319,7 @@ public final ListNotificationsPagedResponse listNotifications(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListNotificationsPagedResponse listNotifications(ListNotificationsRequest request) { return listNotificationsPagedCallable().call(request); @@ -2429,7 +2429,7 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object composeObject(ComposeObjectRequest request) { return composeObjectCallable().call(request); @@ -2494,7 +2494,7 @@ public final UnaryCallable composeObjectCallable() * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. The name of the finalized object to delete. Note: If you want to delete * an unfinalized resumable upload please use `CancelResumableWrite`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteObject(String bucket, String object) { DeleteObjectRequest request = @@ -2528,7 +2528,7 @@ public final void deleteObject(String bucket, String object) { * an unfinalized resumable upload please use `CancelResumableWrite`. * @param generation If present, permanently deletes a specific revision of this object (as * opposed to the latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteObject(String bucket, String object, long generation) { DeleteObjectRequest request = @@ -2570,7 +2570,7 @@ public final void deleteObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteObject(DeleteObjectRequest request) { deleteObjectCallable().call(request); @@ -2631,7 +2631,7 @@ public final UnaryCallable deleteObjectCallable() { * * @param uploadId Required. The upload_id of the resumable upload to cancel. This should be * copied from the `upload_id` field of `StartResumableWriteResponse`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) { CancelResumableWriteRequest request = @@ -2659,7 +2659,7 @@ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CancelResumableWriteResponse cancelResumableWrite( CancelResumableWriteRequest request) { @@ -2714,7 +2714,7 @@ public final CancelResumableWriteResponse cancelResumableWrite( * * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. Name of the object. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object getObject(String bucket, String object) { GetObjectRequest request = @@ -2746,7 +2746,7 @@ public final Object getObject(String bucket, String object) { * @param object Required. Name of the object. * @param generation If present, selects a specific revision of this object (as opposed to the * latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object getObject(String bucket, String object, long generation) { GetObjectRequest request = @@ -2788,7 +2788,7 @@ public final Object getObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object getObject(GetObjectRequest request) { return getObjectCallable().call(request); @@ -2897,7 +2897,7 @@ public final ServerStreamingCallable read * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object updateObject(Object object, FieldMask updateMask) { UpdateObjectRequest request = @@ -2934,7 +2934,7 @@ public final Object updateObject(Object object, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final Object updateObject(UpdateObjectRequest request) { return updateObjectCallable().call(request); @@ -3082,7 +3082,7 @@ public final UnaryCallable updateObjectCallable() { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListObjectsPagedResponse listObjects(ProjectName parent) { ListObjectsRequest request = @@ -3113,7 +3113,7 @@ public final ListObjectsPagedResponse listObjects(ProjectName parent) { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListObjectsPagedResponse listObjects(String parent) { ListObjectsRequest request = ListObjectsRequest.newBuilder().setParent(parent).build(); @@ -3153,7 +3153,7 @@ public final ListObjectsPagedResponse listObjects(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListObjectsPagedResponse listObjects(ListObjectsRequest request) { return listObjectsPagedCallable().call(request); @@ -3289,7 +3289,7 @@ public final UnaryCallable listObjectsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final RewriteResponse rewriteObject(RewriteObjectRequest request) { return rewriteObjectCallable().call(request); @@ -3371,7 +3371,7 @@ public final UnaryCallable rewriteObjectC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final StartResumableWriteResponse startResumableWrite(StartResumableWriteRequest request) { return startResumableWriteCallable().call(request); @@ -3439,7 +3439,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite * * @param uploadId Required. The name of the resume token for the object whose write status is * being requested. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { QueryWriteStatusRequest request = @@ -3480,7 +3480,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest request) { return queryWriteStatusCallable().call(request); @@ -3546,7 +3546,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ServiceAccount getServiceAccount(ProjectName project) { GetServiceAccountRequest request = @@ -3576,7 +3576,7 @@ public final ServiceAccount getServiceAccount(ProjectName project) { * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ServiceAccount getServiceAccount(String project) { GetServiceAccountRequest request = @@ -3606,7 +3606,7 @@ public final ServiceAccount getServiceAccount(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ServiceAccount getServiceAccount(GetServiceAccountRequest request) { return getServiceAccountCallable().call(request); @@ -3663,7 +3663,7 @@ public final UnaryCallable getServiceA * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CreateHmacKeyResponse createHmacKey( ProjectName project, String serviceAccountEmail) { @@ -3698,7 +3698,7 @@ public final CreateHmacKeyResponse createHmacKey( * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CreateHmacKeyResponse createHmacKey(String project, String serviceAccountEmail) { CreateHmacKeyRequest request = @@ -3732,7 +3732,7 @@ public final CreateHmacKeyResponse createHmacKey(String project, String serviceA * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) { return createHmacKeyCallable().call(request); @@ -3790,7 +3790,7 @@ public final UnaryCallable createHm * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteHmacKey(String accessId, ProjectName project) { DeleteHmacKeyRequest request = @@ -3824,7 +3824,7 @@ public final void deleteHmacKey(String accessId, ProjectName project) { * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteHmacKey(String accessId, String project) { DeleteHmacKeyRequest request = @@ -3855,7 +3855,7 @@ public final void deleteHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final void deleteHmacKey(DeleteHmacKeyRequest request) { deleteHmacKeyCallable().call(request); @@ -3912,7 +3912,7 @@ public final UnaryCallable deleteHmacKeyCallable() * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { GetHmacKeyRequest request = @@ -3946,7 +3946,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata getHmacKey(String accessId, String project) { GetHmacKeyRequest request = @@ -3977,7 +3977,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) { return getHmacKeyCallable().call(request); @@ -4034,7 +4034,7 @@ public final UnaryCallable getHmacKeyCallabl * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { ListHmacKeysRequest request = @@ -4067,7 +4067,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListHmacKeysPagedResponse listHmacKeys(String project) { ListHmacKeysRequest request = ListHmacKeysRequest.newBuilder().setProject(project).build(); @@ -4102,7 +4102,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request) { return listHmacKeysPagedCallable().call(request); @@ -4207,7 +4207,7 @@ public final UnaryCallable listHmacKe * used to identify the key. * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the * `state` field is updated to the value specified in `hmac_key`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) { UpdateHmacKeyRequest request = @@ -4238,7 +4238,7 @@ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask up * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @throws com.google.api.gax.rpc.ApiException if the remote call fails. */ public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) { return updateHmacKeyCallable().call(request); From fbb19eaa835b8e1b8e4dda7985d036ce02a91324 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 2 Apr 2025 12:51:29 -0700 Subject: [PATCH 04/21] Revert service client throw comment --- .../comment/ServiceClientCommentComposer.java | 2 +- ...cServiceClientWithNestedClassImport.golden | 2 +- .../grpc/goldens/BookshopClient.golden | 6 +- .../goldens/DeprecatedServiceClient.golden | 4 +- .../composer/grpc/goldens/EchoClient.golden | 34 +++++------ .../EchoServiceSelectiveGapicClient.golden | 16 ++--- .../grpc/goldens/IdentityClient.golden | 24 ++++---- .../grpc/goldens/MessagingClient.golden | 60 +++++++++---------- .../grpcrest/goldens/EchoClient.golden | 42 ++++++------- .../grpcrest/goldens/WickedClient.golden | 2 +- 10 files changed, 96 insertions(+), 96 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java index 080a3d0fbf..8c8487a8df 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java @@ -38,7 +38,7 @@ public class ServiceClientCommentComposer { // Tokens. private static final String EMPTY_STRING = ""; private static final String API_EXCEPTION_TYPE_NAME = "com.google.api.gax.rpc.ApiException"; - private static final String EXCEPTION_CONDITION = "if the remote call fails."; + private static final String EXCEPTION_CONDITION = "if the remote call fails"; // Constants. private static final String SERVICE_DESCRIPTION_INTRO_STRING = diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden b/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden index 6fada1af81..9a8f46553d 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/writer/goldens/GrpcServiceClientWithNestedClassImport.golden @@ -163,7 +163,7 @@ public class NestedMessageServiceClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Outer.Middle.Inner nestedMessageMethod(Outer.Middle request) { return nestedMessageMethodCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden index f104ea5b0b..13e5485039 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/BookshopClient.golden @@ -166,7 +166,7 @@ public class BookshopClient implements BackgroundResource { * * @param booksCount * @param books - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(int booksCount, List books) { GetBookRequest request = @@ -193,7 +193,7 @@ public class BookshopClient implements BackgroundResource { * * @param booksList * @param books - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(String booksList, List books) { GetBookRequest request = @@ -223,7 +223,7 @@ public class BookshopClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(GetBookRequest request) { return getBookCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden index 0b0fbc2395..aec12869e4 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceClient.golden @@ -178,7 +178,7 @@ public class DeprecatedServiceClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void fastFibonacci(FibonacciRequest request) { fastFibonacciCallable().call(request); @@ -223,7 +223,7 @@ public class DeprecatedServiceClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails * @deprecated This method is deprecated and will be removed in the next major version update. */ @Deprecated diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden index b4b966cbca..431700191c 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoClient.golden @@ -322,7 +322,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo() { EchoRequest request = EchoRequest.newBuilder().build(); @@ -346,7 +346,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(ResourceName parent) { EchoRequest request = @@ -371,7 +371,7 @@ public class EchoClient implements BackgroundResource { * } * * @param error - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(Status error) { EchoRequest request = EchoRequest.newBuilder().setError(error).build(); @@ -395,7 +395,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(FoobarName name) { EchoRequest request = @@ -420,7 +420,7 @@ public class EchoClient implements BackgroundResource { * } * * @param content - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String content) { EchoRequest request = EchoRequest.newBuilder().setContent(content).build(); @@ -444,7 +444,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); @@ -468,7 +468,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String parent) { EchoRequest request = EchoRequest.newBuilder().setParent(parent).build(); @@ -494,7 +494,7 @@ public class EchoClient implements BackgroundResource { * * @param content * @param severity - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String content, Severity severity) { EchoRequest request = @@ -525,7 +525,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(EchoRequest request) { return echoCallable().call(request); @@ -712,7 +712,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PagedExpandPagedResponse pagedExpand(PagedExpandRequest request) { return pagedExpandPagedCallable().call(request); @@ -802,7 +802,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SimplePagedExpandPagedResponse simplePagedExpand() { PagedExpandRequest request = PagedExpandRequest.newBuilder().build(); @@ -833,7 +833,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SimplePagedExpandPagedResponse simplePagedExpand(PagedExpandRequest request) { return simplePagedExpandPagedCallable().call(request); @@ -923,7 +923,7 @@ public class EchoClient implements BackgroundResource { * } * * @param ttl - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture waitAsync(Duration ttl) { WaitRequest request = WaitRequest.newBuilder().setTtl(ttl).build(); @@ -947,7 +947,7 @@ public class EchoClient implements BackgroundResource { * } * * @param endTime - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture waitAsync(Timestamp endTime) { WaitRequest request = WaitRequest.newBuilder().setEndTime(endTime).build(); @@ -971,7 +971,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture waitAsync(WaitRequest request) { return waitOperationCallable().futureCall(request); @@ -1039,7 +1039,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final BlockResponse block(BlockRequest request) { return blockCallable().call(request); @@ -1090,7 +1090,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object collideName(EchoRequest request) { return collideNameCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index 0faf7834c5..b69f5d474b 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -233,7 +233,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echoShouldGenerateAsPublic() { EchoRequest request = EchoRequest.newBuilder().build(); @@ -259,7 +259,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echoShouldGenerateAsPublic(FoobarName name) { EchoRequest request = @@ -286,7 +286,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echoShouldGenerateAsPublic(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); @@ -317,7 +317,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echoShouldGenerateAsPublic(EchoRequest request) { return echoShouldGenerateAsPublicCallable().call(request); @@ -438,7 +438,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method * is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") @@ -466,7 +466,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method * is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") @@ -495,7 +495,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method * is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") @@ -528,7 +528,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. @InternalApi This method + * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method * is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden index d5bd1961e7..efb41dc308 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/IdentityClient.golden @@ -245,7 +245,7 @@ public class IdentityClient implements BackgroundResource { * @param parent * @param displayName * @param email - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User createUser(String parent, String displayName, String email) { CreateUserRequest request = @@ -287,7 +287,7 @@ public class IdentityClient implements BackgroundResource { * @param nickname * @param enableNotifications * @param heightFeet - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User createUser( String parent, @@ -359,7 +359,7 @@ public class IdentityClient implements BackgroundResource { * @param title * @param subject * @param artistName - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User createUser( String parent, @@ -424,7 +424,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User createUser(CreateUserRequest request) { return createUserCallable().call(request); @@ -473,7 +473,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User getUser(UserName name) { GetUserRequest request = @@ -498,7 +498,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User getUser(String name) { GetUserRequest request = GetUserRequest.newBuilder().setName(name).build(); @@ -523,7 +523,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User getUser(GetUserRequest request) { return getUserCallable().call(request); @@ -570,7 +570,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final User updateUser(UpdateUserRequest request) { return updateUserCallable().call(request); @@ -616,7 +616,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteUser(UserName name) { DeleteUserRequest request = @@ -641,7 +641,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteUser(String name) { DeleteUserRequest request = DeleteUserRequest.newBuilder().setName(name).build(); @@ -666,7 +666,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteUser(DeleteUserRequest request) { deleteUserCallable().call(request); @@ -718,7 +718,7 @@ public class IdentityClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListUsersPagedResponse listUsers(ListUsersRequest request) { return listUsersPagedCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden index 945c1e8360..359ba58624 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/MessagingClient.golden @@ -404,7 +404,7 @@ public class MessagingClient implements BackgroundResource { * * @param displayName * @param description - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Room createRoom(String displayName, String description) { CreateRoomRequest request = @@ -433,7 +433,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Room createRoom(CreateRoomRequest request) { return createRoomCallable().call(request); @@ -479,7 +479,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Room getRoom(RoomName name) { GetRoomRequest request = @@ -504,7 +504,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Room getRoom(String name) { GetRoomRequest request = GetRoomRequest.newBuilder().setName(name).build(); @@ -529,7 +529,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Room getRoom(GetRoomRequest request) { return getRoomCallable().call(request); @@ -576,7 +576,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Room updateRoom(UpdateRoomRequest request) { return updateRoomCallable().call(request); @@ -622,7 +622,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteRoom(RoomName name) { DeleteRoomRequest request = @@ -647,7 +647,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteRoom(String name) { DeleteRoomRequest request = DeleteRoomRequest.newBuilder().setName(name).build(); @@ -672,7 +672,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteRoom(DeleteRoomRequest request) { deleteRoomCallable().call(request); @@ -724,7 +724,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListRoomsPagedResponse listRooms(ListRoomsRequest request) { return listRoomsPagedCallable().call(request); @@ -812,7 +812,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param image - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(ProfileName parent, ByteString image) { CreateBlurbRequest request = @@ -842,7 +842,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param text - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(ProfileName parent, String text) { CreateBlurbRequest request = @@ -872,7 +872,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param image - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(RoomName parent, ByteString image) { CreateBlurbRequest request = @@ -902,7 +902,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param text - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(RoomName parent, String text) { CreateBlurbRequest request = @@ -932,7 +932,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param image - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(String parent, ByteString image) { CreateBlurbRequest request = @@ -962,7 +962,7 @@ public class MessagingClient implements BackgroundResource { * * @param parent * @param text - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(String parent, String text) { CreateBlurbRequest request = @@ -994,7 +994,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb createBlurb(CreateBlurbRequest request) { return createBlurbCallable().call(request); @@ -1043,7 +1043,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb getBlurb(BlurbName name) { GetBlurbRequest request = @@ -1069,7 +1069,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb getBlurb(String name) { GetBlurbRequest request = GetBlurbRequest.newBuilder().setName(name).build(); @@ -1096,7 +1096,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb getBlurb(GetBlurbRequest request) { return getBlurbCallable().call(request); @@ -1145,7 +1145,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Blurb updateBlurb(UpdateBlurbRequest request) { return updateBlurbCallable().call(request); @@ -1191,7 +1191,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBlurb(BlurbName name) { DeleteBlurbRequest request = @@ -1217,7 +1217,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBlurb(String name) { DeleteBlurbRequest request = DeleteBlurbRequest.newBuilder().setName(name).build(); @@ -1244,7 +1244,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBlurb(DeleteBlurbRequest request) { deleteBlurbCallable().call(request); @@ -1294,7 +1294,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBlurbsPagedResponse listBlurbs(ProfileName parent) { ListBlurbsRequest request = @@ -1321,7 +1321,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBlurbsPagedResponse listBlurbs(RoomName parent) { ListBlurbsRequest request = @@ -1348,7 +1348,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBlurbsPagedResponse listBlurbs(String parent) { ListBlurbsRequest request = ListBlurbsRequest.newBuilder().setParent(parent).build(); @@ -1379,7 +1379,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBlurbsPagedResponse listBlurbs(ListBlurbsRequest request) { return listBlurbsPagedCallable().call(request); @@ -1467,7 +1467,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param query - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture searchBlurbsAsync( String query) { @@ -1498,7 +1498,7 @@ public class MessagingClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture searchBlurbsAsync( SearchBlurbsRequest request) { diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden index 8340cf2dfd..bf68adf425 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoClient.golden @@ -370,7 +370,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo() { EchoRequest request = EchoRequest.newBuilder().build(); @@ -394,7 +394,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(ResourceName parent) { EchoRequest request = @@ -419,7 +419,7 @@ public class EchoClient implements BackgroundResource { * } * * @param error - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(Status error) { EchoRequest request = EchoRequest.newBuilder().setError(error).build(); @@ -443,7 +443,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(FoobarName name) { EchoRequest request = @@ -468,7 +468,7 @@ public class EchoClient implements BackgroundResource { * } * * @param content - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String content) { EchoRequest request = EchoRequest.newBuilder().setContent(content).build(); @@ -492,7 +492,7 @@ public class EchoClient implements BackgroundResource { * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); @@ -516,7 +516,7 @@ public class EchoClient implements BackgroundResource { * } * * @param parent - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String parent) { EchoRequest request = EchoRequest.newBuilder().setParent(parent).build(); @@ -542,7 +542,7 @@ public class EchoClient implements BackgroundResource { * * @param content * @param severity - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(String content, Severity severity) { EchoRequest request = @@ -573,7 +573,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse echo(EchoRequest request) { return echoCallable().call(request); @@ -658,7 +658,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PagedExpandPagedResponse pagedExpand(PagedExpandRequest request) { return pagedExpandPagedCallable().call(request); @@ -748,7 +748,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SimplePagedExpandPagedResponse simplePagedExpand() { PagedExpandRequest request = PagedExpandRequest.newBuilder().build(); @@ -779,7 +779,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SimplePagedExpandPagedResponse simplePagedExpand(PagedExpandRequest request) { return simplePagedExpandPagedCallable().call(request); @@ -869,7 +869,7 @@ public class EchoClient implements BackgroundResource { * } * * @param ttl - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture waitAsync(Duration ttl) { WaitRequest request = WaitRequest.newBuilder().setTtl(ttl).build(); @@ -893,7 +893,7 @@ public class EchoClient implements BackgroundResource { * } * * @param endTime - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture waitAsync(Timestamp endTime) { WaitRequest request = WaitRequest.newBuilder().setEndTime(endTime).build(); @@ -917,7 +917,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture waitAsync(WaitRequest request) { return waitOperationCallable().futureCall(request); @@ -985,7 +985,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final BlockResponse block(BlockRequest request) { return blockCallable().call(request); @@ -1036,7 +1036,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object collideName(EchoRequest request) { return collideNameCallable().call(request); @@ -1093,7 +1093,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object nestedBinding(EchoRequest request) { return nestedBindingCallable().call(request); @@ -1180,7 +1180,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EchoResponse noBinding(EchoRequest request) { return noBindingCallable().call(request); @@ -1233,7 +1233,7 @@ public class EchoClient implements BackgroundResource { * * @param case_ * @param updateMask - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case updateCase(Case case_, FieldMask updateMask) { UpdateCaseRequest request = @@ -1259,7 +1259,7 @@ public class EchoClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case updateCase(UpdateCaseRequest request) { return updateCaseCallable().call(request); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden index 60cdee9847..138bee4bc1 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedClient.golden @@ -180,7 +180,7 @@ public class WickedClient implements BackgroundResource { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EvilResponse craftEvilPlan(EvilRequest request) { return craftEvilPlanCallable().call(request); From 03220b9d3f331d28dcc54a12a2b95f23e755b5a9 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 2 Apr 2025 13:00:46 -0700 Subject: [PATCH 05/21] Revert integration golden files --- .../v1/ConnectionServiceClient.java | 6 +- .../cloud/asset/v1/AssetServiceClient.java | 88 +++++------ .../data/v2/BaseBigtableDataClient.java | 40 ++--- .../compute/v1small/AddressesClient.java | 16 +- .../v1small/RegionOperationsClient.java | 8 +- .../credentials/v1/IamCredentialsClient.java | 24 +-- .../com/google/iam/v1/IAMPolicyClient.java | 6 +- .../kms/v1/KeyManagementServiceClient.java | 138 ++++++++--------- .../library/v1/LibraryServiceClient.java | 66 ++++---- .../google/cloud/logging/v2/ConfigClient.java | 138 ++++++++--------- .../cloud/logging/v2/LoggingClient.java | 30 ++-- .../cloud/logging/v2/MetricsClient.java | 30 ++-- .../cloud/pubsub/v1/SchemaServiceClient.java | 62 ++++---- .../pubsub/v1/SubscriptionAdminClient.java | 96 ++++++------ .../cloud/pubsub/v1/TopicAdminClient.java | 52 +++---- .../cloud/redis/v1beta1/CloudRedisClient.java | 60 +++---- .../com/google/storage/v2/StorageClient.java | 146 +++++++++--------- 17 files changed, 503 insertions(+), 503 deletions(-) diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java index b1c065a504..7492c30b72 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/ConnectionServiceClient.java @@ -214,7 +214,7 @@ public ConnectionServiceStub getStub() { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { ListConnectionsRequest request = @@ -246,7 +246,7 @@ public final ListConnectionsPagedResponse listConnections(EndpointName parent) { * * @param parent Required. Parent name of the form: `projects/{project_number or * project_id}/endpoints/{endpoint}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListConnectionsPagedResponse listConnections(String parent) { ListConnectionsRequest request = ListConnectionsRequest.newBuilder().setParent(parent).build(); @@ -279,7 +279,7 @@ public final ListConnectionsPagedResponse listConnections(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListConnectionsPagedResponse listConnections(ListConnectionsRequest request) { return listConnectionsPagedCallable().call(request); diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java index d93f39939e..a1c65853fb 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/AssetServiceClient.java @@ -590,7 +590,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture exportAssetsAsync( ExportAssetsRequest request) { @@ -701,7 +701,7 @@ public final UnaryCallable exportAssetsCallable( * Format: "organizations/[organization-number]" (such as "organizations/123"), * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAssetsPagedResponse listAssets(ResourceName parent) { ListAssetsRequest request = @@ -733,7 +733,7 @@ public final ListAssetsPagedResponse listAssets(ResourceName parent) { * Format: "organizations/[organization-number]" (such as "organizations/123"), * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAssetsPagedResponse listAssets(String parent) { ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); @@ -770,7 +770,7 @@ public final ListAssetsPagedResponse listAssets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { return listAssetsPagedCallable().call(request); @@ -883,7 +883,7 @@ public final UnaryCallable listAssetsCall * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( BatchGetAssetsHistoryRequest request) { @@ -949,7 +949,7 @@ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( * created in. It can only be an organization number (such as "organizations/123"), a folder * number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a * project number (such as "projects/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed createFeed(String parent) { CreateFeedRequest request = CreateFeedRequest.newBuilder().setParent(parent).build(); @@ -980,7 +980,7 @@ public final Feed createFeed(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed createFeed(CreateFeedRequest request) { return createFeedCallable().call(request); @@ -1036,7 +1036,7 @@ public final UnaryCallable createFeedCallable() { * @param name Required. The name of the Feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed getFeed(FeedName name) { GetFeedRequest request = @@ -1065,7 +1065,7 @@ public final Feed getFeed(FeedName name) { * @param name Required. The name of the Feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed getFeed(String name) { GetFeedRequest request = GetFeedRequest.newBuilder().setName(name).build(); @@ -1094,7 +1094,7 @@ public final Feed getFeed(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed getFeed(GetFeedRequest request) { return getFeedCallable().call(request); @@ -1148,7 +1148,7 @@ public final UnaryCallable getFeedCallable() { * @param parent Required. The parent project/folder/organization whose feeds are to be listed. It * can only be using project/folder/organization number (such as "folders/12345")", or a * project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListFeedsResponse listFeeds(String parent) { ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent(parent).build(); @@ -1175,7 +1175,7 @@ public final ListFeedsResponse listFeeds(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListFeedsResponse listFeeds(ListFeedsRequest request) { return listFeedsCallable().call(request); @@ -1228,7 +1228,7 @@ public final UnaryCallable listFeedsCallabl * @param feed Required. The new values of feed details. It must match an existing feed and the * field `name` must be in the format of: projects/project_number/feeds/feed_id or * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed updateFeed(Feed feed) { UpdateFeedRequest request = UpdateFeedRequest.newBuilder().setFeed(feed).build(); @@ -1258,7 +1258,7 @@ public final Feed updateFeed(Feed feed) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feed updateFeed(UpdateFeedRequest request) { return updateFeedCallable().call(request); @@ -1313,7 +1313,7 @@ public final UnaryCallable updateFeedCallable() { * @param name Required. The name of the feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteFeed(FeedName name) { DeleteFeedRequest request = @@ -1342,7 +1342,7 @@ public final void deleteFeed(FeedName name) { * @param name Required. The name of the feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteFeed(String name) { DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); @@ -1371,7 +1371,7 @@ public final void deleteFeed(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteFeed(DeleteFeedRequest request) { deleteFeedCallable().call(request); @@ -1500,7 +1500,7 @@ public final UnaryCallable deleteFeedCallable() { *

    See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular * expression syntax. If the regular expression does not match any supported asset type, an * INVALID_ARGUMENT error will be returned. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchAllResourcesPagedResponse searchAllResources( String scope, String query, List assetTypes) { @@ -1546,7 +1546,7 @@ public final SearchAllResourcesPagedResponse searchAllResources( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchAllResourcesPagedResponse searchAllResources( SearchAllResourcesRequest request) { @@ -1712,7 +1712,7 @@ public final SearchAllResourcesPagedResponse searchAllResources( * "user". * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) { SearchAllIamPoliciesRequest request = @@ -1752,7 +1752,7 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( SearchAllIamPoliciesRequest request) { @@ -1866,7 +1866,7 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest request) { return analyzeIamPolicyCallable().call(request); @@ -1935,7 +1935,7 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture< AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> @@ -2049,7 +2049,7 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AnalyzeMoveResponse analyzeMove(AnalyzeMoveRequest request) { return analyzeMoveCallable().call(request); @@ -2124,7 +2124,7 @@ public final UnaryCallable analyzeMoveC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final QueryAssetsResponse queryAssets(QueryAssetsRequest request) { return queryAssetsCallable().call(request); @@ -2204,7 +2204,7 @@ public final UnaryCallable queryAssetsC *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery createSavedQuery( FolderName parent, SavedQuery savedQuery, String savedQueryId) { @@ -2248,7 +2248,7 @@ public final SavedQuery createSavedQuery( *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery createSavedQuery( OrganizationName parent, SavedQuery savedQuery, String savedQueryId) { @@ -2292,7 +2292,7 @@ public final SavedQuery createSavedQuery( *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery createSavedQuery( ProjectName parent, SavedQuery savedQuery, String savedQueryId) { @@ -2336,7 +2336,7 @@ public final SavedQuery createSavedQuery( *

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. *

    Notice that this field is required in the saved query creation, and the `name` field of * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery createSavedQuery( String parent, SavedQuery savedQuery, String savedQueryId) { @@ -2373,7 +2373,7 @@ public final SavedQuery createSavedQuery( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery createSavedQuery(CreateSavedQueryRequest request) { return createSavedQueryCallable().call(request); @@ -2434,7 +2434,7 @@ public final UnaryCallable createSavedQuery *

  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery getSavedQuery(SavedQueryName name) { GetSavedQueryRequest request = @@ -2467,7 +2467,7 @@ public final SavedQuery getSavedQuery(SavedQueryName name) { *
  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery getSavedQuery(String name) { GetSavedQueryRequest request = GetSavedQueryRequest.newBuilder().setName(name).build(); @@ -2497,7 +2497,7 @@ public final SavedQuery getSavedQuery(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery getSavedQuery(GetSavedQueryRequest request) { return getSavedQueryCallable().call(request); @@ -2554,7 +2554,7 @@ public final UnaryCallable getSavedQueryCallab * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSavedQueriesPagedResponse listSavedQueries(FolderName parent) { ListSavedQueriesRequest request = @@ -2587,7 +2587,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(FolderName parent) { * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSavedQueriesPagedResponse listSavedQueries(OrganizationName parent) { ListSavedQueriesRequest request = @@ -2620,7 +2620,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(OrganizationName par * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSavedQueriesPagedResponse listSavedQueries(ProjectName parent) { ListSavedQueriesRequest request = @@ -2653,7 +2653,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(ProjectName parent) * @param parent Required. The parent project/folder/organization whose savedQueries are to be * listed. It can only be using project/folder/organization number (such as "folders/12345")", * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSavedQueriesPagedResponse listSavedQueries(String parent) { ListSavedQueriesRequest request = @@ -2688,7 +2688,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSavedQueriesPagedResponse listSavedQueries(ListSavedQueriesRequest request) { return listSavedQueriesPagedCallable().call(request); @@ -2798,7 +2798,7 @@ public final ListSavedQueriesPagedResponse listSavedQueries(ListSavedQueriesRequ * * * @param updateMask Required. The list of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery updateSavedQuery(SavedQuery savedQuery, FieldMask updateMask) { UpdateSavedQueryRequest request = @@ -2832,7 +2832,7 @@ public final SavedQuery updateSavedQuery(SavedQuery savedQuery, FieldMask update * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SavedQuery updateSavedQuery(UpdateSavedQueryRequest request) { return updateSavedQueryCallable().call(request); @@ -2892,7 +2892,7 @@ public final UnaryCallable updateSavedQuery *
  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSavedQuery(SavedQueryName name) { DeleteSavedQueryRequest request = @@ -2925,7 +2925,7 @@ public final void deleteSavedQuery(SavedQueryName name) { *
  • organizations/organization_number/savedQueries/saved_query_id * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSavedQuery(String name) { DeleteSavedQueryRequest request = DeleteSavedQueryRequest.newBuilder().setName(name).build(); @@ -2955,7 +2955,7 @@ public final void deleteSavedQuery(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSavedQuery(DeleteSavedQueryRequest request) { deleteSavedQueryCallable().call(request); @@ -3013,7 +3013,7 @@ public final UnaryCallable deleteSavedQueryCalla * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final BatchGetEffectiveIamPoliciesResponse batchGetEffectiveIamPolicies( BatchGetEffectiveIamPoliciesRequest request) { diff --git a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java index 60b3ef292c..283d320ca1 100644 --- a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java +++ b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java @@ -382,7 +382,7 @@ public final ServerStreamingCallable readRows * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations) { @@ -423,7 +423,7 @@ public final MutateRowResponse mutateRow( * @param mutations Required. Changes to be atomically applied to the specified row. Entries are * applied in order, meaning that earlier mutations can be masked by later ones. Must contain * at least one entry and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations) { @@ -468,7 +468,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( TableName tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -514,7 +514,7 @@ public final MutateRowResponse mutateRow( * at least one entry and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow( String tableName, ByteString rowKey, List mutations, String appProfileId) { @@ -554,7 +554,7 @@ public final MutateRowResponse mutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MutateRowResponse mutateRow(MutateRowRequest request) { return mutateRowCallable().call(request); @@ -663,7 +663,7 @@ public final ServerStreamingCallable muta * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -721,7 +721,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied * in order, meaning that earlier mutations can be masked by later ones. Must contain at least * one entry if `true_mutations` is empty, and at most 100000. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -782,7 +782,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( TableName tableName, @@ -845,7 +845,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * one entry if `true_mutations` is empty, and at most 100000. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow( String tableName, @@ -893,7 +893,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request) { return checkAndMutateRowCallable().call(request); @@ -954,7 +954,7 @@ public final CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowReques * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(InstanceName name) { PingAndWarmRequest request = @@ -983,7 +983,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name) { * * @param name Required. The unique name of the instance to check permissions for as well as * respond. Values are of the form `projects/<project>/instances/<instance>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(String name) { PingAndWarmRequest request = PingAndWarmRequest.newBuilder().setName(name).build(); @@ -1014,7 +1014,7 @@ public final PingAndWarmResponse pingAndWarm(String name) { * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfileId) { PingAndWarmRequest request = @@ -1049,7 +1049,7 @@ public final PingAndWarmResponse pingAndWarm(InstanceName name, String appProfil * respond. Values are of the form `projects/<project>/instances/<instance>`. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { PingAndWarmRequest request = @@ -1081,7 +1081,7 @@ public final PingAndWarmResponse pingAndWarm(String name, String appProfileId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PingAndWarmResponse pingAndWarm(PingAndWarmRequest request) { return pingAndWarmCallable().call(request); @@ -1149,7 +1149,7 @@ public final UnaryCallable pingAndWarmC * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, ByteString rowKey, List rules) { @@ -1194,7 +1194,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * @param rules Required. Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will affect the * results of later ones. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules) { @@ -1242,7 +1242,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( TableName tableName, @@ -1294,7 +1294,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * results of later ones. * @param appProfileId This value specifies routing for replication. If not specified, the * "default" application profile will be used. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow( String tableName, ByteString rowKey, List rules, String appProfileId) { @@ -1336,7 +1336,7 @@ public final ReadModifyWriteRowResponse readModifyWriteRow( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request) { return readModifyWriteRowCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java index 9c1bb3031a..4d38b8848f 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/AddressesClient.java @@ -256,7 +256,7 @@ public AddressesStub getStub() { * } * * @param project Project ID for this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AggregatedListPagedResponse aggregatedList(String project) { AggregatedListAddressesRequest request = @@ -294,7 +294,7 @@ public final AggregatedListPagedResponse aggregatedList(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesRequest request) { return aggregatedListPagedCallable().call(request); @@ -401,7 +401,7 @@ public final AggregatedListPagedResponse aggregatedList(AggregatedListAddressesR * @param project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAsync( String project, String region, String address) { @@ -439,7 +439,7 @@ public final OperationFuture deleteAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAsync(DeleteAddressRequest request) { return deleteOperationCallable().futureCall(request); @@ -530,7 +530,7 @@ public final UnaryCallable deleteCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param addressResource The body resource for this request - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture insertAsync( String project, String region, Address addressResource) { @@ -568,7 +568,7 @@ public final OperationFuture insertAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture insertAsync(InsertAddressRequest request) { return insertOperationCallable().futureCall(request); @@ -667,7 +667,7 @@ public final UnaryCallable insertCallable() { * in reverse chronological order (newest result first). Use this to sort resources like * operations so that the newest operation is returned first. *

    Currently, only sorting by name or creationTimestamp desc is supported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPagedResponse list(String project, String region, String orderBy) { ListAddressesRequest request = @@ -708,7 +708,7 @@ public final ListPagedResponse list(String project, String region, String orderB * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPagedResponse list(ListAddressesRequest request) { return listPagedCallable().call(request); diff --git a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java index 07cfe43d0b..f11122b18e 100644 --- a/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java +++ b/test/integration/goldens/compute/src/com/google/cloud/compute/v1small/RegionOperationsClient.java @@ -209,7 +209,7 @@ public RegionOperationsStub getStub() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation get(String project, String region, String operation) { GetRegionOperationRequest request = @@ -245,7 +245,7 @@ public final Operation get(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation get(GetRegionOperationRequest request) { return getCallable().call(request); @@ -312,7 +312,7 @@ public final UnaryCallable getCallable() { * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation wait(String project, String region, String operation) { WaitRegionOperationRequest request = @@ -357,7 +357,7 @@ public final Operation wait(String project, String region, String operation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Operation wait(WaitRegionOperationRequest request) { return waitCallable().call(request); diff --git a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java index fdec74ebd7..e0d2d4a3e7 100644 --- a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java +++ b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java @@ -288,7 +288,7 @@ public IamCredentialsStub getStub() { * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateAccessTokenResponse generateAccessToken( ServiceAccountName name, List delegates, List scope, Duration lifetime) { @@ -342,7 +342,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * @param lifetime The desired lifetime duration of the access token in seconds. Must be set to a * value less than or equal to 3600 (1 hour). If a value is not specified, the token's * lifetime will be set to a default value of one hour. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateAccessTokenResponse generateAccessToken( String name, List delegates, List scope, Duration lifetime) { @@ -381,7 +381,7 @@ public final GenerateAccessTokenResponse generateAccessToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessTokenRequest request) { return generateAccessTokenCallable().call(request); @@ -457,7 +457,7 @@ public final GenerateAccessTokenResponse generateAccessToken(GenerateAccessToken * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateIdTokenResponse generateIdToken( ServiceAccountName name, List delegates, String audience, boolean includeEmail) { @@ -509,7 +509,7 @@ public final GenerateIdTokenResponse generateIdToken( * token grants access to. * @param includeEmail Include the service account email in the token. If set to `true`, the token * will contain `email` and `email_verified` claims. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateIdTokenResponse generateIdToken( String name, List delegates, String audience, boolean includeEmail) { @@ -548,7 +548,7 @@ public final GenerateIdTokenResponse generateIdToken( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest request) { return generateIdTokenCallable().call(request); @@ -619,7 +619,7 @@ public final GenerateIdTokenResponse generateIdToken(GenerateIdTokenRequest requ * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignBlobResponse signBlob( ServiceAccountName name, List delegates, ByteString payload) { @@ -665,7 +665,7 @@ public final SignBlobResponse signBlob( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The bytes to sign. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignBlobResponse signBlob(String name, List delegates, ByteString payload) { SignBlobRequest request = @@ -701,7 +701,7 @@ public final SignBlobResponse signBlob(String name, List delegates, Byte * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignBlobResponse signBlob(SignBlobRequest request) { return signBlobCallable().call(request); @@ -770,7 +770,7 @@ public final UnaryCallable signBlobCallable() * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignJwtResponse signJwt( ServiceAccountName name, List delegates, String payload) { @@ -816,7 +816,7 @@ public final SignJwtResponse signJwt( * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is * required; replacing it with a project ID is invalid. * @param payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignJwtResponse signJwt(String name, List delegates, String payload) { SignJwtRequest request = @@ -852,7 +852,7 @@ public final SignJwtResponse signJwt(String name, List delegates, String * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SignJwtResponse signJwt(SignJwtRequest request) { return signJwtCallable().call(request); diff --git a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java index 5459928ec4..2813d9e10e 100644 --- a/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java +++ b/test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java @@ -238,7 +238,7 @@ public IAMPolicyStub getStub() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -299,7 +299,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -362,7 +362,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java index 4cac1bc846..f2d809d6a6 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyManagementServiceClient.java @@ -703,7 +703,7 @@ public KeyManagementServiceStub getStub() { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { ListKeyRingsRequest request = @@ -736,7 +736,7 @@ public final ListKeyRingsPagedResponse listKeyRings(LocationName parent) { * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeyRingsPagedResponse listKeyRings(String parent) { ListKeyRingsRequest request = ListKeyRingsRequest.newBuilder().setParent(parent).build(); @@ -772,7 +772,7 @@ public final ListKeyRingsPagedResponse listKeyRings(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeyRingsPagedResponse listKeyRings(ListKeyRingsRequest request) { return listKeyRingsPagedCallable().call(request); @@ -879,7 +879,7 @@ public final UnaryCallable listKeyRin * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { ListCryptoKeysRequest request = @@ -912,7 +912,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { ListCryptoKeysRequest request = ListCryptoKeysRequest.newBuilder().setParent(parent).build(); @@ -948,7 +948,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest request) { return listCryptoKeysPagedCallable().call(request); @@ -1058,7 +1058,7 @@ public final ListCryptoKeysPagedResponse listCryptoKeys(ListCryptoKeysRequest re * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyName parent) { ListCryptoKeyVersionsRequest request = @@ -1093,7 +1093,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(CryptoKeyN * * @param parent Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to * list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String parent) { ListCryptoKeyVersionsRequest request = @@ -1133,7 +1133,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions(String par * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( ListCryptoKeyVersionsRequest request) { @@ -1246,7 +1246,7 @@ public final ListCryptoKeyVersionsPagedResponse listCryptoKeyVersions( * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { ListImportJobsRequest request = @@ -1279,7 +1279,7 @@ public final ListImportJobsPagedResponse listImportJobs(KeyRingName parent) { * * @param parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] to * list, in the format `projects/*/locations/*/keyRings/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListImportJobsPagedResponse listImportJobs(String parent) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build(); @@ -1315,7 +1315,7 @@ public final ListImportJobsPagedResponse listImportJobs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) { return listImportJobsPagedCallable().call(request); @@ -1421,7 +1421,7 @@ public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest re * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing getKeyRing(KeyRingName name) { GetKeyRingRequest request = @@ -1450,7 +1450,7 @@ public final KeyRing getKeyRing(KeyRingName name) { * * @param name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing getKeyRing(String name) { GetKeyRingRequest request = GetKeyRingRequest.newBuilder().setName(name).build(); @@ -1480,7 +1480,7 @@ public final KeyRing getKeyRing(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing getKeyRing(GetKeyRingRequest request) { return getKeyRingCallable().call(request); @@ -1539,7 +1539,7 @@ public final UnaryCallable getKeyRingCallable() { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey getCryptoKey(CryptoKeyName name) { GetCryptoKeyRequest request = @@ -1571,7 +1571,7 @@ public final CryptoKey getCryptoKey(CryptoKeyName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey getCryptoKey(String name) { GetCryptoKeyRequest request = GetCryptoKeyRequest.newBuilder().setName(name).build(); @@ -1605,7 +1605,7 @@ public final CryptoKey getCryptoKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey getCryptoKey(GetCryptoKeyRequest request) { return getCryptoKeyCallable().call(request); @@ -1667,7 +1667,7 @@ public final UnaryCallable getCryptoKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { GetCryptoKeyVersionRequest request = @@ -1701,7 +1701,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion getCryptoKeyVersion(String name) { GetCryptoKeyVersionRequest request = @@ -1739,7 +1739,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest request) { return getCryptoKeyVersionCallable().call(request); @@ -1808,7 +1808,7 @@ public final CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest req * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublicKey getPublicKey(CryptoKeyVersionName name) { GetPublicKeyRequest request = @@ -1843,7 +1843,7 @@ public final PublicKey getPublicKey(CryptoKeyVersionName name) { * * @param name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublicKey getPublicKey(String name) { GetPublicKeyRequest request = GetPublicKeyRequest.newBuilder().setName(name).build(); @@ -1883,7 +1883,7 @@ public final PublicKey getPublicKey(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublicKey getPublicKey(GetPublicKeyRequest request) { return getPublicKeyCallable().call(request); @@ -1950,7 +1950,7 @@ public final UnaryCallable getPublicKeyCallable( * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob getImportJob(ImportJobName name) { GetImportJobRequest request = @@ -1980,7 +1980,7 @@ public final ImportJob getImportJob(ImportJobName name) { * * @param name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob getImportJob(String name) { GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build(); @@ -2012,7 +2012,7 @@ public final ImportJob getImportJob(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob getImportJob(GetImportJobRequest request) { return getImportJobCallable().call(request); @@ -2075,7 +2075,7 @@ public final UnaryCallable getImportJobCallable( * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2113,7 +2113,7 @@ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRin * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = @@ -2150,7 +2150,7 @@ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(CreateKeyRingRequest request) { return createKeyRingCallable().call(request); @@ -2220,7 +2220,7 @@ public final UnaryCallable createKeyRingCallable( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey createCryptoKey( KeyRingName parent, String cryptoKeyId, CryptoKey cryptoKey) { @@ -2266,7 +2266,7 @@ public final CryptoKey createCryptoKey( * expression `[a-zA-Z0-9_-]{1,63}` * @param cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, CryptoKey cryptoKey) { CreateCryptoKeyRequest request = @@ -2309,7 +2309,7 @@ public final CryptoKey createCryptoKey(String parent, String cryptoKeyId, Crypto * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey createCryptoKey(CreateCryptoKeyRequest request) { return createCryptoKeyCallable().call(request); @@ -2384,7 +2384,7 @@ public final UnaryCallable createCryptoKeyCal * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion createCryptoKeyVersion( CryptoKeyName parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2428,7 +2428,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. * @param cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * with initial field values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion createCryptoKeyVersion( String parent, CryptoKeyVersion cryptoKeyVersion) { @@ -2471,7 +2471,7 @@ public final CryptoKeyVersion createCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionRequest request) { return createCryptoKeyVersionCallable().call(request); @@ -2546,7 +2546,7 @@ public final CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionReque * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionRequest request) { return importCryptoKeyVersionCallable().call(request); @@ -2622,7 +2622,7 @@ public final CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionReque * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob createImportJob( KeyRingName parent, String importJobId, ImportJob importJob) { @@ -2667,7 +2667,7 @@ public final ImportJob createImportJob( * expression `[a-zA-Z0-9_-]{1,63}` * @param importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field * values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob createImportJob(String parent, String importJobId, ImportJob importJob) { CreateImportJobRequest request = @@ -2707,7 +2707,7 @@ public final ImportJob createImportJob(String parent, String importJobId, Import * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ImportJob createImportJob(CreateImportJobRequest request) { return createImportJobCallable().call(request); @@ -2769,7 +2769,7 @@ public final UnaryCallable createImportJobCal * * @param cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask) { UpdateCryptoKeyRequest request = @@ -2804,7 +2804,7 @@ public final CryptoKey updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKey(UpdateCryptoKeyRequest request) { return updateCryptoKeyCallable().call(request); @@ -2872,7 +2872,7 @@ public final UnaryCallable updateCryptoKeyCal * @param cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with * updated values. * @param updateMask Required. List of fields to be updated in this request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion updateCryptoKeyVersion( CryptoKeyVersion cryptoKeyVersion, FieldMask updateMask) { @@ -2916,7 +2916,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request) { return updateCryptoKeyVersionCallable().call(request); @@ -2995,7 +2995,7 @@ public final CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionReque * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { EncryptRequest request = @@ -3041,7 +3041,7 @@ public final EncryptResponse encrypt(ResourceName name, ByteString plaintext) { * larger than 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined * length of the plaintext and additional_authenticated_data fields must be no larger than * 8KiB. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EncryptResponse encrypt(String name, ByteString plaintext) { EncryptRequest request = @@ -3081,7 +3081,7 @@ public final EncryptResponse encrypt(String name, ByteString plaintext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EncryptResponse encrypt(EncryptRequest request) { return encryptCallable().call(request); @@ -3153,7 +3153,7 @@ public final UnaryCallable encryptCallable() { * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) { DecryptRequest request = @@ -3192,7 +3192,7 @@ public final DecryptResponse decrypt(CryptoKeyName name, ByteString ciphertext) * use for decryption. The server will choose the appropriate version. * @param ciphertext Required. The encrypted data originally returned in * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DecryptResponse decrypt(String name, ByteString ciphertext) { DecryptRequest request = @@ -3232,7 +3232,7 @@ public final DecryptResponse decrypt(String name, ByteString ciphertext) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DecryptResponse decrypt(DecryptRequest request) { return decryptCallable().call(request); @@ -3306,7 +3306,7 @@ public final UnaryCallable decryptCallable() { * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Digest digest) { AsymmetricSignRequest request = @@ -3348,7 +3348,7 @@ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Di * @param digest Required. The digest of the data to sign. The digest must be produced with the * same digest algorithm as specified by the key version's * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { AsymmetricSignRequest request = @@ -3391,7 +3391,7 @@ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request) { return asymmetricSignCallable().call(request); @@ -3469,7 +3469,7 @@ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricDecryptResponse asymmetricDecrypt( CryptoKeyVersionName name, ByteString ciphertext) { @@ -3512,7 +3512,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt( * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for decryption. * @param ciphertext Required. The data encrypted with the named * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using OAEP. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString ciphertext) { AsymmetricDecryptRequest request = @@ -3555,7 +3555,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(String name, ByteString * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptRequest request) { return asymmetricDecryptCallable().call(request); @@ -3632,7 +3632,7 @@ public final AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptReques * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKeyPrimaryVersion( CryptoKeyName name, String cryptoKeyVersionId) { @@ -3673,7 +3673,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * update. * @param cryptoKeyVersionId Required. The id of the child * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) { UpdateCryptoKeyPrimaryVersionRequest request = @@ -3713,7 +3713,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoK * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKey updateCryptoKeyPrimaryVersion( UpdateCryptoKeyPrimaryVersionRequest request) { @@ -3792,7 +3792,7 @@ public final CryptoKey updateCryptoKeyPrimaryVersion( * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) { DestroyCryptoKeyVersionRequest request = @@ -3839,7 +3839,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { DestroyCryptoKeyVersionRequest request = @@ -3890,7 +3890,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request) { return destroyCryptoKeyVersionCallable().call(request); @@ -3976,7 +3976,7 @@ public final CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionReq * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) { RestoreCryptoKeyVersionRequest request = @@ -4017,7 +4017,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(CryptoKeyVersionName name) * * @param name Required. The resource name of the * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { RestoreCryptoKeyVersionRequest request = @@ -4062,7 +4062,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request) { return restoreCryptoKeyVersionCallable().call(request); @@ -4139,7 +4139,7 @@ public final CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -4206,7 +4206,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { return listLocationsPagedCallable().call(request); @@ -4308,7 +4308,7 @@ public final UnaryCallable listLoca * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Location getLocation(GetLocationRequest request) { return getLocationCallable().call(request); @@ -4367,7 +4367,7 @@ public final UnaryCallable getLocationCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java index 7dba4f5fdd..81a22204e8 100644 --- a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java +++ b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/LibraryServiceClient.java @@ -420,7 +420,7 @@ public LibraryServiceStub getStub() { * } * * @param shelf The shelf to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf createShelf(Shelf shelf) { CreateShelfRequest request = CreateShelfRequest.newBuilder().setShelf(shelf).build(); @@ -447,7 +447,7 @@ public final Shelf createShelf(Shelf shelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf createShelf(CreateShelfRequest request) { return createShelfCallable().call(request); @@ -497,7 +497,7 @@ public final UnaryCallable createShelfCallable() { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf getShelf(ShelfName name) { GetShelfRequest request = @@ -524,7 +524,7 @@ public final Shelf getShelf(ShelfName name) { * } * * @param name The name of the shelf to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf getShelf(String name) { GetShelfRequest request = GetShelfRequest.newBuilder().setName(name).build(); @@ -551,7 +551,7 @@ public final Shelf getShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf getShelf(GetShelfRequest request) { return getShelfCallable().call(request); @@ -608,7 +608,7 @@ public final UnaryCallable getShelfCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListShelvesPagedResponse listShelves(ListShelvesRequest request) { return listShelvesPagedCallable().call(request); @@ -703,7 +703,7 @@ public final UnaryCallable listShelvesC * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteShelf(ShelfName name) { DeleteShelfRequest request = @@ -730,7 +730,7 @@ public final void deleteShelf(ShelfName name) { * } * * @param name The name of the shelf to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteShelf(String name) { DeleteShelfRequest request = DeleteShelfRequest.newBuilder().setName(name).build(); @@ -757,7 +757,7 @@ public final void deleteShelf(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteShelf(DeleteShelfRequest request) { deleteShelfCallable().call(request); @@ -814,7 +814,7 @@ public final UnaryCallable deleteShelfCallable() { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -851,7 +851,7 @@ public final Shelf mergeShelves(ShelfName name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(ShelfName name, String otherShelf) { MergeShelvesRequest request = @@ -888,7 +888,7 @@ public final Shelf mergeShelves(ShelfName name, String otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(String name, ShelfName otherShelf) { MergeShelvesRequest request = @@ -925,7 +925,7 @@ public final Shelf mergeShelves(String name, ShelfName otherShelf) { * * @param name The name of the shelf we're adding books to. * @param otherShelf The name of the shelf we're removing books from and deleting. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(String name, String otherShelf) { MergeShelvesRequest request = @@ -961,7 +961,7 @@ public final Shelf mergeShelves(String name, String otherShelf) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Shelf mergeShelves(MergeShelvesRequest request) { return mergeShelvesCallable().call(request); @@ -1021,7 +1021,7 @@ public final UnaryCallable mergeShelvesCallable() { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book createBook(ShelfName parent, Book book) { CreateBookRequest request = @@ -1053,7 +1053,7 @@ public final Book createBook(ShelfName parent, Book book) { * * @param parent The name of the shelf in which the book is created. * @param book The book to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book createBook(String parent, Book book) { CreateBookRequest request = @@ -1084,7 +1084,7 @@ public final Book createBook(String parent, Book book) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book createBook(CreateBookRequest request) { return createBookCallable().call(request); @@ -1137,7 +1137,7 @@ public final UnaryCallable createBookCallable() { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(BookName name) { GetBookRequest request = @@ -1164,7 +1164,7 @@ public final Book getBook(BookName name) { * } * * @param name The name of the book to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(String name) { GetBookRequest request = GetBookRequest.newBuilder().setName(name).build(); @@ -1191,7 +1191,7 @@ public final Book getBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book getBook(GetBookRequest request) { return getBookCallable().call(request); @@ -1245,7 +1245,7 @@ public final UnaryCallable getBookCallable() { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBooksPagedResponse listBooks(ShelfName parent) { ListBooksRequest request = @@ -1276,7 +1276,7 @@ public final ListBooksPagedResponse listBooks(ShelfName parent) { * } * * @param parent The name of the shelf whose books we'd like to list. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBooksPagedResponse listBooks(String parent) { ListBooksRequest request = ListBooksRequest.newBuilder().setParent(parent).build(); @@ -1311,7 +1311,7 @@ public final ListBooksPagedResponse listBooks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBooksPagedResponse listBooks(ListBooksRequest request) { return listBooksPagedCallable().call(request); @@ -1409,7 +1409,7 @@ public final UnaryCallable listBooksCallabl * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBook(BookName name) { DeleteBookRequest request = @@ -1436,7 +1436,7 @@ public final void deleteBook(BookName name) { * } * * @param name The name of the book to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBook(String name) { DeleteBookRequest request = DeleteBookRequest.newBuilder().setName(name).build(); @@ -1465,7 +1465,7 @@ public final void deleteBook(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBook(DeleteBookRequest request) { deleteBookCallable().call(request); @@ -1520,7 +1520,7 @@ public final UnaryCallable deleteBookCallable() { * * @param book The name of the book to update. * @param updateMask Required. Mask of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book updateBook(Book book, FieldMask updateMask) { UpdateBookRequest request = @@ -1552,7 +1552,7 @@ public final Book updateBook(Book book, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book updateBook(UpdateBookRequest request) { return updateBookCallable().call(request); @@ -1609,7 +1609,7 @@ public final UnaryCallable updateBookCallable() { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(BookName name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1642,7 +1642,7 @@ public final Book moveBook(BookName name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(BookName name, String otherShelfName) { MoveBookRequest request = @@ -1675,7 +1675,7 @@ public final Book moveBook(BookName name, String otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(String name, ShelfName otherShelfName) { MoveBookRequest request = @@ -1708,7 +1708,7 @@ public final Book moveBook(String name, ShelfName otherShelfName) { * * @param name The name of the book to move. * @param otherShelfName The name of the destination shelf. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(String name, String otherShelfName) { MoveBookRequest request = @@ -1740,7 +1740,7 @@ public final Book moveBook(String name, String otherShelfName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Book moveBook(MoveBookRequest request) { return moveBookCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java index dc70a130b5..c7ff1421c9 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/ConfigClient.java @@ -717,7 +717,7 @@ public final OperationsClient getOperationsClient() { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName parent) { ListBucketsRequest request = @@ -754,7 +754,7 @@ public final ListBucketsPagedResponse listBuckets(BillingAccountLocationName par * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { ListBucketsRequest request = @@ -791,7 +791,7 @@ public final ListBucketsPagedResponse listBuckets(FolderLocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(LocationName parent) { ListBucketsRequest request = @@ -828,7 +828,7 @@ public final ListBucketsPagedResponse listBuckets(LocationName parent) { * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName parent) { ListBucketsRequest request = @@ -865,7 +865,7 @@ public final ListBucketsPagedResponse listBuckets(OrganizationLocationName paren * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" *

    Note: The locations portion of the resource must be specified, but supplying the * character `-` in place of [LOCATION_ID] will return all buckets. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -898,7 +898,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -998,7 +998,7 @@ public final UnaryCallable listBucketsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogBucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -1058,7 +1058,7 @@ public final UnaryCallable getBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogBucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1129,7 +1129,7 @@ public final UnaryCallable createBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogBucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1202,7 +1202,7 @@ public final UnaryCallable updateBucketCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -1265,7 +1265,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void undeleteBucket(UndeleteBucketRequest request) { undeleteBucketCallable().call(request); @@ -1323,7 +1323,7 @@ public final UnaryCallable undeleteBucketCallable( * * @param parent Required. The bucket whose views are to be listed: *

    "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListViewsPagedResponse listViews(String parent) { ListViewsRequest request = ListViewsRequest.newBuilder().setParent(parent).build(); @@ -1356,7 +1356,7 @@ public final ListViewsPagedResponse listViews(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListViewsPagedResponse listViews(ListViewsRequest request) { return listViewsPagedCallable().call(request); @@ -1456,7 +1456,7 @@ public final UnaryCallable listViewsCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogView getView(GetViewRequest request) { return getViewCallable().call(request); @@ -1516,7 +1516,7 @@ public final UnaryCallable getViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogView createView(CreateViewRequest request) { return createViewCallable().call(request); @@ -1578,7 +1578,7 @@ public final UnaryCallable createViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogView updateView(UpdateViewRequest request) { return updateViewCallable().call(request); @@ -1643,7 +1643,7 @@ public final UnaryCallable updateViewCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteView(DeleteViewRequest request) { deleteViewCallable().call(request); @@ -1704,7 +1704,7 @@ public final UnaryCallable deleteViewCallable() { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { ListSinksRequest request = @@ -1735,7 +1735,7 @@ public final ListSinksPagedResponse listSinks(BillingAccountName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(FolderName parent) { ListSinksRequest request = @@ -1766,7 +1766,7 @@ public final ListSinksPagedResponse listSinks(FolderName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(OrganizationName parent) { ListSinksRequest request = @@ -1797,7 +1797,7 @@ public final ListSinksPagedResponse listSinks(OrganizationName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(ProjectName parent) { ListSinksRequest request = @@ -1828,7 +1828,7 @@ public final ListSinksPagedResponse listSinks(ProjectName parent) { * @param parent Required. The parent resource whose sinks are to be listed: *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(String parent) { ListSinksRequest request = ListSinksRequest.newBuilder().setParent(parent).build(); @@ -1861,7 +1861,7 @@ public final ListSinksPagedResponse listSinks(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSinksPagedResponse listSinks(ListSinksRequest request) { return listSinksPagedCallable().call(request); @@ -1961,7 +1961,7 @@ public final UnaryCallable listSinksCallabl * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink getSink(LogSinkName sinkName) { GetSinkRequest request = @@ -1996,7 +1996,7 @@ public final LogSink getSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink getSink(String sinkName) { GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2025,7 +2025,7 @@ public final LogSink getSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink getSink(GetSinkRequest request) { return getSinkCallable().call(request); @@ -2087,7 +2087,7 @@ public final UnaryCallable getSinkCallable() { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(BillingAccountName parent, LogSink sink) { CreateSinkRequest request = @@ -2127,7 +2127,7 @@ public final LogSink createSink(BillingAccountName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(FolderName parent, LogSink sink) { CreateSinkRequest request = @@ -2167,7 +2167,7 @@ public final LogSink createSink(FolderName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(OrganizationName parent, LogSink sink) { CreateSinkRequest request = @@ -2207,7 +2207,7 @@ public final LogSink createSink(OrganizationName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(ProjectName parent, LogSink sink) { CreateSinkRequest request = @@ -2247,7 +2247,7 @@ public final LogSink createSink(ProjectName parent, LogSink sink) { *

    `"projects/my-project"` `"organizations/123456789"` * @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not * already in use. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(String parent, LogSink sink) { CreateSinkRequest request = @@ -2282,7 +2282,7 @@ public final LogSink createSink(String parent, LogSink sink) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink createSink(CreateSinkRequest request) { return createSinkCallable().call(request); @@ -2353,7 +2353,7 @@ public final UnaryCallable createSinkCallable() { *

    `"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2397,7 +2397,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink) { *

    `"projects/my-project/sinks/my-sink"` * @param sink Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(String sinkName, LogSink sink) { UpdateSinkRequest request = @@ -2450,7 +2450,7 @@ public final LogSink updateSink(String sinkName, LogSink sink) { *

    For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

    For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2507,7 +2507,7 @@ public final LogSink updateSink(LogSinkName sinkName, LogSink sink, FieldMask up *

    For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask *

    For example: `updateMask=filter` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = @@ -2548,7 +2548,7 @@ public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateM * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogSink updateSink(UpdateSinkRequest request) { return updateSinkCallable().call(request); @@ -2615,7 +2615,7 @@ public final UnaryCallable updateSinkCallable() { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSink(LogSinkName sinkName) { DeleteSinkRequest request = @@ -2652,7 +2652,7 @@ public final void deleteSink(LogSinkName sinkName) { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" *

    For example: *

    `"projects/my-project/sinks/my-sink"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSink(String sinkName) { DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(sinkName).build(); @@ -2682,7 +2682,7 @@ public final void deleteSink(String sinkName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSink(DeleteSinkRequest request) { deleteSinkCallable().call(request); @@ -2739,7 +2739,7 @@ public final UnaryCallable deleteSinkCallable() { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(BillingAccountName parent) { ListExclusionsRequest request = @@ -2772,7 +2772,7 @@ public final ListExclusionsPagedResponse listExclusions(BillingAccountName paren * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { ListExclusionsRequest request = @@ -2805,7 +2805,7 @@ public final ListExclusionsPagedResponse listExclusions(FolderName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) { ListExclusionsRequest request = @@ -2838,7 +2838,7 @@ public final ListExclusionsPagedResponse listExclusions(OrganizationName parent) * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { ListExclusionsRequest request = @@ -2871,7 +2871,7 @@ public final ListExclusionsPagedResponse listExclusions(ProjectName parent) { * @param parent Required. The parent resource whose exclusions are to be listed. *

    "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(String parent) { ListExclusionsRequest request = ListExclusionsRequest.newBuilder().setParent(parent).build(); @@ -2904,7 +2904,7 @@ public final ListExclusionsPagedResponse listExclusions(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest request) { return listExclusionsPagedCallable().call(request); @@ -3007,7 +3007,7 @@ public final ListExclusionsPagedResponse listExclusions(ListExclusionsRequest re * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(LogExclusionName name) { GetExclusionRequest request = @@ -3040,7 +3040,7 @@ public final LogExclusion getExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(String name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name).build(); @@ -3070,7 +3070,7 @@ public final LogExclusion getExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(GetExclusionRequest request) { return getExclusionCallable().call(request); @@ -3131,7 +3131,7 @@ public final UnaryCallable getExclusionCallab *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3169,7 +3169,7 @@ public final LogExclusion createExclusion(BillingAccountName parent, LogExclusio *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3207,7 +3207,7 @@ public final LogExclusion createExclusion(FolderName parent, LogExclusion exclus *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3245,7 +3245,7 @@ public final LogExclusion createExclusion(OrganizationName parent, LogExclusion *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3283,7 +3283,7 @@ public final LogExclusion createExclusion(ProjectName parent, LogExclusion exclu *

    `"projects/my-logging-project"` `"organizations/123456789"` * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = @@ -3315,7 +3315,7 @@ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(CreateExclusionRequest request) { return createExclusionCallable().call(request); @@ -3385,7 +3385,7 @@ public final UnaryCallable createExclusion * mentioned in `update_mask` are not changed and are ignored in the request. *

    For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion updateExclusion( LogExclusionName name, LogExclusion exclusion, FieldMask updateMask) { @@ -3433,7 +3433,7 @@ public final LogExclusion updateExclusion( * mentioned in `update_mask` are not changed and are ignored in the request. *

    For example, to change the filter and description of an exclusion, specify an * `update_mask` of `"filter,description"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion updateExclusion( String name, LogExclusion exclusion, FieldMask updateMask) { @@ -3471,7 +3471,7 @@ public final LogExclusion updateExclusion( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion updateExclusion(UpdateExclusionRequest request) { return updateExclusionCallable().call(request); @@ -3532,7 +3532,7 @@ public final UnaryCallable updateExclusion * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteExclusion(LogExclusionName name) { DeleteExclusionRequest request = @@ -3565,7 +3565,7 @@ public final void deleteExclusion(LogExclusionName name) { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" *

    For example: *

    `"projects/my-project/exclusions/my-exclusion"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteExclusion(String name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); @@ -3595,7 +3595,7 @@ public final void deleteExclusion(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteExclusion(DeleteExclusionRequest request) { deleteExclusionCallable().call(request); @@ -3658,7 +3658,7 @@ public final UnaryCallable deleteExclusionCallabl * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CmekSettings getCmekSettings(GetCmekSettingsRequest request) { return getCmekSettingsCallable().call(request); @@ -3734,7 +3734,7 @@ public final UnaryCallable getCmekSettings * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CmekSettings updateCmekSettings(UpdateCmekSettingsRequest request) { return updateCmekSettingsCallable().call(request); @@ -3817,7 +3817,7 @@ public final UnaryCallable updateCmekSe * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(SettingsName name) { GetSettingsRequest request = @@ -3860,7 +3860,7 @@ public final Settings getSettings(SettingsName name) { * organizations and billing accounts. Currently it can only be configured for organizations. * Once configured for an organization, it applies to all projects and folders in the Google * Cloud organization. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(String name) { GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); @@ -3897,7 +3897,7 @@ public final Settings getSettings(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(GetSettingsRequest request) { return getSettingsCallable().call(request); @@ -3978,7 +3978,7 @@ public final UnaryCallable getSettingsCallable() { * fields cannot be updated. *

    See [FieldMask][google.protobuf.FieldMask] for more information. *

    For example: `"updateMask=kmsKeyName"` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings updateSettings(Settings settings, FieldMask updateMask) { UpdateSettingsRequest request = @@ -4022,7 +4022,7 @@ public final Settings updateSettings(Settings settings, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings updateSettings(UpdateSettingsRequest request) { return updateSettingsCallable().call(request); @@ -4093,7 +4093,7 @@ public final UnaryCallable updateSettingsCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture copyLogEntriesAsync( CopyLogEntriesRequest request) { diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java index 42f999ea2b..4dc90d0762 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/LoggingClient.java @@ -307,7 +307,7 @@ public LoggingServiceV2Stub getStub() { *

    `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

    For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLog(LogName logName) { DeleteLogRequest request = @@ -348,7 +348,7 @@ public final void deleteLog(LogName logName) { *

    `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. *

    For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLog(String logName) { DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(logName).build(); @@ -380,7 +380,7 @@ public final void deleteLog(String logName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLog(DeleteLogRequest request) { deleteLogCallable().call(request); @@ -483,7 +483,7 @@ public final UnaryCallable deleteLogCallable() { * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( LogName logName, @@ -567,7 +567,7 @@ public final WriteLogEntriesResponse writeLogEntries( * limit](https://cloud.google.com/logging/quotas) for calls to `entries.write`, you should * try to include several log entries in this list, rather than calling this method for each * individual log entry. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries( String logName, @@ -614,7 +614,7 @@ public final WriteLogEntriesResponse writeLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest request) { return writeLogEntriesCallable().call(request); @@ -709,7 +709,7 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ * order of increasing values of `LogEntry.timestamp` (oldest first), and the second option * returns entries in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogEntriesPagedResponse listLogEntries( List resourceNames, String filter, String orderBy) { @@ -752,7 +752,7 @@ public final ListLogEntriesPagedResponse listLogEntries( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest request) { return listLogEntriesPagedCallable().call(request); @@ -863,7 +863,7 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResourceDescriptors( ListMonitoredResourceDescriptorsRequest request) { @@ -972,7 +972,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource *

  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { ListLogsRequest request = @@ -1009,7 +1009,7 @@ public final ListLogsPagedResponse listLogs(BillingAccountName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(FolderName parent) { ListLogsRequest request = @@ -1046,7 +1046,7 @@ public final ListLogsPagedResponse listLogs(FolderName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(OrganizationName parent) { ListLogsRequest request = @@ -1083,7 +1083,7 @@ public final ListLogsPagedResponse listLogs(OrganizationName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(ProjectName parent) { ListLogsRequest request = @@ -1120,7 +1120,7 @@ public final ListLogsPagedResponse listLogs(ProjectName parent) { *
  • `folders/[FOLDER_ID]` * * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(String parent) { ListLogsRequest request = ListLogsRequest.newBuilder().setParent(parent).build(); @@ -1155,7 +1155,7 @@ public final ListLogsPagedResponse listLogs(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogsPagedResponse listLogs(ListLogsRequest request) { return listLogsPagedCallable().call(request); diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java index aa22c688d5..cbeed2501e 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/MetricsClient.java @@ -277,7 +277,7 @@ public MetricsServiceV2Stub getStub() { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { ListLogMetricsRequest request = @@ -309,7 +309,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) { * * @param parent Required. The name of the project containing the metrics: *

    "projects/[PROJECT_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { ListLogMetricsRequest request = ListLogMetricsRequest.newBuilder().setParent(parent).build(); @@ -342,7 +342,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest request) { return listLogMetricsPagedCallable().call(request); @@ -439,7 +439,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(LogMetricName metricName) { GetLogMetricRequest request = @@ -469,7 +469,7 @@ public final LogMetric getLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the desired metric: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(String metricName) { GetLogMetricRequest request = @@ -499,7 +499,7 @@ public final LogMetric getLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric getLogMetric(GetLogMetricRequest request) { return getLogMetricCallable().call(request); @@ -556,7 +556,7 @@ public final UnaryCallable getLogMetricCallable( *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { CreateLogMetricRequest request = @@ -591,7 +591,7 @@ public final LogMetric createLogMetric(ProjectName parent, LogMetric metric) { *

    The new metric must be provided in the request. * @param metric Required. The new logs-based metric, which must not have an identifier that * already exists. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(String parent, LogMetric metric) { CreateLogMetricRequest request = @@ -622,7 +622,7 @@ public final LogMetric createLogMetric(String parent, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric createLogMetric(CreateLogMetricRequest request) { return createLogMetricCallable().call(request); @@ -681,7 +681,7 @@ public final UnaryCallable createLogMetricCal * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -717,7 +717,7 @@ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metri * same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is * created. * @param metric Required. The updated metric. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { UpdateLogMetricRequest request = @@ -748,7 +748,7 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogMetric updateLogMetric(UpdateLogMetricRequest request) { return updateLogMetricCallable().call(request); @@ -802,7 +802,7 @@ public final UnaryCallable updateLogMetricCal * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLogMetric(LogMetricName metricName) { DeleteLogMetricRequest request = @@ -832,7 +832,7 @@ public final void deleteLogMetric(LogMetricName metricName) { * * @param metricName Required. The resource name of the metric to delete: *

    "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLogMetric(String metricName) { DeleteLogMetricRequest request = @@ -862,7 +862,7 @@ public final void deleteLogMetric(String metricName) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteLogMetric(DeleteLogMetricRequest request) { deleteLogMetricCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java index 28ebb54401..74d3f163da 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -437,7 +437,7 @@ public SchemaServiceStub getStub() { * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema createSchema(ProjectName parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -478,7 +478,7 @@ public final Schema createSchema(ProjectName parent, Schema schema, String schem * schema's resource name. *

    See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name * constraints. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema createSchema(String parent, Schema schema, String schemaId) { CreateSchemaRequest request = @@ -514,7 +514,7 @@ public final Schema createSchema(String parent, Schema schema, String schemaId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema createSchema(CreateSchemaRequest request) { return createSchemaCallable().call(request); @@ -569,7 +569,7 @@ public final UnaryCallable createSchemaCallable() { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema getSchema(SchemaName name) { GetSchemaRequest request = @@ -597,7 +597,7 @@ public final Schema getSchema(SchemaName name) { * * @param name Required. The name of the schema to get. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema getSchema(String name) { GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(name).build(); @@ -627,7 +627,7 @@ public final Schema getSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema getSchema(GetSchemaRequest request) { return getSchemaCallable().call(request); @@ -683,7 +683,7 @@ public final UnaryCallable getSchemaCallable() { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { ListSchemasRequest request = @@ -715,7 +715,7 @@ public final ListSchemasPagedResponse listSchemas(ProjectName parent) { * * @param parent Required. The name of the project in which to list schemas. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemasPagedResponse listSchemas(String parent) { ListSchemasRequest request = ListSchemasRequest.newBuilder().setParent(parent).build(); @@ -749,7 +749,7 @@ public final ListSchemasPagedResponse listSchemas(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { return listSchemasPagedCallable().call(request); @@ -848,7 +848,7 @@ public final UnaryCallable listSchemasC * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName name) { ListSchemaRevisionsRequest request = @@ -879,7 +879,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(SchemaName nam * } * * @param name Required. The name of the schema to list revisions for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { ListSchemaRevisionsRequest request = @@ -914,7 +914,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( ListSchemaRevisionsRequest request) { @@ -1018,7 +1018,7 @@ public final ListSchemaRevisionsPagedResponse listSchemaRevisions( * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema commitSchema(SchemaName name, Schema schema) { CommitSchemaRequest request = @@ -1051,7 +1051,7 @@ public final Schema commitSchema(SchemaName name, Schema schema) { * @param name Required. The name of the schema we are revising. Format is * `projects/{project}/schemas/{schema}`. * @param schema Required. The schema revision to commit. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema commitSchema(String name, Schema schema) { CommitSchemaRequest request = @@ -1082,7 +1082,7 @@ public final Schema commitSchema(String name, Schema schema) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema commitSchema(CommitSchemaRequest request) { return commitSchemaCallable().call(request); @@ -1139,7 +1139,7 @@ public final UnaryCallable commitSchemaCallable() { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema rollbackSchema(SchemaName name, String revisionId) { RollbackSchemaRequest request = @@ -1173,7 +1173,7 @@ public final Schema rollbackSchema(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema rollbackSchema(String name, String revisionId) { RollbackSchemaRequest request = @@ -1204,7 +1204,7 @@ public final Schema rollbackSchema(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema rollbackSchema(RollbackSchemaRequest request) { return rollbackSchemaCallable().call(request); @@ -1263,7 +1263,7 @@ public final UnaryCallable rollbackSchemaCallable * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1299,7 +1299,7 @@ public final Schema deleteSchemaRevision(SchemaName name, String revisionId) { * @param revisionId Required. The revision ID to roll back to. It must be a revision of the same * schema. *

    Example: c7cfa2a8 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema deleteSchemaRevision(String name, String revisionId) { DeleteSchemaRevisionRequest request = @@ -1330,7 +1330,7 @@ public final Schema deleteSchemaRevision(String name, String revisionId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Schema deleteSchemaRevision(DeleteSchemaRevisionRequest request) { return deleteSchemaRevisionCallable().call(request); @@ -1385,7 +1385,7 @@ public final UnaryCallable deleteSchemaRevi * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSchema(SchemaName name) { DeleteSchemaRequest request = @@ -1413,7 +1413,7 @@ public final void deleteSchema(SchemaName name) { * * @param name Required. Name of the schema to delete. Format is * `projects/{project}/schemas/{schema}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSchema(String name) { DeleteSchemaRequest request = DeleteSchemaRequest.newBuilder().setName(name).build(); @@ -1442,7 +1442,7 @@ public final void deleteSchema(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSchema(DeleteSchemaRequest request) { deleteSchemaCallable().call(request); @@ -1497,7 +1497,7 @@ public final UnaryCallable deleteSchemaCallable() { * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema schema) { ValidateSchemaRequest request = @@ -1530,7 +1530,7 @@ public final ValidateSchemaResponse validateSchema(ProjectName parent, Schema sc * @param parent Required. The name of the project in which to validate schemas. Format is * `projects/{project-id}`. * @param schema Required. The schema object to validate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) { ValidateSchemaRequest request = @@ -1561,7 +1561,7 @@ public final ValidateSchemaResponse validateSchema(String parent, Schema schema) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request) { return validateSchemaCallable().call(request); @@ -1621,7 +1621,7 @@ public final ValidateSchemaResponse validateSchema(ValidateSchemaRequest request * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ValidateMessageResponse validateMessage(ValidateMessageRequest request) { return validateMessageCallable().call(request); @@ -1684,7 +1684,7 @@ public final ValidateMessageResponse validateMessage(ValidateMessageRequest requ * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1745,7 +1745,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1808,7 +1808,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index b7a0f9da81..9539f92063 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -587,7 +587,7 @@ public SubscriberStub getStub() { * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -658,7 +658,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -729,7 +729,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( String name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -800,7 +800,7 @@ public final Subscription createSubscription( * the push endpoint. *

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription( String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -860,7 +860,7 @@ public final Subscription createSubscription( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription createSubscription(Subscription request) { return createSubscriptionCallable().call(request); @@ -938,7 +938,7 @@ public final UnaryCallable createSubscriptionCallabl * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription getSubscription(SubscriptionName subscription) { GetSubscriptionRequest request = @@ -968,7 +968,7 @@ public final Subscription getSubscription(SubscriptionName subscription) { * * @param subscription Required. The name of the subscription to get. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription getSubscription(String subscription) { GetSubscriptionRequest request = @@ -998,7 +998,7 @@ public final Subscription getSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription getSubscription(GetSubscriptionRequest request) { return getSubscriptionCallable().call(request); @@ -1056,7 +1056,7 @@ public final UnaryCallable getSubscription * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Subscription updateSubscription(UpdateSubscriptionRequest request) { return updateSubscriptionCallable().call(request); @@ -1114,7 +1114,7 @@ public final UnaryCallable updateSubscr * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName project) { ListSubscriptionsRequest request = @@ -1146,7 +1146,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ProjectName projec * * @param project Required. The name of the project in which to list subscriptions. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { ListSubscriptionsRequest request = @@ -1180,7 +1180,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsRequest request) { return listSubscriptionsPagedCallable().call(request); @@ -1282,7 +1282,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSubscription(SubscriptionName subscription) { DeleteSubscriptionRequest request = @@ -1315,7 +1315,7 @@ public final void deleteSubscription(SubscriptionName subscription) { * * @param subscription Required. The subscription to delete. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSubscription(String subscription) { DeleteSubscriptionRequest request = @@ -1348,7 +1348,7 @@ public final void deleteSubscription(String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSubscription(DeleteSubscriptionRequest request) { deleteSubscriptionCallable().call(request); @@ -1418,7 +1418,7 @@ public final UnaryCallable deleteSubscriptionC * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyAckDeadline( SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) { @@ -1464,7 +1464,7 @@ public final void modifyAckDeadline( * typically results in an increase in the rate of message redeliveries (that is, duplicates). * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyAckDeadline( String subscription, List ackIds, int ackDeadlineSeconds) { @@ -1504,7 +1504,7 @@ public final void modifyAckDeadline( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) { modifyAckDeadlineCallable().call(request); @@ -1570,7 +1570,7 @@ public final UnaryCallable modifyAckDeadlineCal * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void acknowledge(SubscriptionName subscription, List ackIds) { AcknowledgeRequest request = @@ -1608,7 +1608,7 @@ public final void acknowledge(SubscriptionName subscription, List ackIds * `projects/{project}/subscriptions/{sub}`. * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void acknowledge(String subscription, List ackIds) { AcknowledgeRequest request = @@ -1643,7 +1643,7 @@ public final void acknowledge(String subscription, List ackIds) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void acknowledge(AcknowledgeRequest request) { acknowledgeCallable().call(request); @@ -1705,7 +1705,7 @@ public final UnaryCallable acknowledgeCallable() { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { PullRequest request = @@ -1740,7 +1740,7 @@ public final PullResponse pull(SubscriptionName subscription, int maxMessages) { * `projects/{project}/subscriptions/{sub}`. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(String subscription, int maxMessages) { PullRequest request = @@ -1780,7 +1780,7 @@ public final PullResponse pull(String subscription, int maxMessages) { * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull( SubscriptionName subscription, boolean returnImmediately, int maxMessages) { @@ -1825,7 +1825,7 @@ public final PullResponse pull( * that users do not set this field. * @param maxMessages Required. The maximum number of messages to return for this request. Must be * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(String subscription, boolean returnImmediately, int maxMessages) { PullRequest request = @@ -1862,7 +1862,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PullResponse pull(PullRequest request) { return pullCallable().call(request); @@ -1971,7 +1971,7 @@ public final UnaryCallable pullCallable() { *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2012,7 +2012,7 @@ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pus *

    An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages * from the given subscription and allow messages to be pulled and acknowledged - effectively * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = @@ -2051,7 +2051,7 @@ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(ModifyPushConfigRequest request) { modifyPushConfigCallable().call(request); @@ -2114,7 +2114,7 @@ public final UnaryCallable modifyPushConfigCalla * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot getSnapshot(SnapshotName snapshot) { GetSnapshotRequest request = @@ -2147,7 +2147,7 @@ public final Snapshot getSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to get. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot getSnapshot(String snapshot) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setSnapshot(snapshot).build(); @@ -2179,7 +2179,7 @@ public final Snapshot getSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot getSnapshot(GetSnapshotRequest request) { return getSnapshotCallable().call(request); @@ -2241,7 +2241,7 @@ public final UnaryCallable getSnapshotCallable() { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { ListSnapshotsRequest request = @@ -2276,7 +2276,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { * * @param project Required. The name of the project in which to list snapshots. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(String project) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setProject(project).build(); @@ -2312,7 +2312,7 @@ public final ListSnapshotsPagedResponse listSnapshots(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request) { return listSnapshotsPagedCallable().call(request); @@ -2438,7 +2438,7 @@ public final UnaryCallable listSnap * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2491,7 +2491,7 @@ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscri * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(SnapshotName name, String subscription) { CreateSnapshotRequest request = @@ -2544,7 +2544,7 @@ public final Snapshot createSnapshot(SnapshotName name, String subscription) { * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(String name, SubscriptionName subscription) { CreateSnapshotRequest request = @@ -2597,7 +2597,7 @@ public final Snapshot createSnapshot(String name, SubscriptionName subscription) * well as: (b) Any messages published to the subscription's topic following the successful * completion of the CreateSnapshot request. Format is * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(String name, String subscription) { CreateSnapshotRequest request = @@ -2640,7 +2640,7 @@ public final Snapshot createSnapshot(String name, String subscription) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot createSnapshot(CreateSnapshotRequest request) { return createSnapshotCallable().call(request); @@ -2713,7 +2713,7 @@ public final UnaryCallable createSnapshotCallab * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Snapshot updateSnapshot(UpdateSnapshotRequest request) { return updateSnapshotCallable().call(request); @@ -2777,7 +2777,7 @@ public final UnaryCallable updateSnapshotCallab * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(SnapshotName snapshot) { DeleteSnapshotRequest request = @@ -2813,7 +2813,7 @@ public final void deleteSnapshot(SnapshotName snapshot) { * * @param snapshot Required. The name of the snapshot to delete. Format is * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(String snapshot) { DeleteSnapshotRequest request = @@ -2849,7 +2849,7 @@ public final void deleteSnapshot(String snapshot) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(DeleteSnapshotRequest request) { deleteSnapshotCallable().call(request); @@ -2916,7 +2916,7 @@ public final UnaryCallable deleteSnapshotCallable( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SeekResponse seek(SeekRequest request) { return seekCallable().call(request); @@ -2980,7 +2980,7 @@ public final UnaryCallable seekCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -3041,7 +3041,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -3104,7 +3104,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java index 9e4d8f0752..485cf3b3da 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -406,7 +406,7 @@ public PublisherStub getStub() { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic createTopic(TopicName name) { Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); @@ -437,7 +437,7 @@ public final Topic createTopic(TopicName name) { * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in * length, and it must not start with `"goog"`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic createTopic(String name) { Topic request = Topic.newBuilder().setName(name).build(); @@ -473,7 +473,7 @@ public final Topic createTopic(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic createTopic(Topic request) { return createTopicCallable().call(request); @@ -536,7 +536,7 @@ public final UnaryCallable createTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic updateTopic(UpdateTopicRequest request) { return updateTopicCallable().call(request); @@ -592,7 +592,7 @@ public final UnaryCallable updateTopicCallable() { * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublishResponse publish(TopicName topic, List messages) { PublishRequest request = @@ -625,7 +625,7 @@ public final PublishResponse publish(TopicName topic, List messag * @param topic Required. The messages in the request will be published on this topic. Format is * `projects/{project}/topics/{topic}`. * @param messages Required. The messages to publish. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublishResponse publish(String topic, List messages) { PublishRequest request = @@ -656,7 +656,7 @@ public final PublishResponse publish(String topic, List messages) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PublishResponse publish(PublishRequest request) { return publishCallable().call(request); @@ -710,7 +710,7 @@ public final UnaryCallable publishCallable() { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic getTopic(TopicName topic) { GetTopicRequest request = @@ -738,7 +738,7 @@ public final Topic getTopic(TopicName topic) { * * @param topic Required. The name of the topic to get. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic getTopic(String topic) { GetTopicRequest request = GetTopicRequest.newBuilder().setTopic(topic).build(); @@ -767,7 +767,7 @@ public final Topic getTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Topic getTopic(GetTopicRequest request) { return getTopicCallable().call(request); @@ -822,7 +822,7 @@ public final UnaryCallable getTopicCallable() { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicsPagedResponse listTopics(ProjectName project) { ListTopicsRequest request = @@ -854,7 +854,7 @@ public final ListTopicsPagedResponse listTopics(ProjectName project) { * * @param project Required. The name of the project in which to list topics. Format is * `projects/{project-id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicsPagedResponse listTopics(String project) { ListTopicsRequest request = ListTopicsRequest.newBuilder().setProject(project).build(); @@ -887,7 +887,7 @@ public final ListTopicsPagedResponse listTopics(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicsPagedResponse listTopics(ListTopicsRequest request) { return listTopicsPagedCallable().call(request); @@ -984,7 +984,7 @@ public final UnaryCallable listTopicsCall * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicName topic) { ListTopicSubscriptionsRequest request = @@ -1016,7 +1016,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicNam * * @param topic Required. The name of the topic that subscriptions are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String topic) { ListTopicSubscriptionsRequest request = @@ -1050,7 +1050,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( ListTopicSubscriptionsRequest request) { @@ -1155,7 +1155,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) { ListTopicSnapshotsRequest request = @@ -1190,7 +1190,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) * * @param topic Required. The name of the topic that snapshots are attached to. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { ListTopicSnapshotsRequest request = @@ -1227,7 +1227,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( ListTopicSnapshotsRequest request) { @@ -1336,7 +1336,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTopic(TopicName topic) { DeleteTopicRequest request = @@ -1367,7 +1367,7 @@ public final void deleteTopic(TopicName topic) { * * @param topic Required. Name of the topic to delete. Format is * `projects/{project}/topics/{topic}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTopic(String topic) { DeleteTopicRequest request = DeleteTopicRequest.newBuilder().setTopic(topic).build(); @@ -1399,7 +1399,7 @@ public final void deleteTopic(String topic) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteTopic(DeleteTopicRequest request) { deleteTopicCallable().call(request); @@ -1459,7 +1459,7 @@ public final UnaryCallable deleteTopicCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionRequest request) { return detachSubscriptionCallable().call(request); @@ -1522,7 +1522,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1583,7 +1583,7 @@ public final UnaryCallable setIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1646,7 +1646,7 @@ public final UnaryCallable getIamPolicyCallable() { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java index a79e735944..7da5fc69f8 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -477,7 +477,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(LocationName parent) { ListInstancesRequest request = @@ -519,7 +519,7 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) { * * @param parent Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(String parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); @@ -562,7 +562,7 @@ public final ListInstancesPagedResponse listInstances(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { return listInstancesPagedCallable().call(request); @@ -680,7 +680,7 @@ public final UnaryCallable listInst * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = @@ -709,7 +709,7 @@ public final Instance getInstance(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); @@ -738,7 +738,7 @@ public final Instance getInstance(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(GetInstanceRequest request) { return getInstanceCallable().call(request); @@ -793,7 +793,7 @@ public final UnaryCallable getInstanceCallable() { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final InstanceAuthString getInstanceAuthString(InstanceName name) { GetInstanceAuthStringRequest request = @@ -825,7 +825,7 @@ public final InstanceAuthString getInstanceAuthString(InstanceName name) { * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final InstanceAuthString getInstanceAuthString(String name) { GetInstanceAuthStringRequest request = @@ -856,7 +856,7 @@ public final InstanceAuthString getInstanceAuthString(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringRequest request) { return getInstanceAuthStringCallable().call(request); @@ -936,7 +936,7 @@ public final InstanceAuthString getInstanceAuthString(GetInstanceAuthStringReque * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( LocationName parent, String instanceId, Instance instance) { @@ -993,7 +993,7 @@ public final OperationFuture createInstanceAsync( * * * @param instance Required. A Redis [Instance] resource - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( String parent, String instanceId, Instance instance) { @@ -1041,7 +1041,7 @@ public final OperationFuture createInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync(CreateInstanceRequest request) { return createInstanceOperationCallable().futureCall(request); @@ -1158,7 +1158,7 @@ public final UnaryCallable createInstanceCalla *

    * `displayName` * `labels` * `memorySizeGb` * `redisConfig` * * `replica_count` * @param instance Required. Update description. Only fields specified in update_mask are updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateInstanceAsync( FieldMask updateMask, Instance instance) { @@ -1194,7 +1194,7 @@ public final OperationFuture updateInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateInstanceAsync(UpdateInstanceRequest request) { return updateInstanceOperationCallable().futureCall(request); @@ -1289,7 +1289,7 @@ public final UnaryCallable updateInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeInstanceAsync( InstanceName name, String redisVersion) { @@ -1324,7 +1324,7 @@ public final OperationFuture upgradeInstanceAsync( * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeInstanceAsync( String name, String redisVersion) { @@ -1356,7 +1356,7 @@ public final OperationFuture upgradeInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeInstanceAsync(UpgradeInstanceRequest request) { return upgradeInstanceOperationCallable().futureCall(request); @@ -1449,7 +1449,7 @@ public final UnaryCallable upgradeInstanceCal * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param inputConfig Required. Specify data to be imported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture importInstanceAsync( String name, InputConfig inputConfig) { @@ -1487,7 +1487,7 @@ public final OperationFuture importInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture importInstanceAsync(ImportInstanceRequest request) { return importInstanceOperationCallable().futureCall(request); @@ -1591,7 +1591,7 @@ public final UnaryCallable importInstanceCalla * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. * @param outputConfig Required. Specify data to be exported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture exportInstanceAsync( String name, OutputConfig outputConfig) { @@ -1628,7 +1628,7 @@ public final OperationFuture exportInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture exportInstanceAsync(ExportInstanceRequest request) { return exportInstanceOperationCallable().futureCall(request); @@ -1728,7 +1728,7 @@ public final UnaryCallable exportInstanceCalla * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture failoverInstanceAsync( InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1766,7 +1766,7 @@ public final OperationFuture failoverInstanceAsync( * refers to a GCP region. * @param dataProtectionMode Optional. Available data protection modes that the user can choose. * If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture failoverInstanceAsync( String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) { @@ -1801,7 +1801,7 @@ public final OperationFuture failoverInstanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture failoverInstanceAsync( FailoverInstanceRequest request) { @@ -1887,7 +1887,7 @@ public final UnaryCallable failoverInstanceC * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteInstanceAsync(InstanceName name) { DeleteInstanceRequest request = @@ -1916,7 +1916,7 @@ public final OperationFuture deleteInstanceAsync(InstanceName name) * @param name Required. Redis instance resource name using the form: * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` * refers to a GCP region. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteInstanceAsync(String name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); @@ -1945,7 +1945,7 @@ public final OperationFuture deleteInstanceAsync(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteInstanceAsync(DeleteInstanceRequest request) { return deleteInstanceOperationCallable().futureCall(request); @@ -2036,7 +2036,7 @@ public final UnaryCallable deleteInstanceCalla * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture rescheduleMaintenanceAsync( InstanceName name, @@ -2080,7 +2080,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * as well. * @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture rescheduleMaintenanceAsync( String name, @@ -2118,7 +2118,7 @@ public final OperationFuture rescheduleMaintenanceAsync( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture rescheduleMaintenanceAsync( RescheduleMaintenanceRequest request) { diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java index b25eb42986..a95c284ea3 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/StorageClient.java @@ -734,7 +734,7 @@ public StorageStub getStub() { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(BucketName name) { DeleteBucketRequest request = @@ -761,7 +761,7 @@ public final void deleteBucket(BucketName name) { * } * * @param name Required. Name of a bucket to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(String name) { DeleteBucketRequest request = DeleteBucketRequest.newBuilder().setName(name).build(); @@ -792,7 +792,7 @@ public final void deleteBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteBucket(DeleteBucketRequest request) { deleteBucketCallable().call(request); @@ -846,7 +846,7 @@ public final UnaryCallable deleteBucketCallable() { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket getBucket(BucketName name) { GetBucketRequest request = @@ -873,7 +873,7 @@ public final Bucket getBucket(BucketName name) { * } * * @param name Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket getBucket(String name) { GetBucketRequest request = GetBucketRequest.newBuilder().setName(name).build(); @@ -905,7 +905,7 @@ public final Bucket getBucket(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket getBucket(GetBucketRequest request) { return getBucketCallable().call(request); @@ -968,7 +968,7 @@ public final UnaryCallable getBucketCallable() { * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1007,7 +1007,7 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with * the name `projects/123456/buckets/foo`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) { CreateBucketRequest request = @@ -1045,7 +1045,7 @@ public final Bucket createBucket(String parent, Bucket bucket, String bucketId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket createBucket(CreateBucketRequest request) { return createBucketCallable().call(request); @@ -1103,7 +1103,7 @@ public final UnaryCallable createBucketCallable() { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { ListBucketsRequest request = @@ -1134,7 +1134,7 @@ public final ListBucketsPagedResponse listBuckets(ProjectName parent) { * } * * @param parent Required. The project whose buckets we are listing. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(String parent) { ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); @@ -1169,7 +1169,7 @@ public final ListBucketsPagedResponse listBuckets(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) { return listBucketsPagedCallable().call(request); @@ -1268,7 +1268,7 @@ public final UnaryCallable listBucketsC * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { LockBucketRetentionPolicyRequest request = @@ -1297,7 +1297,7 @@ public final Bucket lockBucketRetentionPolicy(BucketName bucket) { * } * * @param bucket Required. Name of a bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket lockBucketRetentionPolicy(String bucket) { LockBucketRetentionPolicyRequest request = @@ -1328,7 +1328,7 @@ public final Bucket lockBucketRetentionPolicy(String bucket) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest request) { return lockBucketRetentionPolicyCallable().call(request); @@ -1387,7 +1387,7 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(ResourceName resource) { GetIamPolicyRequest request = @@ -1420,7 +1420,7 @@ public final Policy getIamPolicy(ResourceName resource) { * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(String resource) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); @@ -1454,7 +1454,7 @@ public final Policy getIamPolicy(String resource) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); @@ -1519,7 +1519,7 @@ public final UnaryCallable getIamPolicyCallable() { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(ResourceName resource, Policy policy) { SetIamPolicyRequest request = @@ -1557,7 +1557,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(String resource, Policy policy) { SetIamPolicyRequest request = @@ -1593,7 +1593,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); @@ -1660,7 +1660,7 @@ public final UnaryCallable setIamPolicyCallable() { * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions( ResourceName resource, List permissions) { @@ -1700,7 +1700,7 @@ public final TestIamPermissionsResponse testIamPermissions( * @param permissions The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions( String resource, List permissions) { @@ -1740,7 +1740,7 @@ public final TestIamPermissionsResponse testIamPermissions( * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); @@ -1809,7 +1809,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { UpdateBucketRequest request = @@ -1844,7 +1844,7 @@ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Bucket updateBucket(UpdateBucketRequest request) { return updateBucketCallable().call(request); @@ -1901,7 +1901,7 @@ public final UnaryCallable updateBucketCallable() { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotification(NotificationName name) { DeleteNotificationRequest request = @@ -1930,7 +1930,7 @@ public final void deleteNotification(NotificationName name) { * } * * @param name Required. The parent bucket of the notification. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotification(String name) { DeleteNotificationRequest request = @@ -1960,7 +1960,7 @@ public final void deleteNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotification(DeleteNotificationRequest request) { deleteNotificationCallable().call(request); @@ -2013,7 +2013,7 @@ public final UnaryCallable deleteNotificationC * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification getNotification(BucketName name) { GetNotificationRequest request = @@ -2041,7 +2041,7 @@ public final Notification getNotification(BucketName name) { * * @param name Required. The parent bucket of the notification. Format: * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification getNotification(String name) { GetNotificationRequest request = GetNotificationRequest.newBuilder().setName(name).build(); @@ -2070,7 +2070,7 @@ public final Notification getNotification(String name) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification getNotification(GetNotificationRequest request) { return getNotificationCallable().call(request); @@ -2126,7 +2126,7 @@ public final UnaryCallable getNotification * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification createNotification(ProjectName parent, Notification notification) { CreateNotificationRequest request = @@ -2160,7 +2160,7 @@ public final Notification createNotification(ProjectName parent, Notification no * * @param parent Required. The bucket to which this notification belongs. * @param notification Required. Properties of the notification to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification createNotification(String parent, Notification notification) { CreateNotificationRequest request = @@ -2196,7 +2196,7 @@ public final Notification createNotification(String parent, Notification notific * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Notification createNotification(CreateNotificationRequest request) { return createNotificationCallable().call(request); @@ -2254,7 +2254,7 @@ public final UnaryCallable createNotifi * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(ProjectName parent) { ListNotificationsRequest request = @@ -2285,7 +2285,7 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent * } * * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(String parent) { ListNotificationsRequest request = @@ -2319,7 +2319,7 @@ public final ListNotificationsPagedResponse listNotifications(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(ListNotificationsRequest request) { return listNotificationsPagedCallable().call(request); @@ -2429,7 +2429,7 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object composeObject(ComposeObjectRequest request) { return composeObjectCallable().call(request); @@ -2494,7 +2494,7 @@ public final UnaryCallable composeObjectCallable() * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. The name of the finalized object to delete. Note: If you want to delete * an unfinalized resumable upload please use `CancelResumableWrite`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(String bucket, String object) { DeleteObjectRequest request = @@ -2528,7 +2528,7 @@ public final void deleteObject(String bucket, String object) { * an unfinalized resumable upload please use `CancelResumableWrite`. * @param generation If present, permanently deletes a specific revision of this object (as * opposed to the latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(String bucket, String object, long generation) { DeleteObjectRequest request = @@ -2570,7 +2570,7 @@ public final void deleteObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(DeleteObjectRequest request) { deleteObjectCallable().call(request); @@ -2631,7 +2631,7 @@ public final UnaryCallable deleteObjectCallable() { * * @param uploadId Required. The upload_id of the resumable upload to cancel. This should be * copied from the `upload_id` field of `StartResumableWriteResponse`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) { CancelResumableWriteRequest request = @@ -2659,7 +2659,7 @@ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId) * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CancelResumableWriteResponse cancelResumableWrite( CancelResumableWriteRequest request) { @@ -2714,7 +2714,7 @@ public final CancelResumableWriteResponse cancelResumableWrite( * * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. Name of the object. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(String bucket, String object) { GetObjectRequest request = @@ -2746,7 +2746,7 @@ public final Object getObject(String bucket, String object) { * @param object Required. Name of the object. * @param generation If present, selects a specific revision of this object (as opposed to the * latest version, the default). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(String bucket, String object, long generation) { GetObjectRequest request = @@ -2788,7 +2788,7 @@ public final Object getObject(String bucket, String object, long generation) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(GetObjectRequest request) { return getObjectCallable().call(request); @@ -2897,7 +2897,7 @@ public final ServerStreamingCallable read * field's value. *

    Not specifying any fields is an error. Not specifying a field while setting that field * to a non-default value is an error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object updateObject(Object object, FieldMask updateMask) { UpdateObjectRequest request = @@ -2934,7 +2934,7 @@ public final Object updateObject(Object object, FieldMask updateMask) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object updateObject(UpdateObjectRequest request) { return updateObjectCallable().call(request); @@ -3082,7 +3082,7 @@ public final UnaryCallable updateObjectCallable() { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListObjectsPagedResponse listObjects(ProjectName parent) { ListObjectsRequest request = @@ -3113,7 +3113,7 @@ public final ListObjectsPagedResponse listObjects(ProjectName parent) { * } * * @param parent Required. Name of the bucket in which to look for objects. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListObjectsPagedResponse listObjects(String parent) { ListObjectsRequest request = ListObjectsRequest.newBuilder().setParent(parent).build(); @@ -3153,7 +3153,7 @@ public final ListObjectsPagedResponse listObjects(String parent) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListObjectsPagedResponse listObjects(ListObjectsRequest request) { return listObjectsPagedCallable().call(request); @@ -3289,7 +3289,7 @@ public final UnaryCallable listObjectsC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RewriteResponse rewriteObject(RewriteObjectRequest request) { return rewriteObjectCallable().call(request); @@ -3371,7 +3371,7 @@ public final UnaryCallable rewriteObjectC * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final StartResumableWriteResponse startResumableWrite(StartResumableWriteRequest request) { return startResumableWriteCallable().call(request); @@ -3439,7 +3439,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite * * @param uploadId Required. The name of the resume token for the object whose write status is * being requested. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { QueryWriteStatusRequest request = @@ -3480,7 +3480,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest request) { return queryWriteStatusCallable().call(request); @@ -3546,7 +3546,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServiceAccount getServiceAccount(ProjectName project) { GetServiceAccountRequest request = @@ -3576,7 +3576,7 @@ public final ServiceAccount getServiceAccount(ProjectName project) { * * @param project Required. Project ID, in the format of "projects/<projectIdentifier>". * <projectIdentifier> can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServiceAccount getServiceAccount(String project) { GetServiceAccountRequest request = @@ -3606,7 +3606,7 @@ public final ServiceAccount getServiceAccount(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServiceAccount getServiceAccount(GetServiceAccountRequest request) { return getServiceAccountCallable().call(request); @@ -3663,7 +3663,7 @@ public final UnaryCallable getServiceA * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CreateHmacKeyResponse createHmacKey( ProjectName project, String serviceAccountEmail) { @@ -3698,7 +3698,7 @@ public final CreateHmacKeyResponse createHmacKey( * format of "projects/<projectIdentifier>". <projectIdentifier> can be the * project ID or project number. * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CreateHmacKeyResponse createHmacKey(String project, String serviceAccountEmail) { CreateHmacKeyRequest request = @@ -3732,7 +3732,7 @@ public final CreateHmacKeyResponse createHmacKey(String project, String serviceA * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) { return createHmacKeyCallable().call(request); @@ -3790,7 +3790,7 @@ public final UnaryCallable createHm * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteHmacKey(String accessId, ProjectName project) { DeleteHmacKeyRequest request = @@ -3824,7 +3824,7 @@ public final void deleteHmacKey(String accessId, ProjectName project) { * @param project Required. The project that owns the HMAC key, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteHmacKey(String accessId, String project) { DeleteHmacKeyRequest request = @@ -3855,7 +3855,7 @@ public final void deleteHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteHmacKey(DeleteHmacKeyRequest request) { deleteHmacKeyCallable().call(request); @@ -3912,7 +3912,7 @@ public final UnaryCallable deleteHmacKeyCallable() * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { GetHmacKeyRequest request = @@ -3946,7 +3946,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { * @param project Required. The project the HMAC key lies in, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata getHmacKey(String accessId, String project) { GetHmacKeyRequest request = @@ -3977,7 +3977,7 @@ public final HmacKeyMetadata getHmacKey(String accessId, String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) { return getHmacKeyCallable().call(request); @@ -4034,7 +4034,7 @@ public final UnaryCallable getHmacKeyCallabl * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { ListHmacKeysRequest request = @@ -4067,7 +4067,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { * @param project Required. The project to list HMAC keys for, in the format of * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or * project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHmacKeysPagedResponse listHmacKeys(String project) { ListHmacKeysRequest request = ListHmacKeysRequest.newBuilder().setProject(project).build(); @@ -4102,7 +4102,7 @@ public final ListHmacKeysPagedResponse listHmacKeys(String project) { * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request) { return listHmacKeysPagedCallable().call(request); @@ -4207,7 +4207,7 @@ public final UnaryCallable listHmacKe * used to identify the key. * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the * `state` field is updated to the value specified in `hmac_key`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) { UpdateHmacKeyRequest request = @@ -4238,7 +4238,7 @@ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask up * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) { return updateHmacKeyCallable().call(request); From 1f7730224711dc91d5fe07560c7061f1566a57b2 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:37:55 -0700 Subject: [PATCH 06/21] Remove enum from method model --- .../comment/ServiceClientCommentComposer.java | 5 ++--- .../AbstractServiceClientClassComposer.java | 7 +++--- .../AbstractServiceSettingsClassComposer.java | 11 +++++----- .../AbstractServiceStubClassComposer.java | 3 +-- ...tractServiceStubSettingsClassComposer.java | 5 ++--- .../ServiceClientHeaderSampleComposer.java | 22 ++++++++----------- .../api/generator/gapic/model/Method.java | 13 +++-------- .../generator/gapic/protoparser/Parser.java | 9 +++++--- ...ServiceClientHeaderSampleComposerTest.java | 11 +++++----- .../gapic/protoparser/ParserTest.java | 12 +++++----- 10 files changed, 43 insertions(+), 55 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java index 8c8487a8df..0ab931fff2 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java @@ -22,7 +22,6 @@ import com.google.api.generator.gapic.composer.utils.ClassNames; import com.google.api.generator.gapic.composer.utils.CommentFormatter; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.Service; import com.google.api.generator.gapic.utils.JavaStyle; @@ -203,7 +202,7 @@ public static List createRpcMethodHeaderComment( methodJavadocBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { methodJavadocBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING); } @@ -350,7 +349,7 @@ public static List createRpcCallableMethodHeaderComment( methodJavadocBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { methodJavadocBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING); } diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index 1572637727..1ded7f0c77 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -71,7 +71,6 @@ import com.google.api.generator.gapic.model.LongrunningOperation; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Method.Stream; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.ResourceName; @@ -810,7 +809,7 @@ private static List createMethodVariants( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); @@ -899,7 +898,7 @@ private static MethodDefinition createMethodDefaultMethod( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); @@ -1059,7 +1058,7 @@ private static MethodDefinition createCallableMethod( if (method.isDeprecated()) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index ab5265a6f5..5d86ad46cb 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -61,7 +61,6 @@ import com.google.api.generator.gapic.model.GapicClass.Kind; import com.google.api.generator.gapic.model.GapicContext; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Method.Stream; import com.google.api.generator.gapic.model.Sample; import com.google.api.generator.gapic.model.Service; @@ -142,7 +141,7 @@ private static List createClassHeaderComments( // list. List publicMethods = service.methods().stream() - .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) + .filter(m -> m.isPublic() == true) .collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() @@ -301,7 +300,7 @@ private static MethodDefinition methodBuilderHelper( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (protoMethod.isPublic() == false) { annotations.add( AnnotationNode.withTypeAndDescription( FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); @@ -312,7 +311,7 @@ private static MethodDefinition methodBuilderHelper( SettingsCommentComposer.createCallSettingsGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), - protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL)) + protoMethod.isPublic() == false)) .setAnnotations(annotations) .build(); } @@ -786,7 +785,7 @@ private static List createNestedBuilderSettingsGetterMethods( SettingsCommentComposer.createCallSettingsBuilderGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), - protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL)) + protoMethod.isPublic() == false)) .setAnnotations( protoMethod.isDeprecated() ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) @@ -803,7 +802,7 @@ private static List createNestedBuilderSettingsGetterMethods( SettingsCommentComposer.createCallSettingsBuilderGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), - protoMethod.selectiveGapicType() == SelectiveGapicType.INTERNAL)) + protoMethod.isPublic() == false)) .setAnnotations( protoMethod.isDeprecated() ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java index 087b97df06..662333100a 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java @@ -41,7 +41,6 @@ import com.google.api.generator.gapic.model.GapicContext; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Service; import com.google.api.generator.gapic.utils.JavaStyle; import com.google.common.collect.ImmutableList; @@ -203,7 +202,7 @@ private MethodDefinition createCallableGetterHelper( if (method.isDeprecated()) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 0fa154445d..0d96318c0c 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -92,7 +92,6 @@ import com.google.api.generator.gapic.model.GapicServiceConfig; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.Method.Stream; import com.google.api.generator.gapic.model.Sample; import com.google.api.generator.gapic.model.Service; @@ -425,7 +424,7 @@ private static List createClassHeaderComments( // list. List publicMethods = service.methods().stream() - .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) + .filter(m -> m.isPublic() == true) .collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() @@ -505,7 +504,7 @@ private static Map createMethodSettingsClassMemberVarExprs if (method.isDeprecated()) { deprecatedSettingVarNames.add(varName); } - if (method.selectiveGapicType() == SelectiveGapicType.INTERNAL) { + if (method.isPublic() == false) { internalSettingVarNames.add(varName); } varExprs.put( diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java index de3f44484c..071ac3c843 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java @@ -30,7 +30,6 @@ import com.google.api.generator.gapic.model.HttpBindings; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.RegionTag; import com.google.api.generator.gapic.model.ResourceName; @@ -53,28 +52,25 @@ public static Sample composeClassHeaderSample( TypeNode clientType, Map resourceNames, Map messageTypes) { + List publicMethods = + service.methods().stream() + .filter(m -> m.isPublic() == true) + .collect(Collectors.toList()); + // If all generated methods are INTERNAL, generate an empty service sample. - if (service.methods().stream() - .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) - .count() - == 0) { + if (publicMethods.isEmpty()) { return ServiceClientMethodSampleComposer.composeEmptyServiceSample(clientType, service); } + // Use the first public pure unary RPC method's sample code as showcase, if no such method - // exists, use - // the first public method in the service's methods list. - List publicMethods = - service.methods().stream() - .filter(m -> m.selectiveGapicType() == SelectiveGapicType.PUBLIC) - .collect(Collectors.toList()); + // exists, use the first public method in the service's methods list. Method method = publicMethods.stream() .filter( m -> m.stream() == Method.Stream.NONE && !m.hasLro() - && !m.isPaged() - && m.selectiveGapicType() != SelectiveGapicType.INTERNAL) + && !m.isPaged()) .findFirst() .orElse(publicMethods.get(0)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java index d8ba4671c0..7cdb9c85b5 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java @@ -30,12 +30,6 @@ public enum Stream { BIDI }; - public enum SelectiveGapicType { - PUBLIC, - HIDDEN, - INTERNAL - } - public abstract String name(); public abstract Stream stream(); @@ -44,7 +38,7 @@ public enum SelectiveGapicType { public abstract TypeNode outputType(); - public abstract SelectiveGapicType selectiveGapicType(); + public abstract boolean isPublic(); public abstract boolean isBatching(); @@ -144,7 +138,7 @@ public static Builder builder() { .setStream(Stream.NONE) .setAutoPopulatedFields(new ArrayList<>()) .setMethodSignatures(ImmutableList.of()) - .setSelectiveGapicType(SelectiveGapicType.PUBLIC) + .setIsPublic(false) .setIsBatching(false) .setIsDeprecated(false) .setOperationPollingMethod(false); @@ -170,8 +164,7 @@ public abstract static class Builder { public abstract Builder setInputType(TypeNode inputType); public abstract Builder setOutputType(TypeNode outputType); - - public abstract Builder setSelectiveGapicType(SelectiveGapicType gapicType); + public abstract Builder setIsPublic(boolean isPublic); public abstract Builder setStream(Stream stream); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index ed82a4fda0..e520bd9251 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -38,7 +38,6 @@ import com.google.api.generator.gapic.model.LongrunningOperation; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.OperationResponse; import com.google.api.generator.gapic.model.ResourceName; import com.google.api.generator.gapic.model.ResourceReference; @@ -93,7 +92,11 @@ import java.util.stream.IntStream; public class Parser { - + enum SelectiveGapicType { + PUBLIC, + HIDDEN, + INTERNAL + } private static final Logger LOGGER = Logger.getLogger(Parser.class.getName()); private static final String COMMA = ","; private static final String COLON = ":"; @@ -846,7 +849,7 @@ static List parseMethods( .setName(protoMethod.getName()) .setInputType(inputType) .setOutputType(TypeParser.parseType(protoMethod.getOutputType())) - .setSelectiveGapicType(methodSelectiveGapicType) + .setIsPublic(methodSelectiveGapicType == SelectiveGapicType.PUBLIC) .setStream( Method.toStream(protoMethod.isClientStreaming(), protoMethod.isServerStreaming())) .setLro(parseLro(servicePackage, protoMethod, messageTypes)) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java index 2a826f5fcc..d099c2642b 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java @@ -22,7 +22,6 @@ import com.google.api.generator.gapic.model.LongrunningOperation; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.ResourceName; import com.google.api.generator.gapic.model.Sample; @@ -217,6 +216,7 @@ void composeClassHeaderSample_firstMethodHasNoSignatures() { writeStatements( ServiceClientHeaderSampleComposer.composeClassHeaderSample( service, clientType, resourceNames, messageTypes)); + System.out.println("results: " + results); String expected = LineFormatter.lines( "try (EchoClient echoClient = EchoClient.create()) {\n", @@ -231,6 +231,7 @@ void composeClassHeaderSample_firstMethodHasNoSignatures() { " .build();\n", " EchoResponse response = echoClient.echo(request);\n", "}"); + System.out.println("results: " + expected); Assert.assertEquals(results, expected); } @@ -316,14 +317,14 @@ void composeClassHeaderSample_firstMethodIsInternal() { .setName("ChatShouldGenerateAsInternal") .setInputType(inputType) .setOutputType(outputType) - .setSelectiveGapicType(SelectiveGapicType.INTERNAL) + .setIsPublic(false) .build(); Method publicMethod = Method.builder() .setName("ChatShouldGenerateAsPublic") .setInputType(inputType) .setOutputType(outputType) - .setSelectiveGapicType(SelectiveGapicType.PUBLIC) + .setIsPublic(true) .build(); Service service = Service.builder() @@ -386,14 +387,14 @@ void composeClassHeaderSample_allMethodsAreInternal() { .setName("ChatShouldGenerateAsInternal") .setInputType(inputType) .setOutputType(outputType) - .setSelectiveGapicType(SelectiveGapicType.INTERNAL) + .setIsPublic(false) .build(); Method internalMethod2 = Method.builder() .setName("EchoShouldGenerateAsInternal") .setInputType(inputType) .setOutputType(outputType) - .setSelectiveGapicType(SelectiveGapicType.INTERNAL) + .setIsPublic(false) .build(); Service service = Service.builder() diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java index 6775f5ff93..84b9d627df 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java @@ -35,11 +35,11 @@ import com.google.api.generator.gapic.model.GapicContext; import com.google.api.generator.gapic.model.Message; import com.google.api.generator.gapic.model.Method; -import com.google.api.generator.gapic.model.Method.SelectiveGapicType; import com.google.api.generator.gapic.model.MethodArgument; import com.google.api.generator.gapic.model.ResourceName; import com.google.api.generator.gapic.model.ResourceReference; import com.google.api.generator.gapic.model.Transport; +import com.google.api.generator.gapic.protoparser.Parser.SelectiveGapicType; import com.google.api.version.test.ApiVersionTestingOuterClass; import com.google.auto.populate.field.AutoPopulateFieldTestingOuterClass; import com.google.bookshop.v1beta1.BookshopProto; @@ -761,7 +761,7 @@ void selectiveGenerationTest_shouldGenerateOnlySelectiveMethodsWithGenerateOmitt assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { assertTrue(method.name().contains("ShouldGenerate")); - assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.PUBLIC)); + assertTrue(method.isPublic()); } } @@ -789,7 +789,7 @@ void selectiveGenerationTest_shouldGenerateOmittedAsInternalWithGenerateOmittedT assertEquals("EchoServiceShouldGenerateAllPublic", services.get(0).overriddenName()); assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { - assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.PUBLIC)); + assertTrue(method.isPublic()); } // Tests a service with partial public methods and partial internal methods. @@ -797,16 +797,16 @@ void selectiveGenerationTest_shouldGenerateOmittedAsInternalWithGenerateOmittedT assertEquals(5, services.get(1).methods().size()); for (Method method : services.get(1).methods()) { if (method.name().contains("ShouldGenerateAsPublic")) { - assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.PUBLIC)); + assertTrue(method.isPublic()); } else { - assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.INTERNAL)); + assertFalse(method.isPublic()); } } // Tests a service with internal methods only. assertEquals("EchoServiceShouldGenerateAllInternal", services.get(2).overriddenName()); assertEquals(2, services.get(2).methods().size()); for (Method method : services.get(2).methods()) { - assertTrue(method.selectiveGapicType().equals(SelectiveGapicType.INTERNAL)); + assertFalse(method.isPublic()); } } From eb0c6bf68aa3664a4c38324fd41c878ad2eb5a89 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:08:19 -0700 Subject: [PATCH 07/21] Set default method level to be public --- .../main/java/com/google/api/generator/gapic/model/Method.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java index 7cdb9c85b5..4270a27530 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java @@ -138,7 +138,7 @@ public static Builder builder() { .setStream(Stream.NONE) .setAutoPopulatedFields(new ArrayList<>()) .setMethodSignatures(ImmutableList.of()) - .setIsPublic(false) + .setIsPublic(true) .setIsBatching(false) .setIsDeprecated(false) .setOperationPollingMethod(false); From 5a21be762cd035ba03bb21f474cda27cc81c5b0a Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:15:25 -0700 Subject: [PATCH 08/21] Fix formatting errors --- .../common/AbstractServiceSettingsClassComposer.java | 4 +--- .../AbstractServiceStubSettingsClassComposer.java | 4 +--- .../samplecode/ServiceClientHeaderSampleComposer.java | 10 ++-------- .../com/google/api/generator/gapic/model/Method.java | 1 + .../google/api/generator/gapic/protoparser/Parser.java | 1 + 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index 5d86ad46cb..d1cfceed23 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -140,9 +140,7 @@ private static List createClassHeaderComments( // public in the // list. List publicMethods = - service.methods().stream() - .filter(m -> m.isPublic() == true) - .collect(Collectors.toList()); + service.methods().stream().filter(m -> m.isPublic() == true).collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() ? Optional.empty() diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 0d96318c0c..8001dddd3c 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -423,9 +423,7 @@ private static List createClassHeaderComments( // public in the // list. List publicMethods = - service.methods().stream() - .filter(m -> m.isPublic() == true) - .collect(Collectors.toList()); + service.methods().stream().filter(m -> m.isPublic() == true).collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() ? Optional.empty() diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java index 071ac3c843..1f15b37f9e 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java @@ -53,9 +53,7 @@ public static Sample composeClassHeaderSample( Map resourceNames, Map messageTypes) { List publicMethods = - service.methods().stream() - .filter(m -> m.isPublic() == true) - .collect(Collectors.toList()); + service.methods().stream().filter(m -> m.isPublic() == true).collect(Collectors.toList()); // If all generated methods are INTERNAL, generate an empty service sample. if (publicMethods.isEmpty()) { @@ -66,11 +64,7 @@ public static Sample composeClassHeaderSample( // exists, use the first public method in the service's methods list. Method method = publicMethods.stream() - .filter( - m -> - m.stream() == Method.Stream.NONE - && !m.hasLro() - && !m.isPaged()) + .filter(m -> m.stream() == Method.Stream.NONE && !m.hasLro() && !m.isPaged()) .findFirst() .orElse(publicMethods.get(0)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java index 4270a27530..bac5cf4962 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java @@ -164,6 +164,7 @@ public abstract static class Builder { public abstract Builder setInputType(TypeNode inputType); public abstract Builder setOutputType(TypeNode outputType); + public abstract Builder setIsPublic(boolean isPublic); public abstract Builder setStream(Stream stream); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index e520bd9251..3b5a2eb1bb 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -97,6 +97,7 @@ enum SelectiveGapicType { HIDDEN, INTERNAL } + private static final Logger LOGGER = Logger.getLogger(Parser.class.getName()); private static final String COMMA = ","; private static final String COLON = ":"; From 5fad1feda9945c700aa0e5f4c00a7cc69cd16df4 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 10 Apr 2025 13:23:40 -0700 Subject: [PATCH 09/21] Change isPublic attribute to isInternalApi in method class --- .../composer/comment/ServiceClientCommentComposer.java | 4 ++-- .../common/AbstractServiceClientClassComposer.java | 6 +++--- .../common/AbstractServiceSettingsClassComposer.java | 10 +++++----- .../common/AbstractServiceStubClassComposer.java | 2 +- .../AbstractServiceStubSettingsClassComposer.java | 4 ++-- .../samplecode/ServiceClientHeaderSampleComposer.java | 2 +- .../com/google/api/generator/gapic/model/Method.java | 7 +++---- .../google/api/generator/gapic/protoparser/Parser.java | 2 +- .../ServiceClientHeaderSampleComposerTest.java | 10 +++++----- .../api/generator/gapic/protoparser/ParserTest.java | 10 +++++----- 10 files changed, 28 insertions(+), 29 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java index 0ab931fff2..16d21ef0f9 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/ServiceClientCommentComposer.java @@ -202,7 +202,7 @@ public static List createRpcMethodHeaderComment( methodJavadocBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { methodJavadocBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING); } @@ -349,7 +349,7 @@ public static List createRpcCallableMethodHeaderComment( methodJavadocBuilder.setDeprecated(CommentComposer.DEPRECATED_METHOD_STRING); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { methodJavadocBuilder.setInternalOnly(CommentComposer.INTERNAL_ONLY_METHOD_STRING); } diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index 1ded7f0c77..2e08ef9320 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -809,7 +809,7 @@ private static List createMethodVariants( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); @@ -898,7 +898,7 @@ private static MethodDefinition createMethodDefaultMethod( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); @@ -1058,7 +1058,7 @@ private static MethodDefinition createCallableMethod( if (method.isDeprecated()) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index d1cfceed23..bfca7db0d6 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -140,7 +140,7 @@ private static List createClassHeaderComments( // public in the // list. List publicMethods = - service.methods().stream().filter(m -> m.isPublic() == true).collect(Collectors.toList()); + service.methods().stream().filter(m -> m.isInternalApi() == false).collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() ? Optional.empty() @@ -298,7 +298,7 @@ private static MethodDefinition methodBuilderHelper( annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (protoMethod.isPublic() == false) { + if (protoMethod.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); @@ -309,7 +309,7 @@ private static MethodDefinition methodBuilderHelper( SettingsCommentComposer.createCallSettingsGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), - protoMethod.isPublic() == false)) + protoMethod.isInternalApi())) .setAnnotations(annotations) .build(); } @@ -783,7 +783,7 @@ private static List createNestedBuilderSettingsGetterMethods( SettingsCommentComposer.createCallSettingsBuilderGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), - protoMethod.isPublic() == false)) + protoMethod.isInternalApi())) .setAnnotations( protoMethod.isDeprecated() ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) @@ -800,7 +800,7 @@ private static List createNestedBuilderSettingsGetterMethods( SettingsCommentComposer.createCallSettingsBuilderGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), - protoMethod.isPublic() == false)) + protoMethod.isInternalApi())) .setAnnotations( protoMethod.isDeprecated() ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java index 662333100a..0697c798d1 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java @@ -202,7 +202,7 @@ private MethodDefinition createCallableGetterHelper( if (method.isDeprecated()) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( typeStore.get("InternalApi"), INTERNAL_API_WARNING)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 8001dddd3c..c2127fd1c6 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -423,7 +423,7 @@ private static List createClassHeaderComments( // public in the // list. List publicMethods = - service.methods().stream().filter(m -> m.isPublic() == true).collect(Collectors.toList()); + service.methods().stream().filter(m -> m.isInternalApi() == false).collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() ? Optional.empty() @@ -502,7 +502,7 @@ private static Map createMethodSettingsClassMemberVarExprs if (method.isDeprecated()) { deprecatedSettingVarNames.add(varName); } - if (method.isPublic() == false) { + if (method.isInternalApi()) { internalSettingVarNames.add(varName); } varExprs.put( diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java index 1f15b37f9e..37d5454f19 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java @@ -53,7 +53,7 @@ public static Sample composeClassHeaderSample( Map resourceNames, Map messageTypes) { List publicMethods = - service.methods().stream().filter(m -> m.isPublic() == true).collect(Collectors.toList()); + service.methods().stream().filter(m -> m.isInternalApi() == false).collect(Collectors.toList()); // If all generated methods are INTERNAL, generate an empty service sample. if (publicMethods.isEmpty()) { diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java index bac5cf4962..9a56a0404f 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java @@ -38,7 +38,7 @@ public enum Stream { public abstract TypeNode outputType(); - public abstract boolean isPublic(); + public abstract boolean isInternalApi(); public abstract boolean isBatching(); @@ -138,7 +138,7 @@ public static Builder builder() { .setStream(Stream.NONE) .setAutoPopulatedFields(new ArrayList<>()) .setMethodSignatures(ImmutableList.of()) - .setIsPublic(true) + .setIsInternalApi(false) .setIsBatching(false) .setIsDeprecated(false) .setOperationPollingMethod(false); @@ -164,8 +164,7 @@ public abstract static class Builder { public abstract Builder setInputType(TypeNode inputType); public abstract Builder setOutputType(TypeNode outputType); - - public abstract Builder setIsPublic(boolean isPublic); + public abstract Builder setIsInternalApi(boolean isInternalApi); public abstract Builder setStream(Stream stream); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index 3b5a2eb1bb..18d310eb96 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -850,7 +850,7 @@ static List parseMethods( .setName(protoMethod.getName()) .setInputType(inputType) .setOutputType(TypeParser.parseType(protoMethod.getOutputType())) - .setIsPublic(methodSelectiveGapicType == SelectiveGapicType.PUBLIC) + .setIsInternalApi(methodSelectiveGapicType == SelectiveGapicType.INTERNAL) .setStream( Method.toStream(protoMethod.isClientStreaming(), protoMethod.isServerStreaming())) .setLro(parseLro(servicePackage, protoMethod, messageTypes)) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java index d099c2642b..6994401b44 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java @@ -317,14 +317,14 @@ void composeClassHeaderSample_firstMethodIsInternal() { .setName("ChatShouldGenerateAsInternal") .setInputType(inputType) .setOutputType(outputType) - .setIsPublic(false) + .setIsInternalApi(true) .build(); Method publicMethod = Method.builder() .setName("ChatShouldGenerateAsPublic") .setInputType(inputType) .setOutputType(outputType) - .setIsPublic(true) + .setIsInternalApi(false) .build(); Service service = Service.builder() @@ -387,14 +387,14 @@ void composeClassHeaderSample_allMethodsAreInternal() { .setName("ChatShouldGenerateAsInternal") .setInputType(inputType) .setOutputType(outputType) - .setIsPublic(false) + .setIsInternalApi(true) .build(); Method internalMethod2 = Method.builder() .setName("EchoShouldGenerateAsInternal") .setInputType(inputType) .setOutputType(outputType) - .setIsPublic(false) + .setIsInternalApi(true) .build(); Service service = Service.builder() @@ -421,7 +421,7 @@ void composeClassHeaderSample_allMethodsAreInternal() { LineFormatter.lines( "try (EchoServiceSelectiveApiClient echoServiceSelectiveApiClient =\n" + " EchoServiceSelectiveApiClient.create()) {}"); - Assert.assertEquals(results, expected); + Assert.assertEquals(expected, results); } /*Testing composeSetCredentialsSample*/ diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java index 84b9d627df..80bff7c6e3 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java @@ -761,7 +761,7 @@ void selectiveGenerationTest_shouldGenerateOnlySelectiveMethodsWithGenerateOmitt assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { assertTrue(method.name().contains("ShouldGenerate")); - assertTrue(method.isPublic()); + assertFalse(method.isInternalApi()); } } @@ -789,7 +789,7 @@ void selectiveGenerationTest_shouldGenerateOmittedAsInternalWithGenerateOmittedT assertEquals("EchoServiceShouldGenerateAllPublic", services.get(0).overriddenName()); assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { - assertTrue(method.isPublic()); + assertFalse(method.isInternalApi()); } // Tests a service with partial public methods and partial internal methods. @@ -797,16 +797,16 @@ void selectiveGenerationTest_shouldGenerateOmittedAsInternalWithGenerateOmittedT assertEquals(5, services.get(1).methods().size()); for (Method method : services.get(1).methods()) { if (method.name().contains("ShouldGenerateAsPublic")) { - assertTrue(method.isPublic()); + assertFalse(method.isInternalApi()); } else { - assertFalse(method.isPublic()); + assertTrue(method.isInternalApi()); } } // Tests a service with internal methods only. assertEquals("EchoServiceShouldGenerateAllInternal", services.get(2).overriddenName()); assertEquals(2, services.get(2).methods().size()); for (Method method : services.get(2).methods()) { - assertFalse(method.isPublic()); + assertTrue(method.isInternalApi()); } } From 221eb8f6a6089d2d435d32dba93f4b78a095b734 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 10 Apr 2025 13:30:05 -0700 Subject: [PATCH 10/21] Fix linter --- .../composer/common/AbstractServiceSettingsClassComposer.java | 4 +++- .../common/AbstractServiceStubSettingsClassComposer.java | 4 +++- .../samplecode/ServiceClientHeaderSampleComposer.java | 4 +++- .../java/com/google/api/generator/gapic/model/Method.java | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index bfca7db0d6..8d3d9760be 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -140,7 +140,9 @@ private static List createClassHeaderComments( // public in the // list. List publicMethods = - service.methods().stream().filter(m -> m.isInternalApi() == false).collect(Collectors.toList()); + service.methods().stream() + .filter(m -> m.isInternalApi() == false) + .collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() ? Optional.empty() diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index c2127fd1c6..41541784d0 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -423,7 +423,9 @@ private static List createClassHeaderComments( // public in the // list. List publicMethods = - service.methods().stream().filter(m -> m.isInternalApi() == false).collect(Collectors.toList()); + service.methods().stream() + .filter(m -> m.isInternalApi() == false) + .collect(Collectors.toList()); Optional methodOpt = publicMethods.isEmpty() ? Optional.empty() diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java index 37d5454f19..c4e38e24a3 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java @@ -53,7 +53,9 @@ public static Sample composeClassHeaderSample( Map resourceNames, Map messageTypes) { List publicMethods = - service.methods().stream().filter(m -> m.isInternalApi() == false).collect(Collectors.toList()); + service.methods().stream() + .filter(m -> m.isInternalApi() == false) + .collect(Collectors.toList()); // If all generated methods are INTERNAL, generate an empty service sample. if (publicMethods.isEmpty()) { diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java index 9a56a0404f..66acd065a3 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java @@ -164,6 +164,7 @@ public abstract static class Builder { public abstract Builder setInputType(TypeNode inputType); public abstract Builder setOutputType(TypeNode outputType); + public abstract Builder setIsInternalApi(boolean isInternalApi); public abstract Builder setStream(Stream stream); From ffd66dbee4ffb0ba4f5bec63f7546dc70e759c61 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:18:24 -0700 Subject: [PATCH 11/21] Fix comments from PR review. --- .../comment/SettingsCommentComposer.java | 38 ++- .../AbstractServiceClientClassComposer.java | 53 ++-- .../AbstractServiceSettingsClassComposer.java | 6 +- ...tractServiceStubSettingsClassComposer.java | 37 +-- .../generator/gapic/protoparser/Parser.java | 16 +- .../gapic/composer/ComposerTest.java | 3 - .../GrpcServiceStubClassComposerTest.java | 10 - .../EchoServiceSelectiveGapicClient.golden | 214 ++++++++------- .../grpc/goldens/SelectiveGapicStub.golden | 252 ------------------ ...AsyncChatAgainShouldGenerateAsUsual.golden | 58 ++++ .../AsyncChatShouldGenerateAsInternal.golden | 12 +- .../AsyncChatShouldGenerateAsUsual.golden | 56 ++++ .../AsyncEchoShouldGenerateAsInternal.golden | 14 +- .../AsyncEchoShouldGenerateAsUsual.golden | 56 ++++ .../SyncChatShouldGenerateAsInternal.golden | 12 +- ...tShouldGenerateAsInternalFoobarname.golden | 12 +- ...cChatShouldGenerateAsInternalNoargs.golden | 12 +- ...cChatShouldGenerateAsInternalString.golden | 12 +- .../SyncCreateSetCredentialsProvider.golden | 18 +- .../SyncCreateSetEndpoint.golden | 18 +- .../SyncEchoShouldGenerateAsUsual.golden | 51 ++++ ...EchoShouldGenerateAsUsualFoobarname.golden | 44 +++ ...SyncEchoShouldGenerateAsUsualNoargs.golden | 42 +++ ...SyncEchoShouldGenerateAsUsualString.golden | 44 +++ ...ServiceClientHeaderSampleComposerTest.java | 12 +- .../gapic/protoparser/ParserTest.java | 8 +- .../test/protoloader/TestProtoLoader.java | 2 +- .../test/proto/selective_api_generation.proto | 16 +- ...i_generation_generate_omitted_v1beta1.yaml | 12 +- .../selective_api_generation_v1beta1.yaml | 6 +- 30 files changed, 606 insertions(+), 540 deletions(-) delete mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsUsual.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsUsual.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsUsual.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsual.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualFoobarname.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualNoargs.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualString.golden diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java index 271e6f8a65..3cb208b7d4 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java @@ -59,31 +59,31 @@ public class SettingsCommentComposer { "Retries are configured for idempotent methods but not for non-idempotent methods."; public static final CommentStatement DEFAULT_SCOPES_COMMENT = - toSimpleComment("The default scopes of the service."); + toCommentStatement("The default scopes of the service."); public static final CommentStatement DEFAULT_EXECUTOR_PROVIDER_BUILDER_METHOD_COMMENT = - toSimpleComment("Returns a builder for the default ExecutorProvider for this service."); + toCommentStatement("Returns a builder for the default ExecutorProvider for this service."); public static final CommentStatement DEFAULT_SERVICE_NAME_METHOD_COMMENT = - toSimpleComment("Returns the default service name."); + toCommentStatement("Returns the default service name."); public static final CommentStatement DEFAULT_SERVICE_ENDPOINT_METHOD_COMMENT = - toSimpleComment("Returns the default service endpoint."); + toCommentStatement("Returns the default service endpoint."); public static final CommentStatement DEFAULT_SERVICE_MTLS_ENDPOINT_METHOD_COMMENT = - toSimpleComment("Returns the default mTLS service endpoint."); + toCommentStatement("Returns the default mTLS service endpoint."); public static final CommentStatement DEFAULT_SERVICE_SCOPES_METHOD_COMMENT = - toSimpleComment("Returns the default service scopes."); + toCommentStatement("Returns the default service scopes."); public static final CommentStatement DEFAULT_CREDENTIALS_PROVIDER_BUILDER_METHOD_COMMENT = - toSimpleComment("Returns a builder for the default credentials for this service."); + toCommentStatement("Returns a builder for the default credentials for this service."); public static final CommentStatement DEFAULT_TRANSPORT_PROVIDER_BUILDER_METHOD_COMMENT = - toSimpleComment("Returns a builder for the default ChannelProvider for this service."); + toCommentStatement("Returns a builder for the default ChannelProvider for this service."); public static final CommentStatement NEW_BUILDER_METHOD_COMMENT = - toSimpleComment("Returns a new builder for this class."); + toCommentStatement("Returns a new builder for this class."); public static final CommentStatement TO_BUILDER_METHOD_COMMENT = - toSimpleComment("Returns a builder containing all the values of this settings class."); + toCommentStatement("Returns a builder containing all the values of this settings class."); public static final List APPLY_TO_ALL_UNARY_METHODS_METHOD_COMMENTS = Arrays.asList( @@ -103,9 +103,9 @@ public class SettingsCommentComposer { public SettingsCommentComposer(String transportPrefix) { this.newTransportBuilderMethodComment = - toSimpleComment(String.format("Returns a new %s builder for this class.", transportPrefix)); + toCommentStatement(String.format("Returns a new %s builder for this class.", transportPrefix)); this.transportProviderBuilderMethodComment = - toSimpleComment( + toCommentStatement( String.format( "Returns a builder for the default %s ChannelProvider for this service.", transportPrefix)); @@ -121,22 +121,20 @@ public CommentStatement getTransportProviderBuilderMethodComment() { public static CommentStatement createCallSettingsGetterComment( String javaMethodName, boolean isMethodDeprecated, boolean isMethodInternal) { - return toDeprecatedInternalSimpleComment( + return toCommentStatement( String.format(CALL_SETTINGS_METHOD_DOC_PATTERN, javaMethodName), isMethodDeprecated, isMethodInternal); } public static CommentStatement createBuilderClassComment(String outerClassName) { - return toSimpleComment(String.format(BUILDER_CLASS_DOC_PATTERN, outerClassName)); + return toCommentStatement(String.format(BUILDER_CLASS_DOC_PATTERN, outerClassName)); } public static CommentStatement createCallSettingsBuilderGetterComment( String javaMethodName, boolean isMethodDeprecated, boolean isMethodInternal) { String methodComment = String.format(CALL_SETTINGS_BUILDER_METHOD_DOC_PATTERN, javaMethodName); - return isMethodDeprecated || isMethodInternal - ? toDeprecatedInternalSimpleComment(methodComment, isMethodDeprecated, isMethodInternal) - : toSimpleComment(methodComment); + return toCommentStatement(methodComment, isMethodDeprecated, isMethodInternal); } public static List createClassHeaderComments( @@ -201,11 +199,11 @@ public static List createClassHeaderComments( CommentStatement.withComment(javaDocCommentBuilder.build())); } - private static CommentStatement toSimpleComment(String comment) { - return CommentStatement.withComment(JavaDocComment.withComment(comment)); + private static CommentStatement toCommentStatement(String comment) { + return toCommentStatement(comment, false, false); } - private static CommentStatement toDeprecatedInternalSimpleComment( + private static CommentStatement toCommentStatement( String comment, boolean isDeprecated, boolean isInternal) { JavaDocComment.Builder docBuilder = JavaDocComment.builder().addComment(comment); docBuilder = diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index 2e08ef9320..1c328b12cb 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -130,6 +130,22 @@ protected TransportContext getTransportContext() { return transportContext; } + private static List addMethodAnnotations(Method method, TypeStore typeStore) + { + List annotations = new ArrayList<>(); + if (method.isDeprecated()) { + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + + if (method.isInternalApi()) { + annotations.add( + AnnotationNode.withTypeAndDescription( + typeStore.get("InternalApi"), INTERNAL_API_WARNING)); + } + + return annotations; + } + @Override public GapicClass generate(GapicContext context, Service service) { Map resourceNames = context.helperResourceNames(); @@ -804,18 +820,7 @@ private static List createMethodVariants( methodVariantBuilder.setReturnType(methodOutputType).setReturnExpr(rpcInvocationExpr); } - List annotations = new ArrayList<>(); - if (method.isDeprecated()) { - annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); - } - - if (method.isInternalApi()) { - annotations.add( - AnnotationNode.withTypeAndDescription( - typeStore.get("InternalApi"), INTERNAL_API_WARNING)); - } - - methodVariantBuilder = methodVariantBuilder.setAnnotations(annotations); + methodVariantBuilder = methodVariantBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); methodVariantBuilder = methodVariantBuilder.setBody(statements); javaMethods.add(methodVariantBuilder.build()); } @@ -837,7 +842,6 @@ private static MethodDefinition createMethodDefaultMethod( method.isPaged() ? typeStore.get(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) : method.outputType(); - List annotations = new ArrayList<>(); if (method.hasLro()) { LongrunningOperation lro = method.lro(); methodOutputType = @@ -894,15 +898,6 @@ private static MethodDefinition createMethodDefaultMethod( .setName(String.format(method.hasLro() ? "%sAsync" : "%s", methodName)) .setArguments(Arrays.asList(requestArgVarExpr)); - if (method.isDeprecated()) { - annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); - } - - if (method.isInternalApi()) { - annotations.add( - AnnotationNode.withTypeAndDescription( - typeStore.get("InternalApi"), INTERNAL_API_WARNING)); - } if (isProtoEmptyType(methodOutputType)) { methodBuilder = @@ -914,8 +909,7 @@ private static MethodDefinition createMethodDefaultMethod( methodBuilder.setReturnExpr(callableMethodExpr).setReturnType(methodOutputType); } - methodBuilder.setAnnotations(annotations); - + methodBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); return methodBuilder.build(); } @@ -1054,17 +1048,8 @@ private static MethodDefinition createCallableMethod( } MethodDefinition.Builder methodDefBuilder = MethodDefinition.builder(); - List annotations = new ArrayList<>(); - if (method.isDeprecated()) { - annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); - } - if (method.isInternalApi()) { - annotations.add( - AnnotationNode.withTypeAndDescription( - typeStore.get("InternalApi"), INTERNAL_API_WARNING)); - } - methodDefBuilder = methodDefBuilder.setAnnotations(annotations); + methodDefBuilder = methodDefBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); return methodDefBuilder .setHeaderCommentStatements( diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index 8d3d9760be..98d12dda5f 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -283,10 +283,10 @@ private static List createSettingsGetterMethods( methodMakerFn.apply(getCallSettingsType(protoMethod, typeStore), javaMethodName); javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaMethodName)); if (protoMethod.hasLro()) { - javaMethodName = String.format("%sOperationSettings", javaStyleName); + String javaOperationSettingsMethodName = String.format("%sOperationSettings", javaStyleName); methodBuilder = - methodMakerFn.apply(getOperationCallSettingsType(protoMethod), javaMethodName); - javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaMethodName)); + methodMakerFn.apply(getOperationCallSettingsType(protoMethod), javaOperationSettingsMethodName); + javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaOperationSettingsMethodName)); } } return javaMethods; diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 41541784d0..0e4138c2f6 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -1016,6 +1016,18 @@ private List createClassMethods( return javaMethods; } + private static List createMethodAnnotation(boolean isDeprecated, boolean isInternal) { + List annotations = new ArrayList<>(); + if (isDeprecated) { + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + if (isInternal) { + annotations.add( + AnnotationNode.withTypeAndDescription( + FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); + } + return annotations; + } private static List createMethodSettingsGetterMethods( Map methodSettingsMemberVarExprs, final Set deprecatedSettingVarNames, @@ -1024,20 +1036,11 @@ private static List createMethodSettingsGetterMethods( e -> { boolean isDeprecated = deprecatedSettingVarNames.contains(e.getKey()); boolean isInternal = internalSettingVarNames.contains(e.getKey()); - List annotations = new ArrayList<>(); - if (isDeprecated) { - annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); - } - if (isInternal) { - annotations.add( - AnnotationNode.withTypeAndDescription( - FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); - } return MethodDefinition.builder() .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsGetterComment( getMethodNameFromSettingsVarName(e.getKey()), isDeprecated, isInternal)) - .setAnnotations(annotations) + .setAnnotations(createMethodAnnotation(isDeprecated, isInternal)) .setScope(ScopeNode.PUBLIC) .setReturnType(e.getValue().type()) .setName(e.getKey()) @@ -2007,34 +2010,22 @@ private static List createNestedClassSettingsBuilderGetterMeth t.reference() .copyAndSetGenerics(ImmutableList.of()) .equals(operationCallSettingsBuilderRef); - AnnotationNode deprecatedAnnotation = AnnotationNode.withType(TypeNode.DEPRECATED); - AnnotationNode internalAnnotation = - AnnotationNode.withTypeAndDescription( - FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING); List javaMethods = new ArrayList<>(); for (Map.Entry settingsVarEntry : nestedMethodSettingsMemberVarExprs.entrySet()) { String varName = settingsVarEntry.getKey(); VariableExpr settingsVarExpr = settingsVarEntry.getValue(); - List annotations = new ArrayList<>(); boolean isDeprecated = nestedDeprecatedSettingVarNames.contains(varName); - if (isDeprecated) { - annotations.add(deprecatedAnnotation); - } - boolean isInternal = nestedInternalSettingVarNames.contains(varName); - if (isInternal) { - annotations.add(internalAnnotation); - } javaMethods.add( MethodDefinition.builder() .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsBuilderGetterComment( getMethodNameFromSettingsVarName(varName), isDeprecated, isInternal)) - .setAnnotations(annotations) + .setAnnotations(createMethodAnnotation(isDeprecated, isInternal)) .setScope(ScopeNode.PUBLIC) .setReturnType(settingsVarExpr.type()) .setName(settingsVarExpr.variable().identifier().name()) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index 18d310eb96..4afe42615c 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -93,8 +93,11 @@ public class Parser { enum SelectiveGapicType { + // Methods will be generated and exposed externally as usual. PUBLIC, + // Methods will not be generated. HIDDEN, + // Methods will be generated and tagged @InternalApi (internal use) during generation. INTERNAL } @@ -474,9 +477,16 @@ static SelectiveGapicType getMethodSelectiveGapicType( // is in the allow list. // Otherwise, generate this method as INTERNAL or HIDDEN based on GenerateOmittedAsInternal // flag. - if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false - || includeMethodsList.contains(method.getFullName())) return SelectiveGapicType.PUBLIC; - else return generateOmittedAsInternal ? SelectiveGapicType.INTERNAL : SelectiveGapicType.HIDDEN; + if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false || includeMethodsList.contains(method.getFullName())) { + return SelectiveGapicType.PUBLIC; + } + else if (generateOmittedAsInternal) + { + return SelectiveGapicType.INTERNAL; + } + else { + return SelectiveGapicType.HIDDEN; + } } // A service is considered empty if it contains no methods, or only methods marked as HIDDEN. diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java index 76b0478d61..ad370307c1 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java @@ -42,10 +42,7 @@ class ComposerTest { private final GapicContext context = GrpcTestProtoLoader.instance().parseShowcaseEcho(); - private final GapicContext selectiveGapicContext = - GrpcTestProtoLoader.instance().parseSelectiveGenerationTesting(); private final Service echoProtoService = context.services().get(0); - private final Service selctiveGapicService = selectiveGapicContext.services().get(1); private final List clazzes = Arrays.asList( GrpcServiceCallableFactoryClassComposer.instance() diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java index dc82ca0e8a..5c910cd618 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java @@ -93,16 +93,6 @@ void generateGrpcServiceStubClass_autopopulateField() { Assert.assertEmptySamples(clazz.samples()); } - @Test - void generateGrpcServiceStubClass_selectiveGeneration() { - GapicContext context = GrpcTestProtoLoader.instance().parseSelectiveGenerationTesting(); - Service service = context.services().get(1); - GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, service); - - Assert.assertGoldenClass(this.getClass(), clazz, "SelectiveGapicStub.golden"); - Assert.assertEmptySamples(clazz.samples()); - } - @Test void generateGrpcServiceStubClass_callableNameType() { GapicContext context = GrpcTestProtoLoader.instance().parseCallabeNameType(); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index b69f5d474b..3488d18479 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -5,8 +5,8 @@ import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialPublicStub; -import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialPublicStubSettings; +import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialUsualStub; +import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialUsualStubSettings; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -22,14 +22,14 @@ import javax.annotation.Generated; * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(); + * echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(); * } * } * - *

    Note: close() needs to be called on the EchoServiceShouldGeneratePartialPublicClient object to + *

    Note: close() needs to be called on the EchoServiceShouldGeneratePartialUsualClient object to * clean up resources such as threads. In the example above, try-with-resources is used, which * automatically calls close(). * @@ -41,42 +41,42 @@ import javax.annotation.Generated; * Method Variants * * - *

    EchoShouldGenerateAsPublic + *

    EchoShouldGenerateAsUsual *

    * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    *
      - *
    • echoShouldGenerateAsPublic(EchoRequest request) + *

    • echoShouldGenerateAsUsual(EchoRequest request) *

    *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    *
      - *
    • echoShouldGenerateAsPublic() - *

    • echoShouldGenerateAsPublic(FoobarName name) - *

    • echoShouldGenerateAsPublic(String name) + *

    • echoShouldGenerateAsUsual() + *

    • echoShouldGenerateAsUsual(FoobarName name) + *

    • echoShouldGenerateAsUsual(String name) *

    *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    *
      - *
    • echoShouldGenerateAsPublicCallable() + *

    • echoShouldGenerateAsUsualCallable() *

    * * * - *

    ChatShouldGenerateAsPublic + *

    ChatShouldGenerateAsUsual *

    * *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    *
      - *
    • chatShouldGenerateAsPublicCallable() + *

    • chatShouldGenerateAsUsualCallable() *

    * * * - *

    ChatAgainShouldGenerateAsPublic + *

    ChatAgainShouldGenerateAsUsual *

    * *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    *
      - *
    • chatAgainShouldGenerateAsPublicCallable() + *

    • chatAgainShouldGenerateAsUsualCallable() *

    * * @@ -119,7 +119,7 @@ import javax.annotation.Generated; * method to extract the individual identifiers contained within names that are returned. * *

    This class can be customized by passing in a custom instance of - * EchoServiceShouldGeneratePartialPublicSettings to create(). For example: + * EchoServiceShouldGeneratePartialUsualSettings to create(). For example: * *

    To customize credentials: * @@ -129,13 +129,13 @@ import javax.annotation.Generated; * // - 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 - * EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings = - * EchoServiceShouldGeneratePartialPublicSettings.newBuilder() + * EchoServiceShouldGeneratePartialUsualSettings echoServiceShouldGeneratePartialUsualSettings = + * EchoServiceShouldGeneratePartialUsualSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) * .build(); - * EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create( - * echoServiceShouldGeneratePartialPublicSettings); + * EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create( + * echoServiceShouldGeneratePartialUsualSettings); * } * *

    To customize the endpoint: @@ -146,72 +146,72 @@ import javax.annotation.Generated; * // - 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 - * EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings = - * EchoServiceShouldGeneratePartialPublicSettings.newBuilder().setEndpoint(myEndpoint).build(); - * EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create( - * echoServiceShouldGeneratePartialPublicSettings); + * EchoServiceShouldGeneratePartialUsualSettings echoServiceShouldGeneratePartialUsualSettings = + * EchoServiceShouldGeneratePartialUsualSettings.newBuilder().setEndpoint(myEndpoint).build(); + * EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create( + * echoServiceShouldGeneratePartialUsualSettings); * } * *

    Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi @Generated("by gapic-generator-java") -public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundResource { - private final EchoServiceShouldGeneratePartialPublicSettings settings; - private final EchoServiceShouldGeneratePartialPublicStub stub; +public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundResource { + private final EchoServiceShouldGeneratePartialUsualSettings settings; + private final EchoServiceShouldGeneratePartialUsualStub stub; /** - * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient with default settings. + * Constructs an instance of EchoServiceShouldGeneratePartialUsualClient with default settings. */ - public static final EchoServiceShouldGeneratePartialPublicClient create() throws IOException { - return create(EchoServiceShouldGeneratePartialPublicSettings.newBuilder().build()); + public static final EchoServiceShouldGeneratePartialUsualClient create() throws IOException { + return create(EchoServiceShouldGeneratePartialUsualSettings.newBuilder().build()); } /** - * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient, using the given + * Constructs an instance of EchoServiceShouldGeneratePartialUsualClient, using the given * settings. The channels are created based on the settings passed in, or defaults for any * settings that are not set. */ - public static final EchoServiceShouldGeneratePartialPublicClient create( - EchoServiceShouldGeneratePartialPublicSettings settings) throws IOException { - return new EchoServiceShouldGeneratePartialPublicClient(settings); + public static final EchoServiceShouldGeneratePartialUsualClient create( + EchoServiceShouldGeneratePartialUsualSettings settings) throws IOException { + return new EchoServiceShouldGeneratePartialUsualClient(settings); } /** - * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient, using the given stub - * for making calls. This is for advanced usage - prefer using - * create(EchoServiceShouldGeneratePartialPublicSettings). + * Constructs an instance of EchoServiceShouldGeneratePartialUsualClient, using the given stub for + * making calls. This is for advanced usage - prefer using + * create(EchoServiceShouldGeneratePartialUsualSettings). */ - public static final EchoServiceShouldGeneratePartialPublicClient create( - EchoServiceShouldGeneratePartialPublicStub stub) { - return new EchoServiceShouldGeneratePartialPublicClient(stub); + public static final EchoServiceShouldGeneratePartialUsualClient create( + EchoServiceShouldGeneratePartialUsualStub stub) { + return new EchoServiceShouldGeneratePartialUsualClient(stub); } /** - * Constructs an instance of EchoServiceShouldGeneratePartialPublicClient, using the given + * Constructs an instance of EchoServiceShouldGeneratePartialUsualClient, using the given * settings. This is protected so that it is easy to make a subclass, but otherwise, the static * factory methods should be preferred. */ - protected EchoServiceShouldGeneratePartialPublicClient( - EchoServiceShouldGeneratePartialPublicSettings settings) throws IOException { + protected EchoServiceShouldGeneratePartialUsualClient( + EchoServiceShouldGeneratePartialUsualSettings settings) throws IOException { this.settings = settings; this.stub = - ((EchoServiceShouldGeneratePartialPublicStubSettings) settings.getStubSettings()) + ((EchoServiceShouldGeneratePartialUsualStubSettings) settings.getStubSettings()) .createStub(); } - protected EchoServiceShouldGeneratePartialPublicClient( - EchoServiceShouldGeneratePartialPublicStub stub) { + protected EchoServiceShouldGeneratePartialUsualClient( + EchoServiceShouldGeneratePartialUsualStub stub) { this.settings = null; this.stub = stub; } - public final EchoServiceShouldGeneratePartialPublicSettings getSettings() { + public final EchoServiceShouldGeneratePartialUsualSettings getSettings() { return settings; } - public EchoServiceShouldGeneratePartialPublicStub getStub() { + public EchoServiceShouldGeneratePartialUsualStub getStub() { return stub; } @@ -225,19 +225,19 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(); + * echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EchoResponse echoShouldGenerateAsPublic() { + public final EchoResponse echoShouldGenerateAsUsual() { EchoRequest request = EchoRequest.newBuilder().build(); - return echoShouldGenerateAsPublic(request); + return echoShouldGenerateAsUsual(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -250,21 +250,21 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]"); * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(name); + * echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(name); * } * } * * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EchoResponse echoShouldGenerateAsPublic(FoobarName name) { + public final EchoResponse echoShouldGenerateAsUsual(FoobarName name) { EchoRequest request = EchoRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return echoShouldGenerateAsPublic(request); + return echoShouldGenerateAsUsual(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -277,20 +277,20 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString(); * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(name); + * echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(name); * } * } * * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EchoResponse echoShouldGenerateAsPublic(String name) { + public final EchoResponse echoShouldGenerateAsUsual(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); - return echoShouldGenerateAsPublic(request); + return echoShouldGenerateAsUsual(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -303,8 +303,8 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoRequest request = * EchoRequest.newBuilder() * .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -312,15 +312,15 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * .setFoobar(Foobar.newBuilder().build()) * .build(); * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.echoShouldGenerateAsPublic(request); + * echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EchoResponse echoShouldGenerateAsPublic(EchoRequest request) { - return echoShouldGenerateAsPublicCallable().call(request); + public final EchoResponse echoShouldGenerateAsUsual(EchoRequest request) { + return echoShouldGenerateAsUsualCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -333,8 +333,8 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoRequest request = * EchoRequest.newBuilder() * .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -342,16 +342,16 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * .setFoobar(Foobar.newBuilder().build()) * .build(); * ApiFuture future = - * echoServiceShouldGeneratePartialPublicClient - * .echoShouldGenerateAsPublicCallable() + * echoServiceShouldGeneratePartialUsualClient + * .echoShouldGenerateAsUsualCallable() * .futureCall(request); * // Do something. * EchoResponse response = future.get(); * } * } */ - public final UnaryCallable echoShouldGenerateAsPublicCallable() { - return stub.echoShouldGenerateAsPublicCallable(); + public final UnaryCallable echoShouldGenerateAsUsualCallable() { + return stub.echoShouldGenerateAsUsualCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -364,10 +364,10 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * BidiStream bidiStream = - * echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsPublicCallable().call(); + * echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsUsualCallable().call(); * EchoRequest request = * EchoRequest.newBuilder() * .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -382,8 +382,8 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } */ public final BidiStreamingCallable - chatShouldGenerateAsPublicCallable() { - return stub.chatShouldGenerateAsPublicCallable(); + chatShouldGenerateAsUsualCallable() { + return stub.chatShouldGenerateAsUsualCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -396,11 +396,11 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * BidiStream bidiStream = - * echoServiceShouldGeneratePartialPublicClient - * .chatAgainShouldGenerateAsPublicCallable() + * echoServiceShouldGeneratePartialUsualClient + * .chatAgainShouldGenerateAsUsualCallable() * .call(); * EchoRequest request = * EchoRequest.newBuilder() @@ -416,8 +416,8 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * } */ public final BidiStreamingCallable - chatAgainShouldGenerateAsPublicCallable() { - return stub.chatAgainShouldGenerateAsPublicCallable(); + chatAgainShouldGenerateAsUsualCallable() { + return stub.chatAgainShouldGenerateAsUsualCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -430,10 +430,10 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(); + * echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(); * } * } * @@ -457,11 +457,11 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]"); * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name); + * echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(name); * } * } * @@ -486,11 +486,11 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString(); * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name); + * echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(name); * } * } * @@ -514,8 +514,8 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoRequest request = * EchoRequest.newBuilder() * .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -523,7 +523,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * .setFoobar(Foobar.newBuilder().build()) * .build(); * EchoResponse response = - * echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(request); + * echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(request); * } * } * @@ -546,8 +546,8 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * EchoRequest request = * EchoRequest.newBuilder() * .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -555,7 +555,7 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * .setFoobar(Foobar.newBuilder().build()) * .build(); * ApiFuture future = - * echoServiceShouldGeneratePartialPublicClient + * echoServiceShouldGeneratePartialUsualClient * .chatShouldGenerateAsInternalCallable() * .futureCall(request); * // Do something. @@ -580,12 +580,10 @@ public class EchoServiceShouldGeneratePartialPublicClient implements BackgroundR * // - 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 - * try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - * EchoServiceShouldGeneratePartialPublicClient.create()) { + * try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + * EchoServiceShouldGeneratePartialUsualClient.create()) { * BidiStream bidiStream = - * echoServiceShouldGeneratePartialPublicClient - * .echoShouldGenerateAsInternalCallable() - * .call(); + * echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsInternalCallable().call(); * EchoRequest request = * EchoRequest.newBuilder() * .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden deleted file mode 100644 index 212e88a235..0000000000 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/SelectiveGapicStub.golden +++ /dev/null @@ -1,252 +0,0 @@ -package com.google.selective.generate.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.selective.generate.v1beta1.EchoRequest; -import com.google.selective.generate.v1beta1.EchoResponse; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the EchoServiceShouldGeneratePartialPublic service API. - * - *

    This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcEchoServiceShouldGeneratePartialPublicStub - extends EchoServiceShouldGeneratePartialPublicStub { - private static final MethodDescriptor - echoShouldGenerateAsPublicMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/EchoShouldGenerateAsPublic") - .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - chatShouldGenerateAsPublicMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/ChatShouldGenerateAsPublic") - .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - chatAgainShouldGenerateAsPublicMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/ChatAgainShouldGenerateAsPublic") - .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - chatShouldGenerateAsInternalMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/ChatShouldGenerateAsInternal") - .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - echoShouldGenerateAsInternalMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic/EchoShouldGenerateAsInternal") - .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable echoShouldGenerateAsPublicCallable; - private final BidiStreamingCallable chatShouldGenerateAsPublicCallable; - private final BidiStreamingCallable - chatAgainShouldGenerateAsPublicCallable; - private final UnaryCallable chatShouldGenerateAsInternalCallable; - private final BidiStreamingCallable - echoShouldGenerateAsInternalCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcEchoServiceShouldGeneratePartialPublicStub create( - EchoServiceShouldGeneratePartialPublicStubSettings settings) throws IOException { - return new GrpcEchoServiceShouldGeneratePartialPublicStub( - settings, ClientContext.create(settings)); - } - - public static final GrpcEchoServiceShouldGeneratePartialPublicStub create( - ClientContext clientContext) throws IOException { - return new GrpcEchoServiceShouldGeneratePartialPublicStub( - EchoServiceShouldGeneratePartialPublicStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcEchoServiceShouldGeneratePartialPublicStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcEchoServiceShouldGeneratePartialPublicStub( - EchoServiceShouldGeneratePartialPublicStubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcEchoServiceShouldGeneratePartialPublicStub, using the given - * settings. This is protected so that it is easy to make a subclass, but otherwise, the static - * factory methods should be preferred. - */ - protected GrpcEchoServiceShouldGeneratePartialPublicStub( - EchoServiceShouldGeneratePartialPublicStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcEchoServiceShouldGeneratePartialPublicCallableFactory()); - } - - /** - * Constructs an instance of GrpcEchoServiceShouldGeneratePartialPublicStub, using the given - * settings. This is protected so that it is easy to make a subclass, but otherwise, the static - * factory methods should be preferred. - */ - protected GrpcEchoServiceShouldGeneratePartialPublicStub( - EchoServiceShouldGeneratePartialPublicStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings echoShouldGenerateAsPublicTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(echoShouldGenerateAsPublicMethodDescriptor) - .build(); - GrpcCallSettings chatShouldGenerateAsPublicTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(chatShouldGenerateAsPublicMethodDescriptor) - .build(); - GrpcCallSettings chatAgainShouldGenerateAsPublicTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(chatAgainShouldGenerateAsPublicMethodDescriptor) - .build(); - GrpcCallSettings chatShouldGenerateAsInternalTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(chatShouldGenerateAsInternalMethodDescriptor) - .build(); - GrpcCallSettings echoShouldGenerateAsInternalTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(echoShouldGenerateAsInternalMethodDescriptor) - .build(); - - this.echoShouldGenerateAsPublicCallable = - callableFactory.createUnaryCallable( - echoShouldGenerateAsPublicTransportSettings, - settings.echoShouldGenerateAsPublicSettings(), - clientContext); - this.chatShouldGenerateAsPublicCallable = - callableFactory.createBidiStreamingCallable( - chatShouldGenerateAsPublicTransportSettings, - settings.chatShouldGenerateAsPublicSettings(), - clientContext); - this.chatAgainShouldGenerateAsPublicCallable = - callableFactory.createBidiStreamingCallable( - chatAgainShouldGenerateAsPublicTransportSettings, - settings.chatAgainShouldGenerateAsPublicSettings(), - clientContext); - this.chatShouldGenerateAsInternalCallable = - callableFactory.createUnaryCallable( - chatShouldGenerateAsInternalTransportSettings, - settings.chatShouldGenerateAsInternalSettings(), - clientContext); - this.echoShouldGenerateAsInternalCallable = - callableFactory.createBidiStreamingCallable( - echoShouldGenerateAsInternalTransportSettings, - settings.echoShouldGenerateAsInternalSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable echoShouldGenerateAsPublicCallable() { - return echoShouldGenerateAsPublicCallable; - } - - @Override - public BidiStreamingCallable chatShouldGenerateAsPublicCallable() { - return chatShouldGenerateAsPublicCallable; - } - - @Override - public BidiStreamingCallable - chatAgainShouldGenerateAsPublicCallable() { - return chatAgainShouldGenerateAsPublicCallable; - } - - @Override - public UnaryCallable chatShouldGenerateAsInternalCallable() { - return chatShouldGenerateAsInternalCallable; - } - - @Override - public BidiStreamingCallable echoShouldGenerateAsInternalCallable() { - return echoShouldGenerateAsInternalCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsUsual.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsUsual.golden new file mode 100644 index 0000000000..e745bdb237 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsUsual.golden @@ -0,0 +1,58 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatAgainShouldGenerateAsUsual_async] +import com.google.api.gax.rpc.BidiStream; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncChatAgainShouldGenerateAsUsual { + + public static void main(String[] args) throws Exception { + asyncChatAgainShouldGenerateAsUsual(); + } + + public static void asyncChatAgainShouldGenerateAsUsual() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + BidiStream bidiStream = + echoServiceShouldGeneratePartialUsualClient + .chatAgainShouldGenerateAsUsualCallable() + .call(); + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + bidiStream.send(request); + for (EchoResponse response : bidiStream) { + // Do something when a response is received. + } + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatAgainShouldGenerateAsUsual_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden index f0af16cf3e..dca5a1b9f4 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsInternal.golden @@ -16,11 +16,11 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_async] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_async] import com.google.api.core.ApiFuture; import com.google.selective.generate.v1beta1.EchoRequest; import com.google.selective.generate.v1beta1.EchoResponse; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; import com.google.selective.generate.v1beta1.Foobar; import com.google.selective.generate.v1beta1.FoobarName; @@ -36,8 +36,8 @@ public class AsyncChatShouldGenerateAsInternal { // - 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 - try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create()) { + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { EchoRequest request = EchoRequest.newBuilder() .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -45,7 +45,7 @@ public class AsyncChatShouldGenerateAsInternal { .setFoobar(Foobar.newBuilder().build()) .build(); ApiFuture future = - echoServiceShouldGeneratePartialPublicClient + echoServiceShouldGeneratePartialUsualClient .chatShouldGenerateAsInternalCallable() .futureCall(request); // Do something. @@ -53,4 +53,4 @@ public class AsyncChatShouldGenerateAsInternal { } } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_async] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsUsual.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsUsual.golden new file mode 100644 index 0000000000..0cbc13407c --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncChatShouldGenerateAsUsual.golden @@ -0,0 +1,56 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsUsual_async] +import com.google.api.gax.rpc.BidiStream; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncChatShouldGenerateAsUsual { + + public static void main(String[] args) throws Exception { + asyncChatShouldGenerateAsUsual(); + } + + public static void asyncChatShouldGenerateAsUsual() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + BidiStream bidiStream = + echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsUsualCallable().call(); + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + bidiStream.send(request); + for (EchoResponse response : bidiStream) { + // Do something when a response is received. + } + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsUsual_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden index f1df00cdf6..64d8dd2a4c 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsInternal.golden @@ -16,11 +16,11 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsInternal_async] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsInternal_async] import com.google.api.gax.rpc.BidiStream; import com.google.selective.generate.v1beta1.EchoRequest; import com.google.selective.generate.v1beta1.EchoResponse; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; import com.google.selective.generate.v1beta1.Foobar; import com.google.selective.generate.v1beta1.FoobarName; @@ -36,12 +36,10 @@ public class AsyncEchoShouldGenerateAsInternal { // - 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 - try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create()) { + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { BidiStream bidiStream = - echoServiceShouldGeneratePartialPublicClient - .echoShouldGenerateAsInternalCallable() - .call(); + echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsInternalCallable().call(); EchoRequest request = EchoRequest.newBuilder() .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -55,4 +53,4 @@ public class AsyncEchoShouldGenerateAsInternal { } } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_EchoShouldGenerateAsInternal_async] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsInternal_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsUsual.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsUsual.golden new file mode 100644 index 0000000000..ec63a3c587 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/AsyncEchoShouldGenerateAsUsual.golden @@ -0,0 +1,56 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_async] +import com.google.api.core.ApiFuture; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class AsyncEchoShouldGenerateAsUsual { + + public static void main(String[] args) throws Exception { + asyncEchoShouldGenerateAsUsual(); + } + + public static void asyncEchoShouldGenerateAsUsual() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + ApiFuture future = + echoServiceShouldGeneratePartialUsualClient + .echoShouldGenerateAsUsualCallable() + .futureCall(request); + // Do something. + EchoResponse response = future.get(); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_async] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden index ad4d798f2a..18017ebfc3 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternal.golden @@ -16,10 +16,10 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_sync] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_sync] import com.google.selective.generate.v1beta1.EchoRequest; import com.google.selective.generate.v1beta1.EchoResponse; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; import com.google.selective.generate.v1beta1.Foobar; import com.google.selective.generate.v1beta1.FoobarName; @@ -35,8 +35,8 @@ public class SyncChatShouldGenerateAsInternal { // - 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 - try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create()) { + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { EchoRequest request = EchoRequest.newBuilder() .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) @@ -44,8 +44,8 @@ public class SyncChatShouldGenerateAsInternal { .setFoobar(Foobar.newBuilder().build()) .build(); EchoResponse response = - echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(request); + echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(request); } } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_sync] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden index d671ec95f6..f217b8f4ef 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalFoobarname.golden @@ -16,9 +16,9 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Foobarname_sync] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_Foobarname_sync] import com.google.selective.generate.v1beta1.EchoResponse; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; import com.google.selective.generate.v1beta1.FoobarName; public class SyncChatShouldGenerateAsInternalFoobarname { @@ -33,12 +33,12 @@ public class SyncChatShouldGenerateAsInternalFoobarname { // - 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 - try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create()) { + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]"); EchoResponse response = - echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name); + echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(name); } } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Foobarname_sync] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_Foobarname_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden index eb0962779c..9b3c95e017 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalNoargs.golden @@ -16,9 +16,9 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Noargs_sync] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_Noargs_sync] import com.google.selective.generate.v1beta1.EchoResponse; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; public class SyncChatShouldGenerateAsInternalNoargs { @@ -32,11 +32,11 @@ public class SyncChatShouldGenerateAsInternalNoargs { // - 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 - try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create()) { + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { EchoResponse response = - echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(); + echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(); } } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_Noargs_sync] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_Noargs_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden index 6307bfe9dd..1a0216d16d 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncChatShouldGenerateAsInternalString.golden @@ -16,9 +16,9 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_String_sync] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_String_sync] import com.google.selective.generate.v1beta1.EchoResponse; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; import com.google.selective.generate.v1beta1.FoobarName; public class SyncChatShouldGenerateAsInternalString { @@ -33,12 +33,12 @@ public class SyncChatShouldGenerateAsInternalString { // - 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 - try (EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create()) { + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString(); EchoResponse response = - echoServiceShouldGeneratePartialPublicClient.chatShouldGenerateAsInternal(name); + echoServiceShouldGeneratePartialUsualClient.chatShouldGenerateAsInternal(name); } } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_ChatShouldGenerateAsInternal_String_sync] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_ChatShouldGenerateAsInternal_String_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden index 1bbbc37523..9ea2dc09f3 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetCredentialsProvider.golden @@ -16,10 +16,10 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetCredentialsProvider_sync] +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_Create_SetCredentialsProvider_sync] import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicSettings; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualSettings; import com.google.selective.generate.v1beta1.myCredentials; public class SyncCreateSetCredentialsProvider { @@ -34,13 +34,13 @@ public class SyncCreateSetCredentialsProvider { // - 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 - EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings = - EchoServiceShouldGeneratePartialPublicSettings.newBuilder() + EchoServiceShouldGeneratePartialUsualSettings echoServiceShouldGeneratePartialUsualSettings = + EchoServiceShouldGeneratePartialUsualSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) .build(); - EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create( - echoServiceShouldGeneratePartialPublicSettings); + EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create( + echoServiceShouldGeneratePartialUsualSettings); } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetCredentialsProvider_sync] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_Create_SetCredentialsProvider_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden index e7b3026d77..1b58cbe100 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncCreateSetEndpoint.golden @@ -16,9 +16,9 @@ package com.google.selective.generate.v1beta1.samples; -// [START goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetEndpoint_sync] -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicClient; -import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublicSettings; +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_Create_SetEndpoint_sync] +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualSettings; import com.google.selective.generate.v1beta1.myEndpoint; public class SyncCreateSetEndpoint { @@ -33,11 +33,11 @@ public class SyncCreateSetEndpoint { // - 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 - EchoServiceShouldGeneratePartialPublicSettings echoServiceShouldGeneratePartialPublicSettings = - EchoServiceShouldGeneratePartialPublicSettings.newBuilder().setEndpoint(myEndpoint).build(); - EchoServiceShouldGeneratePartialPublicClient echoServiceShouldGeneratePartialPublicClient = - EchoServiceShouldGeneratePartialPublicClient.create( - echoServiceShouldGeneratePartialPublicSettings); + EchoServiceShouldGeneratePartialUsualSettings echoServiceShouldGeneratePartialUsualSettings = + EchoServiceShouldGeneratePartialUsualSettings.newBuilder().setEndpoint(myEndpoint).build(); + EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create( + echoServiceShouldGeneratePartialUsualSettings); } } -// [END goldensample_generated_EchoServiceShouldGeneratePartialPublic_Create_SetEndpoint_sync] +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_Create_SetEndpoint_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsual.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsual.golden new file mode 100644 index 0000000000..af978eee1e --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsual.golden @@ -0,0 +1,51 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_sync] +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.Foobar; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncEchoShouldGenerateAsUsual { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsUsual(); + } + + public static void syncEchoShouldGenerateAsUsual() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + EchoRequest request = + EchoRequest.newBuilder() + .setName(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setParent(FoobarName.of("[PROJECT]", "[FOOBAR]").toString()) + .setFoobar(Foobar.newBuilder().build()) + .build(); + EchoResponse response = + echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(request); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualFoobarname.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualFoobarname.golden new file mode 100644 index 0000000000..c2e469912a --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualFoobarname.golden @@ -0,0 +1,44 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_Foobarname_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncEchoShouldGenerateAsUsualFoobarname { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsUsualFoobarname(); + } + + public static void syncEchoShouldGenerateAsUsualFoobarname() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + FoobarName name = FoobarName.of("[PROJECT]", "[FOOBAR]"); + EchoResponse response = + echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(name); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_Foobarname_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualNoargs.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualNoargs.golden new file mode 100644 index 0000000000..b080af1eb4 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualNoargs.golden @@ -0,0 +1,42 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_Noargs_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; + +public class SyncEchoShouldGenerateAsUsualNoargs { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsUsualNoargs(); + } + + public static void syncEchoShouldGenerateAsUsualNoargs() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + EchoResponse response = + echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_Noargs_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualString.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualString.golden new file mode 100644 index 0000000000..e4142b60d3 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/echoserviceselectivegapicclient/SyncEchoShouldGenerateAsUsualString.golden @@ -0,0 +1,44 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_String_sync] +import com.google.selective.generate.v1beta1.EchoResponse; +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualClient; +import com.google.selective.generate.v1beta1.FoobarName; + +public class SyncEchoShouldGenerateAsUsualString { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsUsualString(); + } + + public static void syncEchoShouldGenerateAsUsualString() 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 + try (EchoServiceShouldGeneratePartialUsualClient echoServiceShouldGeneratePartialUsualClient = + EchoServiceShouldGeneratePartialUsualClient.create()) { + String name = FoobarName.of("[PROJECT]", "[FOOBAR]").toString(); + EchoResponse response = + echoServiceShouldGeneratePartialUsualClient.echoShouldGenerateAsUsual(name); + } + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsual_EchoShouldGenerateAsUsual_String_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java index 6994401b44..48a7e4175e 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposerTest.java @@ -321,20 +321,20 @@ void composeClassHeaderSample_firstMethodIsInternal() { .build(); Method publicMethod = Method.builder() - .setName("ChatShouldGenerateAsPublic") + .setName("ChatShouldGenerateAsUsual") .setInputType(inputType) .setOutputType(outputType) .setIsInternalApi(false) .build(); Service service = Service.builder() - .setName("EchoServiceShouldGeneratePartialPublic") + .setName("EchoServiceShouldGeneratePartialUsual") .setDefaultHost("localhost:7469") .setOauthScopes(Arrays.asList("https://www.googleapis.com/auth/cloud-platform")) .setPakkage(SELECTIVE_API_PACKAGE_NAME) .setProtoPakkage(SELECTIVE_API_PACKAGE_NAME) .setOriginalJavaPackage(SELECTIVE_API_PACKAGE_NAME) - .setOverriddenName("EchoServiceShouldGeneratePartialPublic") + .setOverriddenName("EchoServiceShouldGeneratePartialUsual") .setMethods(Arrays.asList(internalMethod, publicMethod)) .build(); TypeNode clientType = @@ -358,7 +358,7 @@ void composeClassHeaderSample_firstMethodIsInternal() { + " FoobarbazName.ofProjectFoobarbazName(\"[PROJECT]\", \"[FOOBARBAZ]\").toString())\n" + " .setFoobar(Foobar.newBuilder().build())\n" + " .build();\n" - + " EchoResponse response = echoServiceSelectiveApiClient.chatShouldGenerateAsPublic(request);\n" + + " EchoResponse response = echoServiceSelectiveApiClient.chatShouldGenerateAsUsual(request);\n" + "}"); Assert.assertEquals(results, expected); } @@ -398,13 +398,13 @@ void composeClassHeaderSample_allMethodsAreInternal() { .build(); Service service = Service.builder() - .setName("EchoServiceShouldGeneratePartialPublic") + .setName("EchoServiceShouldGeneratePartialUsual") .setDefaultHost("localhost:7469") .setOauthScopes(Arrays.asList("https://www.googleapis.com/auth/cloud-platform")) .setPakkage(SELECTIVE_API_PACKAGE_NAME) .setProtoPakkage(SELECTIVE_API_PACKAGE_NAME) .setOriginalJavaPackage(SELECTIVE_API_PACKAGE_NAME) - .setOverriddenName("EchoServiceShouldGeneratePartialPublic") + .setOverriddenName("EchoServiceShouldGeneratePartialUsual") .setMethods(Arrays.asList(internalMethod1, internalMethod2)) .build(); TypeNode clientType = diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java index 80bff7c6e3..5829acac73 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java @@ -757,7 +757,7 @@ void selectiveGenerationTest_shouldGenerateOnlySelectiveMethodsWithGenerateOmitt Parser.parseService( fileDescriptor, messageTypes, resourceNames, serviceYamlOpt, new HashSet<>()); assertEquals(1, services.size()); - assertEquals("EchoServiceShouldGeneratePartialPublic", services.get(0).overriddenName()); + assertEquals("EchoServiceShouldGeneratePartialUsual", services.get(0).overriddenName()); assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { assertTrue(method.name().contains("ShouldGenerate")); @@ -786,17 +786,17 @@ void selectiveGenerationTest_shouldGenerateOmittedAsInternalWithGenerateOmittedT assertEquals(3, services.size()); // Tests a service with public methods only. - assertEquals("EchoServiceShouldGenerateAllPublic", services.get(0).overriddenName()); + assertEquals("EchoServiceShouldGenerateAllAsUsual", services.get(0).overriddenName()); assertEquals(3, services.get(0).methods().size()); for (Method method : services.get(0).methods()) { assertFalse(method.isInternalApi()); } // Tests a service with partial public methods and partial internal methods. - assertEquals("EchoServiceShouldGeneratePartialPublic", services.get(1).overriddenName()); + assertEquals("EchoServiceShouldGeneratePartialUsual", services.get(1).overriddenName()); assertEquals(5, services.get(1).methods().size()); for (Method method : services.get(1).methods()) { - if (method.name().contains("ShouldGenerateAsPublic")) { + if (method.name().contains("ShouldGenerateAsUsual")) { assertFalse(method.isInternalApi()); } else { assertTrue(method.isInternalApi()); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java b/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java index 8983b43c65..1030e8231e 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/test/protoloader/TestProtoLoader.java @@ -368,7 +368,7 @@ public GapicContext parseSelectiveGenerationTesting() { ServiceDescriptor selectiveGenerationServiceDescriptor = selectiveGenerationFileDescriptor.getServices().get(1); assertEquals( - "EchoServiceShouldGeneratePartialPublic", selectiveGenerationServiceDescriptor.getName()); + "EchoServiceShouldGeneratePartialUsual", selectiveGenerationServiceDescriptor.getName()); String serviceYamlFilename = "selective_api_generation_generate_omitted_v1beta1.yaml"; Path serviceYamlPath = Paths.get(testFilesDirectory, serviceYamlFilename); diff --git a/gapic-generator-java/src/test/proto/selective_api_generation.proto b/gapic-generator-java/src/test/proto/selective_api_generation.proto index c396a16dc7..e75ee58134 100644 --- a/gapic-generator-java/src/test/proto/selective_api_generation.proto +++ b/gapic-generator-java/src/test/proto/selective_api_generation.proto @@ -44,10 +44,10 @@ option (google.api.resource_definition) = { // This proto should be tested side-by-side with yaml files: // - selective_api_generation_v1beta1.yaml or - selective_api_generation_generate_omitted_v1beta1.yaml -service EchoServiceShouldGenerateAllPublic { +service EchoServiceShouldGenerateAllAsUsual { option (google.api.default_host) = "localhost:7469"; - rpc EchoShouldGenerateAsPublic(EchoRequest) returns (EchoResponse) { + rpc EchoShouldGenerateAsUsual(EchoRequest) returns (EchoResponse) { option (google.api.http) = { post: "/v1beta1/echo:echo" body: "*" @@ -56,17 +56,17 @@ service EchoServiceShouldGenerateAllPublic { option (google.api.method_signature) = ""; } - rpc ChatShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse); + rpc ChatShouldGenerateAsUsual(stream EchoRequest) returns (stream EchoResponse); - rpc ChatAgainShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse) { + rpc ChatAgainShouldGenerateAsUsual(stream EchoRequest) returns (stream EchoResponse) { option (google.api.method_signature) = "content"; } } -service EchoServiceShouldGeneratePartialPublic { +service EchoServiceShouldGeneratePartialUsual { option (google.api.default_host) = "localhost:7469"; - rpc EchoShouldGenerateAsPublic(EchoRequest) returns (EchoResponse) { + rpc EchoShouldGenerateAsUsual(EchoRequest) returns (EchoResponse) { option (google.api.http) = { post: "/v1beta1/echo:echo" body: "*" @@ -75,9 +75,9 @@ service EchoServiceShouldGeneratePartialPublic { option (google.api.method_signature) = ""; } - rpc ChatShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse); + rpc ChatShouldGenerateAsUsual(stream EchoRequest) returns (stream EchoResponse); - rpc ChatAgainShouldGenerateAsPublic(stream EchoRequest) returns (stream EchoResponse) { + rpc ChatAgainShouldGenerateAsUsual(stream EchoRequest) returns (stream EchoResponse) { option (google.api.method_signature) = "content"; } diff --git a/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml b/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml index 342617305a..74669ff7b6 100644 --- a/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml +++ b/gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml @@ -11,12 +11,12 @@ publishing: common: selective_gapic_generation: methods: - - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllPublic.EchoShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllPublic.ChatShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllPublic.ChatAgainShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.EchoShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatAgainShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllAsUsual.EchoShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllAsUsual.ChatShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGenerateAllAsUsual.ChatAgainShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.EchoShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.ChatShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.ChatAgainShouldGenerateAsUsual generate_omitted_as_internal: true reference_docs_uri: www.abc.net destinations: diff --git a/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml b/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml index b4703ae580..cd99776e80 100644 --- a/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml +++ b/gapic-generator-java/src/test/resources/selective_api_generation_v1beta1.yaml @@ -11,9 +11,9 @@ publishing: common: selective_gapic_generation: methods: - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.EchoShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatShouldGenerateAsPublic - - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialPublic.ChatAgainShouldGenerateAsPublic + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.EchoShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.ChatShouldGenerateAsUsual + - google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.ChatAgainShouldGenerateAsUsual generate_omitted_as_internal: false reference_docs_uri: www.abc.net destinations: From a87d3b0faf15ea767c0080df5cbea673b9aa0ab0 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:33:18 -0700 Subject: [PATCH 12/21] Fix linter. --- .../composer/comment/SettingsCommentComposer.java | 3 ++- .../common/AbstractServiceClientClassComposer.java | 7 +++---- .../common/AbstractServiceSettingsClassComposer.java | 9 ++++++--- .../AbstractServiceStubSettingsClassComposer.java | 4 +++- .../google/api/generator/gapic/protoparser/Parser.java | 10 ++++------ 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java index 3cb208b7d4..438cd9b274 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java @@ -103,7 +103,8 @@ public class SettingsCommentComposer { public SettingsCommentComposer(String transportPrefix) { this.newTransportBuilderMethodComment = - toCommentStatement(String.format("Returns a new %s builder for this class.", transportPrefix)); + toCommentStatement( + String.format("Returns a new %s builder for this class.", transportPrefix)); this.transportProviderBuilderMethodComment = toCommentStatement( String.format( diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index 1c328b12cb..59f3066fc2 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -130,8 +130,7 @@ protected TransportContext getTransportContext() { return transportContext; } - private static List addMethodAnnotations(Method method, TypeStore typeStore) - { + private static List addMethodAnnotations(Method method, TypeStore typeStore) { List annotations = new ArrayList<>(); if (method.isDeprecated()) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); @@ -820,7 +819,8 @@ private static List createMethodVariants( methodVariantBuilder.setReturnType(methodOutputType).setReturnExpr(rpcInvocationExpr); } - methodVariantBuilder = methodVariantBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); + methodVariantBuilder = + methodVariantBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); methodVariantBuilder = methodVariantBuilder.setBody(statements); javaMethods.add(methodVariantBuilder.build()); } @@ -898,7 +898,6 @@ private static MethodDefinition createMethodDefaultMethod( .setName(String.format(method.hasLro() ? "%sAsync" : "%s", methodName)) .setArguments(Arrays.asList(requestArgVarExpr)); - if (isProtoEmptyType(methodOutputType)) { methodBuilder = methodBuilder diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index 98d12dda5f..28c07ac092 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -283,10 +283,13 @@ private static List createSettingsGetterMethods( methodMakerFn.apply(getCallSettingsType(protoMethod, typeStore), javaMethodName); javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaMethodName)); if (protoMethod.hasLro()) { - String javaOperationSettingsMethodName = String.format("%sOperationSettings", javaStyleName); + String javaOperationSettingsMethodName = + String.format("%sOperationSettings", javaStyleName); methodBuilder = - methodMakerFn.apply(getOperationCallSettingsType(protoMethod), javaOperationSettingsMethodName); - javaMethods.add(methodBuilderHelper(protoMethod, methodBuilder, javaOperationSettingsMethodName)); + methodMakerFn.apply( + getOperationCallSettingsType(protoMethod), javaOperationSettingsMethodName); + javaMethods.add( + methodBuilderHelper(protoMethod, methodBuilder, javaOperationSettingsMethodName)); } } return javaMethods; diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 0e4138c2f6..4195336eae 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -1016,7 +1016,8 @@ private List createClassMethods( return javaMethods; } - private static List createMethodAnnotation(boolean isDeprecated, boolean isInternal) { + private static List createMethodAnnotation( + boolean isDeprecated, boolean isInternal) { List annotations = new ArrayList<>(); if (isDeprecated) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); @@ -1028,6 +1029,7 @@ private static List createMethodAnnotation(boolean isDeprecated, } return annotations; } + private static List createMethodSettingsGetterMethods( Map methodSettingsMemberVarExprs, final Set deprecatedSettingVarNames, diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index 4afe42615c..d66a5f706e 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -477,14 +477,12 @@ static SelectiveGapicType getMethodSelectiveGapicType( // is in the allow list. // Otherwise, generate this method as INTERNAL or HIDDEN based on GenerateOmittedAsInternal // flag. - if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false || includeMethodsList.contains(method.getFullName())) { + if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false + || includeMethodsList.contains(method.getFullName())) { return SelectiveGapicType.PUBLIC; - } - else if (generateOmittedAsInternal) - { + } else if (generateOmittedAsInternal) { return SelectiveGapicType.INTERNAL; - } - else { + } else { return SelectiveGapicType.HIDDEN; } } From cbb7ce53f25cac104d8dc649b76b128812a44360 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:50:59 -0700 Subject: [PATCH 13/21] Add unit tests for stub, stub settings,service settings --- .../ServiceSettingsClassComposerTest.java | 17 +- .../grpc/ServiceStubClassComposerTest.java | 19 +- .../ServiceStubSettingsClassComposerTest.java | 26 +- ...EchoServiceSelectiveGapicClientStub.golden | 49 +++ ...erviceSelectiveGapicServiceSettings.golden | 260 ++++++++++++ ...hoServiceSelectiveGapicStubSettings.golden | 379 ++++++++++++++++++ .../SyncEchoShouldGenerateAsUsual.golden | 58 +++ .../stub/SyncEchoShouldGenerateAsUsual.golden | 59 +++ 8 files changed, 852 insertions(+), 15 deletions(-) create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/SyncEchoShouldGenerateAsUsual.golden create mode 100644 gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/stub/SyncEchoShouldGenerateAsUsual.golden diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceSettingsClassComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceSettingsClassComposerTest.java index 90e0df1a2a..da503cd09f 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceSettingsClassComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceSettingsClassComposerTest.java @@ -32,12 +32,20 @@ static Stream data() { "EchoSettings", TestProtoLoader.instance().parseShowcaseEcho(), "localhost:7469", - "v1beta1"), + "v1beta1", + 0), Arguments.of( "DeprecatedServiceSettings", TestProtoLoader.instance().parseDeprecatedService(), "localhost:7469", - "v1")); + "v1", + 0), + Arguments.of( + "EchoServiceSelectiveGapicServiceSettings", + TestProtoLoader.instance().parseSelectiveGenerationTesting(), + "localhost:7469", + "v1beta1", + 1)); } @ParameterizedTest @@ -46,8 +54,9 @@ void generateServiceSettingsClasses( String name, GapicContext context, String apiShortNameExpected, - String packageVersionExpected) { - Service service = context.services().get(0); + String packageVersionExpected, + int serviceIndex) { + Service service = context.services().get(serviceIndex); GapicClass clazz = ServiceSettingsClassComposer.instance().generate(context, service); Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden"); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubClassComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubClassComposerTest.java index 15317cab94..21d57f02b8 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubClassComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubClassComposerTest.java @@ -27,9 +27,19 @@ class ServiceStubClassComposerTest { static Stream data() { return Stream.of( - Arguments.of("EchoStub", TestProtoLoader.instance().parseShowcaseEcho(), "", ""), + Arguments.of("EchoStub", TestProtoLoader.instance().parseShowcaseEcho(), "", "", 0), Arguments.of( - "DeprecatedServiceStub", TestProtoLoader.instance().parseDeprecatedService(), "", "")); + "DeprecatedServiceStub", + TestProtoLoader.instance().parseDeprecatedService(), + "", + "", + 0), + Arguments.of( + "EchoServiceSelectiveGapicClientStub", + TestProtoLoader.instance().parseSelectiveGenerationTesting(), + "", + "", + 1)); } @ParameterizedTest @@ -38,8 +48,9 @@ void generateServiceStubClasses( String name, GapicContext context, String apiShortNameExpected, - String packageVersionExpected) { - Service service = context.services().get(0); + String packageVersionExpected, + int serviceIndex) { + Service service = context.services().get(serviceIndex); GapicClass clazz = ServiceStubClassComposer.instance().generate(context, service); Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden"); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubSettingsClassComposerTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubSettingsClassComposerTest.java index 203b9f3894..fb6c34d451 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubSettingsClassComposerTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/ServiceStubSettingsClassComposerTest.java @@ -31,27 +31,38 @@ static Stream data() { "LoggingServiceV2StubSettings", GrpcTestProtoLoader.instance().parseLogging(), "logging", - "v2"), + "v2", + 0), Arguments.of( "PublisherStubSettings", GrpcTestProtoLoader.instance().parsePubSubPublisher(), "pubsub", - "v1"), + "v1", + 0), Arguments.of( "EchoStubSettings", GrpcTestProtoLoader.instance().parseShowcaseEcho(), "localhost:7469", - "v1beta1"), + "v1beta1", + 0), Arguments.of( "DeprecatedServiceStubSettings", GrpcTestProtoLoader.instance().parseDeprecatedService(), "localhost:7469", - "v1"), + "v1", + 0), Arguments.of( "ApiVersionTestingStubSettings", GrpcTestProtoLoader.instance().parseApiVersionTesting(), "localhost:7469", - "v1")); + "v1", + 0), + Arguments.of( + "EchoServiceSelectiveGapicStubSettings", + GrpcTestProtoLoader.instance().parseSelectiveGenerationTesting(), + "localhost:7469", + "v1beta1", + 1)); } @ParameterizedTest @@ -60,8 +71,9 @@ void generateServiceStubSettingsClasses( String name, GapicContext context, String apiShortNameExpected, - String packageVersionExpected) { - Service service = context.services().get(0); + String packageVersionExpected, + int serviceIndex) { + Service service = context.services().get(serviceIndex); GapicClass clazz = ServiceStubSettingsClassComposer.instance().generate(context, service); Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden"); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden new file mode 100644 index 0000000000..bca98be9d2 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden @@ -0,0 +1,49 @@ +package com.google.selective.generate.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the EchoServiceShouldGeneratePartialUsual service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class EchoServiceShouldGeneratePartialUsualStub implements BackgroundResource { + + public UnaryCallable echoShouldGenerateAsUsualCallable() { + throw new UnsupportedOperationException("Not implemented: echoShouldGenerateAsUsualCallable()"); + } + + public BidiStreamingCallable chatShouldGenerateAsUsualCallable() { + throw new UnsupportedOperationException("Not implemented: chatShouldGenerateAsUsualCallable()"); + } + + public BidiStreamingCallable chatAgainShouldGenerateAsUsualCallable() { + throw new UnsupportedOperationException( + "Not implemented: chatAgainShouldGenerateAsUsualCallable()"); + } + + @InternalApi("Internal API. This API is not intended for public consumption.") + public UnaryCallable chatShouldGenerateAsInternalCallable() { + throw new UnsupportedOperationException( + "Not implemented: chatShouldGenerateAsInternalCallable()"); + } + + @InternalApi("Internal API. This API is not intended for public consumption.") + public BidiStreamingCallable echoShouldGenerateAsInternalCallable() { + throw new UnsupportedOperationException( + "Not implemented: echoShouldGenerateAsInternalCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden new file mode 100644 index 0000000000..e0d0b44ddc --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden @@ -0,0 +1,260 @@ +package com.google.selective.generate.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialUsualStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EchoServiceShouldGeneratePartialUsualClient}. + * + *

    The default instance has everything set to sensible defaults: + * + *

      + *
    • The default service address (localhost) and default port (7469) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of echoShouldGenerateAsUsual: + * + *

    {@code
    + * // 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
    + * EchoServiceShouldGeneratePartialUsualSettings.Builder
    + *     echoServiceShouldGeneratePartialUsualSettingsBuilder =
    + *         EchoServiceShouldGeneratePartialUsualSettings.newBuilder();
    + * echoServiceShouldGeneratePartialUsualSettingsBuilder
    + *     .echoShouldGenerateAsUsualSettings()
    + *     .setRetrySettings(
    + *         echoServiceShouldGeneratePartialUsualSettingsBuilder
    + *             .echoShouldGenerateAsUsualSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * EchoServiceShouldGeneratePartialUsualSettings echoServiceShouldGeneratePartialUsualSettings =
    + *     echoServiceShouldGeneratePartialUsualSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class EchoServiceShouldGeneratePartialUsualSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to echoShouldGenerateAsUsual. */ + public UnaryCallSettings echoShouldGenerateAsUsualSettings() { + return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) + .echoShouldGenerateAsUsualSettings(); + } + + /** Returns the object with the settings used for calls to chatShouldGenerateAsUsual. */ + public StreamingCallSettings chatShouldGenerateAsUsualSettings() { + return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) + .chatShouldGenerateAsUsualSettings(); + } + + /** Returns the object with the settings used for calls to chatAgainShouldGenerateAsUsual. */ + public StreamingCallSettings chatAgainShouldGenerateAsUsualSettings() { + return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) + .chatAgainShouldGenerateAsUsualSettings(); + } + + /** + * Returns the object with the settings used for calls to + * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use + * directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public UnaryCallSettings chatShouldGenerateAsInternalSettings() { + return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) + .chatShouldGenerateAsInternalSettings(); + } + + /** + * Returns the object with the settings used for calls to + * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use + * directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public StreamingCallSettings echoShouldGenerateAsInternalSettings() { + return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) + .echoShouldGenerateAsInternalSettings(); + } + + public static final EchoServiceShouldGeneratePartialUsualSettings create( + EchoServiceShouldGeneratePartialUsualStubSettings stub) throws IOException { + return new EchoServiceShouldGeneratePartialUsualSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EchoServiceShouldGeneratePartialUsualStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EchoServiceShouldGeneratePartialUsualStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EchoServiceShouldGeneratePartialUsualStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EchoServiceShouldGeneratePartialUsualStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EchoServiceShouldGeneratePartialUsualStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EchoServiceShouldGeneratePartialUsualStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EchoServiceShouldGeneratePartialUsualStubSettings + .defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EchoServiceShouldGeneratePartialUsualSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + } + + /** Builder for EchoServiceShouldGeneratePartialUsualSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(EchoServiceShouldGeneratePartialUsualStubSettings.newBuilder(clientContext)); + } + + protected Builder(EchoServiceShouldGeneratePartialUsualSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EchoServiceShouldGeneratePartialUsualStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(EchoServiceShouldGeneratePartialUsualStubSettings.newBuilder()); + } + + public EchoServiceShouldGeneratePartialUsualStubSettings.Builder getStubSettingsBuilder() { + return ((EchoServiceShouldGeneratePartialUsualStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to echoShouldGenerateAsUsual. */ + public UnaryCallSettings.Builder + echoShouldGenerateAsUsualSettings() { + return getStubSettingsBuilder().echoShouldGenerateAsUsualSettings(); + } + + /** Returns the builder for the settings used for calls to chatShouldGenerateAsUsual. */ + public StreamingCallSettings.Builder + chatShouldGenerateAsUsualSettings() { + return getStubSettingsBuilder().chatShouldGenerateAsUsualSettings(); + } + + /** Returns the builder for the settings used for calls to chatAgainShouldGenerateAsUsual. */ + public StreamingCallSettings.Builder + chatAgainShouldGenerateAsUsualSettings() { + return getStubSettingsBuilder().chatAgainShouldGenerateAsUsualSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not + * use directly. + */ + public UnaryCallSettings.Builder + chatShouldGenerateAsInternalSettings() { + return getStubSettingsBuilder().chatShouldGenerateAsInternalSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not + * use directly. + */ + public StreamingCallSettings.Builder + echoShouldGenerateAsInternalSettings() { + return getStubSettingsBuilder().echoShouldGenerateAsInternalSettings(); + } + + @Override + public EchoServiceShouldGeneratePartialUsualSettings build() throws IOException { + return new EchoServiceShouldGeneratePartialUsualSettings(this); + } + } +} diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden new file mode 100644 index 0000000000..38e903a408 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden @@ -0,0 +1,379 @@ +package com.google.selective.generate.v1beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.selective.generate.v1beta1.EchoRequest; +import com.google.selective.generate.v1beta1.EchoResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EchoServiceShouldGeneratePartialUsualStub}. + * + *

    The default instance has everything set to sensible defaults: + * + *

      + *
    • The default service address (localhost) and default port (7469) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of echoShouldGenerateAsUsual: + * + *

    {@code
    + * // 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
    + * EchoServiceShouldGeneratePartialUsualStubSettings.Builder
    + *     echoServiceShouldGeneratePartialUsualSettingsBuilder =
    + *         EchoServiceShouldGeneratePartialUsualStubSettings.newBuilder();
    + * echoServiceShouldGeneratePartialUsualSettingsBuilder
    + *     .echoShouldGenerateAsUsualSettings()
    + *     .setRetrySettings(
    + *         echoServiceShouldGeneratePartialUsualSettingsBuilder
    + *             .echoShouldGenerateAsUsualSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * EchoServiceShouldGeneratePartialUsualStubSettings
    + *     echoServiceShouldGeneratePartialUsualSettings =
    + *         echoServiceShouldGeneratePartialUsualSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class EchoServiceShouldGeneratePartialUsualStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().build(); + + private final UnaryCallSettings echoShouldGenerateAsUsualSettings; + private final StreamingCallSettings chatShouldGenerateAsUsualSettings; + private final StreamingCallSettings + chatAgainShouldGenerateAsUsualSettings; + private final UnaryCallSettings chatShouldGenerateAsInternalSettings; + private final StreamingCallSettings + echoShouldGenerateAsInternalSettings; + + /** Returns the object with the settings used for calls to echoShouldGenerateAsUsual. */ + public UnaryCallSettings echoShouldGenerateAsUsualSettings() { + return echoShouldGenerateAsUsualSettings; + } + + /** Returns the object with the settings used for calls to chatShouldGenerateAsUsual. */ + public StreamingCallSettings chatShouldGenerateAsUsualSettings() { + return chatShouldGenerateAsUsualSettings; + } + + /** Returns the object with the settings used for calls to chatAgainShouldGenerateAsUsual. */ + public StreamingCallSettings chatAgainShouldGenerateAsUsualSettings() { + return chatAgainShouldGenerateAsUsualSettings; + } + + /** + * Returns the object with the settings used for calls to + * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use + * directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public UnaryCallSettings chatShouldGenerateAsInternalSettings() { + return chatShouldGenerateAsInternalSettings; + } + + /** + * Returns the object with the settings used for calls to + * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use + * directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public StreamingCallSettings echoShouldGenerateAsInternalSettings() { + return echoShouldGenerateAsInternalSettings; + } + + public EchoServiceShouldGeneratePartialUsualStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEchoServiceShouldGeneratePartialUsualStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "localhost:7469"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "localhost:7469"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion( + EchoServiceShouldGeneratePartialUsualStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EchoServiceShouldGeneratePartialUsualStubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + echoShouldGenerateAsUsualSettings = settingsBuilder.echoShouldGenerateAsUsualSettings().build(); + chatShouldGenerateAsUsualSettings = settingsBuilder.chatShouldGenerateAsUsualSettings().build(); + chatAgainShouldGenerateAsUsualSettings = + settingsBuilder.chatAgainShouldGenerateAsUsualSettings().build(); + chatShouldGenerateAsInternalSettings = + settingsBuilder.chatShouldGenerateAsInternalSettings().build(); + echoShouldGenerateAsInternalSettings = + settingsBuilder.echoShouldGenerateAsInternalSettings().build(); + } + + /** Builder for EchoServiceShouldGeneratePartialUsualStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + echoShouldGenerateAsUsualSettings; + private final StreamingCallSettings.Builder + chatShouldGenerateAsUsualSettings; + private final StreamingCallSettings.Builder + chatAgainShouldGenerateAsUsualSettings; + private final UnaryCallSettings.Builder + chatShouldGenerateAsInternalSettings; + private final StreamingCallSettings.Builder + echoShouldGenerateAsInternalSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + echoShouldGenerateAsUsualSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + chatShouldGenerateAsUsualSettings = StreamingCallSettings.newBuilder(); + chatAgainShouldGenerateAsUsualSettings = StreamingCallSettings.newBuilder(); + chatShouldGenerateAsInternalSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + echoShouldGenerateAsInternalSettings = StreamingCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + echoShouldGenerateAsUsualSettings, chatShouldGenerateAsInternalSettings); + initDefaults(this); + } + + protected Builder(EchoServiceShouldGeneratePartialUsualStubSettings settings) { + super(settings); + + echoShouldGenerateAsUsualSettings = settings.echoShouldGenerateAsUsualSettings.toBuilder(); + chatShouldGenerateAsUsualSettings = settings.chatShouldGenerateAsUsualSettings.toBuilder(); + chatAgainShouldGenerateAsUsualSettings = + settings.chatAgainShouldGenerateAsUsualSettings.toBuilder(); + chatShouldGenerateAsInternalSettings = + settings.chatShouldGenerateAsInternalSettings.toBuilder(); + echoShouldGenerateAsInternalSettings = + settings.echoShouldGenerateAsInternalSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + echoShouldGenerateAsUsualSettings, chatShouldGenerateAsInternalSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .echoShouldGenerateAsUsualSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .chatShouldGenerateAsInternalSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to echoShouldGenerateAsUsual. */ + public UnaryCallSettings.Builder + echoShouldGenerateAsUsualSettings() { + return echoShouldGenerateAsUsualSettings; + } + + /** Returns the builder for the settings used for calls to chatShouldGenerateAsUsual. */ + public StreamingCallSettings.Builder + chatShouldGenerateAsUsualSettings() { + return chatShouldGenerateAsUsualSettings; + } + + /** Returns the builder for the settings used for calls to chatAgainShouldGenerateAsUsual. */ + public StreamingCallSettings.Builder + chatAgainShouldGenerateAsUsualSettings() { + return chatAgainShouldGenerateAsUsualSettings; + } + + /** + * Returns the builder for the settings used for calls to + * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not + * use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public UnaryCallSettings.Builder + chatShouldGenerateAsInternalSettings() { + return chatShouldGenerateAsInternalSettings; + } + + /** + * Returns the builder for the settings used for calls to + * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not + * use directly. + */ + @InternalApi("Internal API. This API is not intended for public consumption.") + public StreamingCallSettings.Builder + echoShouldGenerateAsInternalSettings() { + return echoShouldGenerateAsInternalSettings; + } + + @Override + public EchoServiceShouldGeneratePartialUsualStubSettings build() throws IOException { + return new EchoServiceShouldGeneratePartialUsualStubSettings(this); + } + } +} diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/SyncEchoShouldGenerateAsUsual.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/SyncEchoShouldGenerateAsUsual.golden new file mode 100644 index 0000000000..64beddd0cd --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/SyncEchoShouldGenerateAsUsual.golden @@ -0,0 +1,58 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsualSettings_EchoShouldGenerateAsUsual_sync] +import com.google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsualSettings; +import java.time.Duration; + +public class SyncEchoShouldGenerateAsUsual { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsUsual(); + } + + public static void syncEchoShouldGenerateAsUsual() 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 + EchoServiceShouldGeneratePartialUsualSettings.Builder + echoServiceShouldGeneratePartialUsualSettingsBuilder = + EchoServiceShouldGeneratePartialUsualSettings.newBuilder(); + echoServiceShouldGeneratePartialUsualSettingsBuilder + .echoShouldGenerateAsUsualSettings() + .setRetrySettings( + echoServiceShouldGeneratePartialUsualSettingsBuilder + .echoShouldGenerateAsUsualSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + EchoServiceShouldGeneratePartialUsualSettings echoServiceShouldGeneratePartialUsualSettings = + echoServiceShouldGeneratePartialUsualSettingsBuilder.build(); + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsualSettings_EchoShouldGenerateAsUsual_sync] diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/stub/SyncEchoShouldGenerateAsUsual.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/stub/SyncEchoShouldGenerateAsUsual.golden new file mode 100644 index 0000000000..8daf4e32c6 --- /dev/null +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/samples/servicesettings/stub/SyncEchoShouldGenerateAsUsual.golden @@ -0,0 +1,59 @@ +/* + * Copyright 2025 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.selective.generate.v1beta1.stub.samples; + +// [START goldensample_generated_EchoServiceShouldGeneratePartialUsualStubSettings_EchoShouldGenerateAsUsual_sync] +import com.google.selective.generate.v1beta1.stub.EchoServiceShouldGeneratePartialUsualStubSettings; +import java.time.Duration; + +public class SyncEchoShouldGenerateAsUsual { + + public static void main(String[] args) throws Exception { + syncEchoShouldGenerateAsUsual(); + } + + public static void syncEchoShouldGenerateAsUsual() 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 + EchoServiceShouldGeneratePartialUsualStubSettings.Builder + echoServiceShouldGeneratePartialUsualSettingsBuilder = + EchoServiceShouldGeneratePartialUsualStubSettings.newBuilder(); + echoServiceShouldGeneratePartialUsualSettingsBuilder + .echoShouldGenerateAsUsualSettings() + .setRetrySettings( + echoServiceShouldGeneratePartialUsualSettingsBuilder + .echoShouldGenerateAsUsualSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + EchoServiceShouldGeneratePartialUsualStubSettings + echoServiceShouldGeneratePartialUsualSettings = + echoServiceShouldGeneratePartialUsualSettingsBuilder.build(); + } +} +// [END goldensample_generated_EchoServiceShouldGeneratePartialUsualStubSettings_EchoShouldGenerateAsUsual_sync] From 6c301737751c6bbc7b681730a016be8d504c1911 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 15 Apr 2025 23:55:36 -0700 Subject: [PATCH 14/21] Fix Javadoc comment line break before @InternalApi comment --- .../generator/engine/ast/JavaDocComment.java | 3 +- .../engine/writer/JavaWriterVisitor.java | 9 +++++ .../AbstractServiceClientClassComposer.java | 8 ++-- .../AbstractServiceSettingsClassComposer.java | 39 +++++++++---------- .../EchoServiceSelectiveGapicClient.golden | 16 ++++---- ...erviceSelectiveGapicServiceSettings.golden | 18 +++++---- ...hoServiceSelectiveGapicStubSettings.golden | 16 ++++---- 7 files changed, 59 insertions(+), 50 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java index 07d43fb3dd..f1e48e3693 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java @@ -149,7 +149,8 @@ public boolean emptyComments() { } public JavaDocComment build() { - // @param, @throws, @return, and @deprecated should always get printed at the end. + // @param, @throws, @return, @deprecated and @InternalApi should always get printed at the + // end. componentsList.addAll(paramsList); if (!Strings.isNullOrEmpty(throwsType)) { componentsList.add( diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java index e956d86949..97010d4fcd 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java @@ -1020,6 +1020,15 @@ public void visit(ClassDefinition classDefinition) { if (!classDefinition.isNested()) { String formattedClazz = JavaFormatter.format(buffer.toString()); + // fixing @InternalApi comment after formatting + // formatter removes the line break before @InternalApi comment. + // See https://github.com/google/google-java-format/issues/1249 + // Ensures '@InternalApi' Javadoc comment has a line break and a standard '* ' prefix. + formattedClazz = + formattedClazz.replaceAll( + "(?s)(/\\*\\*.*?)(@InternalApi[^\r\n]*)(?:\\r?\\n\\h*\\*\\h+)((?!@|\\*/)[^\r\n]*)(.*?\\*/)", + "$1 \n * $2 $3$4"); + // fixing region tag after formatting // formatter splits long region tags on multiple lines and moves the end tag up - doesn't meet // tag requirements. See https://github.com/google/google-java-format/issues/137 diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index 59f3066fc2..58ad92e921 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -130,7 +130,7 @@ protected TransportContext getTransportContext() { return transportContext; } - private static List addMethodAnnotations(Method method, TypeStore typeStore) { + private static List createMethodAnnotations(Method method, TypeStore typeStore) { List annotations = new ArrayList<>(); if (method.isDeprecated()) { annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); @@ -820,7 +820,7 @@ private static List createMethodVariants( } methodVariantBuilder = - methodVariantBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); + methodVariantBuilder.setAnnotations(createMethodAnnotations(method, typeStore)); methodVariantBuilder = methodVariantBuilder.setBody(statements); javaMethods.add(methodVariantBuilder.build()); } @@ -908,7 +908,7 @@ private static MethodDefinition createMethodDefaultMethod( methodBuilder.setReturnExpr(callableMethodExpr).setReturnType(methodOutputType); } - methodBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); + methodBuilder.setAnnotations(createMethodAnnotations(method, typeStore)); return methodBuilder.build(); } @@ -1048,7 +1048,7 @@ private static MethodDefinition createCallableMethod( MethodDefinition.Builder methodDefBuilder = MethodDefinition.builder(); - methodDefBuilder = methodDefBuilder.setAnnotations(addMethodAnnotations(method, typeStore)); + methodDefBuilder = methodDefBuilder.setAnnotations(createMethodAnnotations(method, typeStore)); return methodDefBuilder .setHeaderCommentStatements( diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index 28c07ac092..1c4f575aeb 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -71,7 +71,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Optional; @@ -100,6 +99,21 @@ protected TransportContext getTransportContext() { return transportContext; } + private static List createMethodAnnotations(Method method) { + List annotations = new ArrayList<>(); + if (method.isDeprecated()) { + annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); + } + + if (method.isInternalApi()) { + annotations.add( + AnnotationNode.withTypeAndDescription( + FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); + } + + return annotations; + } + @Override public GapicClass generate(GapicContext context, Service service) { String pakkage = service.pakkage(); @@ -298,24 +312,13 @@ private static List createSettingsGetterMethods( // Add method header comment statements and annotations. private static MethodDefinition methodBuilderHelper( Method protoMethod, MethodDefinition.Builder methodBuilder, String javaMethodName) { - List annotations = new ArrayList<>(); - if (protoMethod.isDeprecated()) { - annotations.add(AnnotationNode.withType(TypeNode.DEPRECATED)); - } - - if (protoMethod.isInternalApi()) { - annotations.add( - AnnotationNode.withTypeAndDescription( - FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); - } - return methodBuilder .setHeaderCommentStatements( SettingsCommentComposer.createCallSettingsGetterComment( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), protoMethod.isInternalApi())) - .setAnnotations(annotations) + .setAnnotations(createMethodAnnotations(protoMethod)) .build(); } @@ -789,10 +792,7 @@ private static List createNestedBuilderSettingsGetterMethods( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), protoMethod.isInternalApi())) - .setAnnotations( - protoMethod.isDeprecated() - ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) - : Collections.emptyList()) + .setAnnotations(createMethodAnnotations(protoMethod)) .build()); if (protoMethod.hasLro()) { @@ -806,10 +806,7 @@ private static List createNestedBuilderSettingsGetterMethods( getMethodNameFromSettingsVarName(javaMethodName), protoMethod.isDeprecated(), protoMethod.isInternalApi())) - .setAnnotations( - protoMethod.isDeprecated() - ? Arrays.asList(AnnotationNode.withType(TypeNode.DEPRECATED)) - : Collections.emptyList()) + .setAnnotations(createMethodAnnotations(protoMethod)) .build()); } } diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index 3488d18479..43a905ab0f 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -438,8 +438,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method - * is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal() { @@ -466,8 +466,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method - * is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(FoobarName name) { @@ -495,8 +495,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method - * is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(String name) { @@ -528,8 +528,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method - * is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(EchoRequest request) { diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden index e0d0b44ddc..589348e907 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden @@ -95,8 +95,8 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the object with the settings used for calls to - * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use - * directly. + * chatShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -106,8 +106,8 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the object with the settings used for calls to - * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use - * directly. + * echoShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -234,9 +234,10 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the builder for the settings used for calls to - * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not - * use directly. + * chatShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ + @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings.Builder chatShouldGenerateAsInternalSettings() { return getStubSettingsBuilder().chatShouldGenerateAsInternalSettings(); @@ -244,9 +245,10 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the builder for the settings used for calls to - * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not - * use directly. + * echoShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ + @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings.Builder echoShouldGenerateAsInternalSettings() { return getStubSettingsBuilder().echoShouldGenerateAsInternalSettings(); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden index 38e903a408..fd3927bf4c 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden @@ -114,8 +114,8 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the object with the settings used for calls to - * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use - * directly. + * chatShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -124,8 +124,8 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the object with the settings used for calls to - * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not use - * directly. + * echoShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -351,8 +351,8 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the builder for the settings used for calls to - * chatShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not - * use directly. + * chatShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -362,8 +362,8 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the builder for the settings used for calls to - * echoShouldGenerateAsInternal. @InternalApi This method is internal used only. Please do not - * use directly. + * echoShouldGenerateAsInternal. + * @InternalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings.Builder From b481cc7e7429575e4dbd8769bf77d3329de4b200 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 16 Apr 2025 09:37:15 -0700 Subject: [PATCH 15/21] Change block tag to start with lowercase to resolve formatter issue. --- .../generator/engine/ast/JavaDocComment.java | 2 +- .../engine/writer/JavaWriterVisitor.java | 9 ------- .../engine/ast/JavaDocCommentTest.java | 4 ++-- .../EchoServiceSelectiveGapicClient.golden | 20 ++++++++-------- ...erviceSelectiveGapicServiceSettings.golden | 24 +++++++++---------- ...hoServiceSelectiveGapicStubSettings.golden | 24 +++++++++---------- 6 files changed, 37 insertions(+), 46 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java index f1e48e3693..7debb698c3 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java @@ -160,7 +160,7 @@ public JavaDocComment build() { componentsList.add(String.format("@deprecated %s", deprecated)); } if (!Strings.isNullOrEmpty(internalOnly)) { - componentsList.add(String.format("@InternalApi %s", internalOnly)); + componentsList.add(String.format("@internalApi %s", internalOnly)); } if (!Strings.isNullOrEmpty(returnDescription)) { componentsList.add(String.format("@return %s", returnDescription)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java index 97010d4fcd..e956d86949 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java @@ -1020,15 +1020,6 @@ public void visit(ClassDefinition classDefinition) { if (!classDefinition.isNested()) { String formattedClazz = JavaFormatter.format(buffer.toString()); - // fixing @InternalApi comment after formatting - // formatter removes the line break before @InternalApi comment. - // See https://github.com/google/google-java-format/issues/1249 - // Ensures '@InternalApi' Javadoc comment has a line break and a standard '* ' prefix. - formattedClazz = - formattedClazz.replaceAll( - "(?s)(/\\*\\*.*?)(@InternalApi[^\r\n]*)(?:\\r?\\n\\h*\\*\\h+)((?!@|\\*/)[^\r\n]*)(.*?\\*/)", - "$1 \n * $2 $3$4"); - // fixing region tag after formatting // formatter splits long region tags on multiple lines and moves the end tag up - doesn't meet // tag requirements. See https://github.com/google/google-java-format/issues/137 diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java index 6abd769cef..438bcd0800 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java @@ -219,7 +219,7 @@ void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { LineFormatter.lines( "@throws java.lang.RuntimeException if the remote call fails.\n", "@deprecated Use the {@link ShelfBookName} class instead.\n", - "@InternalApi This method is internal used only. Please do not use directly.\n", + "@internalApi This method is internal used only. Please do not use directly.\n", "@return This is the correct method return text."); assertEquals(expected, javaDocComment.comment()); } @@ -278,7 +278,7 @@ void createJavaDocComment_allComponents() { "@param shelf The shelf to create.\n", "@throws com.google.api.gax.rpc.ApiException if the remote call fails.\n", "@deprecated Use the {@link ArchivedBookName} class instead.\n", - "@InternalApi This method is internal used only. Please do not use directly.\n", + "@internalApi This method is internal used only. Please do not use directly.\n", "@return This is the method return text."); assertEquals(expected, javaDocComment.comment()); } diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index 43a905ab0f..ac7dce009a 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -438,8 +438,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @InternalApi This method is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal() { @@ -466,8 +466,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @InternalApi This method is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(FoobarName name) { @@ -495,8 +495,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param name - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @InternalApi This method is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(String name) { @@ -528,8 +528,8 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @InternalApi This method is internal used only. Please do not use directly. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(EchoRequest request) { @@ -563,7 +563,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - * @InternalApi This method is internal used only. Please do not use directly. + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final UnaryCallable chatShouldGenerateAsInternalCallable() { @@ -597,7 +597,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - * @InternalApi This method is internal used only. Please do not use directly. + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final BidiStreamingCallable diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden index 589348e907..e74e8d26f0 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden @@ -94,9 +94,9 @@ public class EchoServiceShouldGeneratePartialUsualSettings } /** - * Returns the object with the settings used for calls to - * chatShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the object with the settings used for calls to chatShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -105,9 +105,9 @@ public class EchoServiceShouldGeneratePartialUsualSettings } /** - * Returns the object with the settings used for calls to - * echoShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the object with the settings used for calls to echoShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -233,9 +233,9 @@ public class EchoServiceShouldGeneratePartialUsualSettings } /** - * Returns the builder for the settings used for calls to - * chatShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the builder for the settings used for calls to chatShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -244,9 +244,9 @@ public class EchoServiceShouldGeneratePartialUsualSettings } /** - * Returns the builder for the settings used for calls to - * echoShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the builder for the settings used for calls to echoShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings.Builder diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden index fd3927bf4c..ee04b0f4a4 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden @@ -113,9 +113,9 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings } /** - * Returns the object with the settings used for calls to - * chatShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the object with the settings used for calls to chatShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -123,9 +123,9 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings } /** - * Returns the object with the settings used for calls to - * echoShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the object with the settings used for calls to echoShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -350,9 +350,9 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings } /** - * Returns the builder for the settings used for calls to - * chatShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the builder for the settings used for calls to chatShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -361,9 +361,9 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings } /** - * Returns the builder for the settings used for calls to - * echoShouldGenerateAsInternal. - * @InternalApi This method is internal used only. Please do not use directly. + * Returns the builder for the settings used for calls to echoShouldGenerateAsInternal. + * + * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings.Builder From edafba14bd37ba299f5b2dc76a4e8ee100674112 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 16 Apr 2025 09:50:28 -0700 Subject: [PATCH 16/21] Fix comment to be lowercase @internalApi --- .../com/google/api/generator/engine/ast/JavaDocComment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java index 7debb698c3..7dc155d6b4 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java @@ -149,7 +149,7 @@ public boolean emptyComments() { } public JavaDocComment build() { - // @param, @throws, @return, @deprecated and @InternalApi should always get printed at the + // @param, @throws, @return, @deprecated and @internalApi should always get printed at the // end. componentsList.addAll(paramsList); if (!Strings.isNullOrEmpty(throwsType)) { From f4c9cf764c6911d11461a89d6c2cacb008e5d130 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:43:54 -0700 Subject: [PATCH 17/21] Change internalApi javadoc comment to be additional descriptive text. --- .../api/generator/engine/ast/JavaDocComment.java | 9 +++++---- .../generator/engine/ast/JavaDocCommentTest.java | 6 +++--- .../EchoServiceSelectiveGapicClient.golden | 16 ++++++++++------ ...hoServiceSelectiveGapicServiceSettings.golden | 8 ++++---- .../EchoServiceSelectiveGapicStubSettings.golden | 8 ++++---- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java index 7dc155d6b4..57c7a1accd 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java @@ -149,7 +149,11 @@ public boolean emptyComments() { } public JavaDocComment build() { - // @param, @throws, @return, @deprecated and @internalApi should always get printed at the + // Add additional descriptive text before block tags. + if (!Strings.isNullOrEmpty(internalOnly)) { + componentsList.add(String.format("

    Warning: %s", HtmlEscaper.process(internalOnly))); + } + // @param, @throws, @return and @deprecated should always get printed at the // end. componentsList.addAll(paramsList); if (!Strings.isNullOrEmpty(throwsType)) { @@ -159,9 +163,6 @@ public JavaDocComment build() { if (!Strings.isNullOrEmpty(deprecated)) { componentsList.add(String.format("@deprecated %s", deprecated)); } - if (!Strings.isNullOrEmpty(internalOnly)) { - componentsList.add(String.format("@internalApi %s", internalOnly)); - } if (!Strings.isNullOrEmpty(returnDescription)) { componentsList.add(String.format("@return %s", returnDescription)); } diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java index 438bcd0800..e74ab2c796 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java @@ -217,9 +217,9 @@ void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { .build(); String expected = LineFormatter.lines( + "

    Warning: This method is internal used only. Please do not use directly.\n", "@throws java.lang.RuntimeException if the remote call fails.\n", "@deprecated Use the {@link ShelfBookName} class instead.\n", - "@internalApi This method is internal used only. Please do not use directly.\n", "@return This is the correct method return text."); assertEquals(expected, javaDocComment.comment()); } @@ -228,7 +228,7 @@ void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { void createJavaDocComment_allComponents() { // No matter what order `setThrows`, `setDeprecated`, and `setReturn` are called, // They will be printed at the end. And `@param` should be grouped, - // they should always be printed right before `@throws`, `@deprecated`, `@InternalApi` and + // they should always be printed right before `@throws`, `@deprecated` and // `@return`. // All other add methods should keep the order of how they are added. String content = "this is a test comment"; @@ -274,11 +274,11 @@ void createJavaDocComment_allComponents() { "

  • A request object method.\n", "
  • A callable method.\n", "\n", + "

    Warning: This method is internal used only. Please do not use directly.\n", "@param shelfName The name of the shelf where books are published to.\n", "@param shelf The shelf to create.\n", "@throws com.google.api.gax.rpc.ApiException if the remote call fails.\n", "@deprecated Use the {@link ArchivedBookName} class instead.\n", - "@internalApi This method is internal used only. Please do not use directly.\n", "@return This is the method return text."); assertEquals(expected, javaDocComment.comment()); } diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index ac7dce009a..1c991d65d3 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -437,9 +437,10 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * + *

    Warning: This method is internal used only. Please do not use directly. + * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal() { @@ -465,9 +466,10 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * + *

    Warning: This method is internal used only. Please do not use directly. + * * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(FoobarName name) { @@ -494,9 +496,10 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * + *

    Warning: This method is internal used only. Please do not use directly. + * * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(String name) { @@ -527,9 +530,10 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * + *

    Warning: This method is internal used only. Please do not use directly. + * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @internalApi This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(EchoRequest request) { @@ -563,7 +567,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final UnaryCallable chatShouldGenerateAsInternalCallable() { @@ -597,7 +601,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public final BidiStreamingCallable diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden index e74e8d26f0..2d95348731 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden @@ -96,7 +96,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the object with the settings used for calls to chatShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -107,7 +107,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the object with the settings used for calls to echoShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -235,7 +235,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the builder for the settings used for calls to chatShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -246,7 +246,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the builder for the settings used for calls to echoShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings.Builder diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden index ee04b0f4a4..571809642c 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden @@ -115,7 +115,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the object with the settings used for calls to chatShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -125,7 +125,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the object with the settings used for calls to echoShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -352,7 +352,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the builder for the settings used for calls to chatShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -363,7 +363,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the builder for the settings used for calls to echoShouldGenerateAsInternal. * - * @internalApi This method is internal used only. Please do not use directly. + *

    Warning: This method is internal used only. Please do not use directly. */ @InternalApi("Internal API. This API is not intended for public consumption.") public StreamingCallSettings.Builder From 7c3aeaa157222af2296a1589642a060458f5fcf2 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 16 Apr 2025 20:46:33 -0700 Subject: [PATCH 18/21] Add common string and unit tests for parser. --- .../generator/engine/ast/JavaDocComment.java | 3 +- .../AbstractServiceClientClassComposer.java | 16 ++-- ...bstractServiceClientTestClassComposer.java | 8 +- .../AbstractServiceSettingsClassComposer.java | 21 ++--- .../AbstractServiceStubClassComposer.java | 10 +-- ...tractServiceStubSettingsClassComposer.java | 25 +++--- ...ractTransportServiceStubClassComposer.java | 7 +- .../generator/gapic/protoparser/Parser.java | 22 ++--- .../EchoServiceSelectiveGapicClient.golden | 12 +-- ...EchoServiceSelectiveGapicClientStub.golden | 4 +- ...erviceSelectiveGapicServiceSettings.golden | 8 +- ...hoServiceSelectiveGapicStubSettings.golden | 8 +- .../gapic/protoparser/ParserTest.java | 86 +++++++++++++++++++ 13 files changed, 155 insertions(+), 75 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java index 57c7a1accd..7184044598 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/engine/ast/JavaDocComment.java @@ -151,7 +151,8 @@ public boolean emptyComments() { public JavaDocComment build() { // Add additional descriptive text before block tags. if (!Strings.isNullOrEmpty(internalOnly)) { - componentsList.add(String.format("

    Warning: %s", HtmlEscaper.process(internalOnly))); + componentsList.add( + String.format("

    Warning: %s", HtmlEscaper.process(internalOnly))); } // @param, @throws, @return and @deprecated should always get printed at the // end. diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java index 58ad92e921..0bd67e1663 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java @@ -63,6 +63,7 @@ import com.google.api.generator.gapic.composer.samplecode.ServiceClientMethodSampleComposer; import com.google.api.generator.gapic.composer.store.TypeStore; import com.google.api.generator.gapic.composer.utils.ClassNames; +import com.google.api.generator.gapic.composer.utils.CommonStrings; import com.google.api.generator.gapic.composer.utils.PackageChecker; import com.google.api.generator.gapic.model.Field; import com.google.api.generator.gapic.model.GapicClass; @@ -104,12 +105,9 @@ import javax.annotation.Generated; public abstract class AbstractServiceClientClassComposer implements ClassComposer { - private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; private static final String CALLABLE_NAME_PATTERN = "%sCallable"; private static final String PAGED_CALLABLE_NAME_PATTERN = "%sPagedCallable"; private static final String OPERATION_CALLABLE_NAME_PATTERN = "%sOperationCallable"; - private static final String INTERNAL_API_WARNING = - "Internal API. This API is not intended for public consumption."; private static final Reference LIST_REFERENCE = ConcreteReference.withClazz(List.class); private static final Reference MAP_REFERENCE = ConcreteReference.withClazz(Map.class); @@ -139,7 +137,7 @@ private static List createMethodAnnotations(Method method, TypeS if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( - typeStore.get("InternalApi"), INTERNAL_API_WARNING)); + typeStore.get("InternalApi"), CommonStrings.INTERNAL_API_WARNING)); } return annotations; @@ -730,7 +728,8 @@ private static List createMethodVariants( TypeNode methodInputType = method.inputType(); TypeNode methodOutputType = method.isPaged() - ? typeStore.get(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) + ? typeStore.get( + String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) : method.outputType(); if (method.hasLro()) { LongrunningOperation lro = method.lro(); @@ -840,7 +839,8 @@ private static MethodDefinition createMethodDefaultMethod( TypeNode methodInputType = method.inputType(); TypeNode methodOutputType = method.isPaged() - ? typeStore.get(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) + ? typeStore.get( + String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) : method.outputType(); if (method.hasLro()) { LongrunningOperation lro = method.lro(); @@ -1834,7 +1834,7 @@ private static void createVaporTypes(Service service, TypeStore typeStore) { service.pakkage(), service.methods().stream() .filter(m -> m.isPaged()) - .map(m -> String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) + .map(m -> String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) .collect(Collectors.toList()), true, ClassNames.getServiceClientClassName(service)); @@ -1852,7 +1852,7 @@ private static List getGenericsForCallable( return Arrays.asList( method.inputType().reference(), typeStore - .get(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) + .get(String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) .reference()); } return Arrays.asList(method.inputType().reference(), method.outputType().reference()); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientTestClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientTestClassComposer.java index d4bf61034c..175d45bc41 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientTestClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceClientTestClassComposer.java @@ -47,6 +47,7 @@ import com.google.api.generator.gapic.composer.defaultvalue.DefaultValueComposer; import com.google.api.generator.gapic.composer.store.TypeStore; import com.google.api.generator.gapic.composer.utils.ClassNames; +import com.google.api.generator.gapic.composer.utils.CommonStrings; import com.google.api.generator.gapic.model.Field; import com.google.api.generator.gapic.model.GapicClass; import com.google.api.generator.gapic.model.GapicClass.Kind; @@ -87,7 +88,6 @@ public abstract class AbstractServiceClientTestClassComposer implements ClassCom protected static final String CLIENT_VAR_NAME = "client"; private static final String MOCK_SERVICE_VAR_NAME_PATTERN = "mock%s"; - private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; protected static final TypeStore FIXED_TYPESTORE = createStaticTypes(); protected static final AnnotationNode TEST_ANNOTATION = @@ -944,7 +944,7 @@ private void addDynamicTypes(GapicContext context, Service service, TypeStore ty service.pakkage(), service.methods().stream() .filter(m -> m.isPaged()) - .map(m -> String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) + .map(m -> String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) .collect(Collectors.toList()), true, ClassNames.getServiceClientClassName(service)); @@ -956,7 +956,7 @@ private void addDynamicTypes(GapicContext context, Service service, TypeStore ty } typeStore.put( service.pakkage(), - String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, mixinMethod.name()), + String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, mixinMethod.name()), true, ClassNames.getServiceClientClassName(service)); } @@ -995,7 +995,7 @@ protected static TypeNode getCallableType(Method protoMethod) { private static TypeNode getPagedResponseType(Method method, Service service) { return TypeNode.withReference( VaporReference.builder() - .setName(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) + .setName(String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) .setPakkage(service.pakkage()) .setEnclosingClassNames(ClassNames.getServiceClientClassName(service)) .setIsStaticImport(true) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java index 1c4f575aeb..e117097b10 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java @@ -56,6 +56,7 @@ import com.google.api.generator.gapic.composer.samplecode.SettingsSampleComposer; import com.google.api.generator.gapic.composer.store.TypeStore; import com.google.api.generator.gapic.composer.utils.ClassNames; +import com.google.api.generator.gapic.composer.utils.CommonStrings; import com.google.api.generator.gapic.composer.utils.PackageChecker; import com.google.api.generator.gapic.model.GapicClass; import com.google.api.generator.gapic.model.GapicClass.Kind; @@ -81,12 +82,7 @@ public abstract class AbstractServiceSettingsClassComposer implements ClassComposer { private static final String BUILDER_CLASS_NAME = "Builder"; - private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; - private static final String OPERATION_SETTINGS_LITERAL = "OperationSettings"; - private static final String SETTINGS_LITERAL = "Settings"; - private static final String INTERNAL_API_WARNING = - "Internal API. This API is not intended for public consumption."; protected static final TypeStore FIXED_TYPESTORE = createStaticTypes(); private final TransportContext transportContext; @@ -108,7 +104,7 @@ private static List createMethodAnnotations(Method method) { if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( - FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); + FIXED_TYPESTORE.get("InternalApi"), CommonStrings.INTERNAL_API_WARNING)); } return annotations; @@ -878,7 +874,7 @@ private static TypeStore createDynamicTypes(Service service) { service.pakkage(), service.methods().stream() .filter(m -> m.isPaged()) - .map(m -> String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) + .map(m -> String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) .collect(Collectors.toList()), true, ClassNames.getServiceClientClassName(service)); @@ -955,7 +951,8 @@ private static TypeNode getCallSettingsTypeHelper( if (protoMethod.isPaged()) { generics.add( typeStore - .get(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, protoMethod.name())) + .get( + String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, protoMethod.name())) .reference()); } @@ -976,11 +973,11 @@ private static TypeNode getStubSettingsBuilderType(Service service) { private static String getMethodNameFromSettingsVarName(String settingsVarName) { BiFunction methodNameSubstrFn = (s, literal) -> s.substring(0, s.length() - literal.length()); - if (settingsVarName.endsWith(OPERATION_SETTINGS_LITERAL)) { - return methodNameSubstrFn.apply(settingsVarName, OPERATION_SETTINGS_LITERAL); + if (settingsVarName.endsWith(CommonStrings.OPERATION_SETTINGS_LITERAL)) { + return methodNameSubstrFn.apply(settingsVarName, CommonStrings.OPERATION_SETTINGS_LITERAL); } - if (settingsVarName.endsWith(SETTINGS_LITERAL)) { - return methodNameSubstrFn.apply(settingsVarName, SETTINGS_LITERAL); + if (settingsVarName.endsWith(CommonStrings.SETTINGS_LITERAL)) { + return methodNameSubstrFn.apply(settingsVarName, CommonStrings.SETTINGS_LITERAL); } return settingsVarName; } diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java index 0697c798d1..5cdb08ff10 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java @@ -35,6 +35,7 @@ import com.google.api.generator.gapic.composer.comment.StubCommentComposer; import com.google.api.generator.gapic.composer.store.TypeStore; import com.google.api.generator.gapic.composer.utils.ClassNames; +import com.google.api.generator.gapic.composer.utils.CommonStrings; import com.google.api.generator.gapic.composer.utils.PackageChecker; import com.google.api.generator.gapic.model.GapicClass; import com.google.api.generator.gapic.model.GapicClass.Kind; @@ -55,9 +56,6 @@ import javax.annotation.Generated; public abstract class AbstractServiceStubClassComposer implements ClassComposer { - private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; - private static final String INTERNAL_API_WARNING = - "Internal API. This API is not intended for public consumption."; private final TransportContext transportContext; @@ -192,7 +190,7 @@ private MethodDefinition createCallableGetterHelper( } else if (isPaged) { genericRefs.add( typeStore - .get(String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) + .get(String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, method.name())) .reference()); } else { genericRefs.add(method.outputType().reference()); @@ -205,7 +203,7 @@ private MethodDefinition createCallableGetterHelper( if (method.isInternalApi()) { annotations.add( AnnotationNode.withTypeAndDescription( - typeStore.get("InternalApi"), INTERNAL_API_WARNING)); + typeStore.get("InternalApi"), CommonStrings.INTERNAL_API_WARNING)); } returnType = TypeNode.withReference(returnType.reference().copyAndSetGenerics(genericRefs)); @@ -282,7 +280,7 @@ private static TypeStore createTypes(Service service, Map messa service.pakkage(), service.methods().stream() .filter(m -> m.isPaged()) - .map(m -> String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) + .map(m -> String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) .collect(Collectors.toList()), true, ClassNames.getServiceClientClassName(service)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java index 4195336eae..6357ee3f3c 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java @@ -84,6 +84,7 @@ import com.google.api.generator.gapic.composer.samplecode.SettingsSampleComposer; import com.google.api.generator.gapic.composer.store.TypeStore; import com.google.api.generator.gapic.composer.utils.ClassNames; +import com.google.api.generator.gapic.composer.utils.CommonStrings; import com.google.api.generator.gapic.composer.utils.PackageChecker; import com.google.api.generator.gapic.model.Field; import com.google.api.generator.gapic.model.GapicBatchingSettings; @@ -129,20 +130,13 @@ public abstract class AbstractServiceStubSettingsClassComposer implements ClassC private static final String BATCHING_DESC_PATTERN = "%s_BATCHING_DESC"; private static final String PAGE_STR_DESC_PATTERN = "%s_PAGE_STR_DESC"; private static final String PAGED_RESPONSE_FACTORY_PATTERN = "%s_PAGE_STR_FACT"; - private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; private static final String NESTED_BUILDER_CLASS_NAME = "Builder"; private static final String NESTED_UNARY_METHOD_SETTINGS_BUILDERS_VAR_NAME = "unaryMethodSettingsBuilders"; private static final String NESTED_RETRYABLE_CODE_DEFINITIONS_VAR_NAME = "RETRYABLE_CODE_DEFINITIONS"; private static final String NESTED_RETRY_PARAM_DEFINITIONS_VAR_NAME = "RETRY_PARAM_DEFINITIONS"; - - private static final String OPERATION_SETTINGS_LITERAL = "OperationSettings"; - private static final String SETTINGS_LITERAL = "Settings"; - private static final String DOT = "."; - private static final String INTERNAL_API_WARNING = - "Internal API. This API is not intended for public consumption."; protected static final TypeStore FIXED_TYPESTORE = createStaticTypes(); @@ -1025,7 +1019,7 @@ private static List createMethodAnnotation( if (isInternal) { annotations.add( AnnotationNode.withTypeAndDescription( - FIXED_TYPESTORE.get("InternalApi"), INTERNAL_API_WARNING)); + FIXED_TYPESTORE.get("InternalApi"), CommonStrings.INTERNAL_API_WARNING)); } return annotations; } @@ -1637,7 +1631,7 @@ private static List createNestedClassConstructorMethods( VariableExpr varExpr = e.getValue(); TypeNode varType = varExpr.type(); Preconditions.checkState( - e.getKey().endsWith(SETTINGS_LITERAL), + e.getKey().endsWith(CommonStrings.SETTINGS_LITERAL), String.format("%s expected to end with \"Settings\"", e.getKey())); String methodName = getMethodNameFromSettingsVarName(e.getKey()); @@ -2130,7 +2124,7 @@ private TypeStore createDynamicTypes(Service service, String pakkage) { service.pakkage(), service.methods().stream() .filter(m -> m.isPaged()) - .map(m -> String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) + .map(m -> String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) .collect(Collectors.toList()), true, ClassNames.getServiceClientClassName(service)); @@ -2209,7 +2203,8 @@ private static VariableExpr createNestedRetryParamDefinitionsVarExpr() { } private static String getPagedResponseTypeName(String methodName) { - return String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, JavaStyle.toUpperCamelCase(methodName)); + return String.format( + CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, JavaStyle.toUpperCamelCase(methodName)); } private static TypeNode getCallSettingsType( @@ -2287,11 +2282,11 @@ private static TypeNode getOperationCallSettingsType(Method method, boolean isSe private static String getMethodNameFromSettingsVarName(String settingsVarName) { BiFunction methodNameSubstrFn = (s, literal) -> s.substring(0, s.length() - literal.length()); - if (settingsVarName.endsWith(OPERATION_SETTINGS_LITERAL)) { - return methodNameSubstrFn.apply(settingsVarName, OPERATION_SETTINGS_LITERAL); + if (settingsVarName.endsWith(CommonStrings.OPERATION_SETTINGS_LITERAL)) { + return methodNameSubstrFn.apply(settingsVarName, CommonStrings.OPERATION_SETTINGS_LITERAL); } - if (settingsVarName.endsWith(SETTINGS_LITERAL)) { - return methodNameSubstrFn.apply(settingsVarName, SETTINGS_LITERAL); + if (settingsVarName.endsWith(CommonStrings.SETTINGS_LITERAL)) { + return methodNameSubstrFn.apply(settingsVarName, CommonStrings.SETTINGS_LITERAL); } return settingsVarName; } diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java index 6ebdfe6ed7..2a20ab21d0 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java @@ -58,6 +58,7 @@ import com.google.api.generator.engine.ast.VariableExpr; import com.google.api.generator.gapic.composer.comment.StubCommentComposer; import com.google.api.generator.gapic.composer.store.TypeStore; +import com.google.api.generator.gapic.composer.utils.CommonStrings; import com.google.api.generator.gapic.composer.utils.PackageChecker; import com.google.api.generator.gapic.model.Field; import com.google.api.generator.gapic.model.GapicClass; @@ -101,7 +102,6 @@ public abstract class AbstractTransportServiceStubClassComposer implements Class private static final Statement EMPTY_LINE_STATEMENT = EmptyLineStatement.create(); private static final String METHOD_DESCRIPTOR_NAME_PATTERN = "%sMethodDescriptor"; - private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; private static final String PAGED_CALLABLE_CLASS_MEMBER_PATTERN = "%sPagedCallable"; private static final String BACKGROUND_RESOURCES_MEMBER_NAME = "backgroundResources"; @@ -491,7 +491,8 @@ private VariableExpr getPagedCallableExpr( typeStore .get( String.format( - PAGED_RESPONSE_TYPE_NAME_PATTERN, protoMethod.name())) + CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, + protoMethod.name())) .reference())))) .build()); } @@ -1239,7 +1240,7 @@ private TypeStore createDynamicTypes(Service service, String stubPakkage) { service.methods().stream() .filter(x -> x.isSupportedByTransport(getTransportContext().transport())) .filter(Method::isPaged) - .map(m -> String.format(PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) + .map(m -> String.format(CommonStrings.PAGED_RESPONSE_TYPE_NAME_PATTERN, m.name())) .collect(Collectors.toList()), true, getTransportContext().classNames().getServiceClientClassName(service)); diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index d66a5f706e..975ccf58fa 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -473,18 +473,20 @@ static SelectiveGapicType getMethodSelectiveGapicType( Boolean generateOmittedAsInternal = selectiveGapicGenerationConfig.getGenerateOmittedAsInternal(); - // Set method to PUBLIC if no SelectiveGapicGeneration Configuration is configured or the method - // is in the allow list. - // Otherwise, generate this method as INTERNAL or HIDDEN based on GenerateOmittedAsInternal - // flag. - if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false - || includeMethodsList.contains(method.getFullName())) { + // Set method to PUBLIC if no SelectiveGapicGeneration Configuration is configured and + // GenerateOmittedAsInternal is false. + if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false) { + return SelectiveGapicType.PUBLIC; + } + + // Set method to PUBLIC if the method is in the allow list. + if (includeMethodsList.contains(method.getFullName())) { return SelectiveGapicType.PUBLIC; - } else if (generateOmittedAsInternal) { - return SelectiveGapicType.INTERNAL; - } else { - return SelectiveGapicType.HIDDEN; } + // Otherwise, generate this method as INTERNAL or HIDDEN based on GenerateOmittedAsInternal + // flag. + + return generateOmittedAsInternal ? SelectiveGapicType.INTERNAL : SelectiveGapicType.HIDDEN; } // A service is considered empty if it contains no methods, or only methods marked as HIDDEN. diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index 1c991d65d3..fca0c67554 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -442,7 +442,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal() { EchoRequest request = EchoRequest.newBuilder().build(); return chatShouldGenerateAsInternal(request); @@ -471,7 +471,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(FoobarName name) { EchoRequest request = EchoRequest.newBuilder().setName(name == null ? null : name.toString()).build(); @@ -501,7 +501,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(String name) { EchoRequest request = EchoRequest.newBuilder().setName(name).build(); return chatShouldGenerateAsInternal(request); @@ -535,7 +535,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public final EchoResponse chatShouldGenerateAsInternal(EchoRequest request) { return chatShouldGenerateAsInternalCallable().call(request); } @@ -569,7 +569,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public final UnaryCallable chatShouldGenerateAsInternalCallable() { return stub.chatShouldGenerateAsInternalCallable(); } @@ -603,7 +603,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public final BidiStreamingCallable echoShouldGenerateAsInternalCallable() { return stub.echoShouldGenerateAsInternalCallable(); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden index bca98be9d2..d654e9644c 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClientStub.golden @@ -32,13 +32,13 @@ public abstract class EchoServiceShouldGeneratePartialUsualStub implements Backg "Not implemented: chatAgainShouldGenerateAsUsualCallable()"); } - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public UnaryCallable chatShouldGenerateAsInternalCallable() { throw new UnsupportedOperationException( "Not implemented: chatShouldGenerateAsInternalCallable()"); } - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public BidiStreamingCallable echoShouldGenerateAsInternalCallable() { throw new UnsupportedOperationException( "Not implemented: echoShouldGenerateAsInternalCallable()"); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden index 2d95348731..5b0c06fbf6 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden @@ -98,7 +98,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) .chatShouldGenerateAsInternalSettings(); @@ -109,7 +109,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { return ((EchoServiceShouldGeneratePartialUsualStubSettings) getStubSettings()) .echoShouldGenerateAsInternalSettings(); @@ -237,7 +237,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings.Builder chatShouldGenerateAsInternalSettings() { return getStubSettingsBuilder().chatShouldGenerateAsInternalSettings(); @@ -248,7 +248,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings.Builder echoShouldGenerateAsInternalSettings() { return getStubSettingsBuilder().echoShouldGenerateAsInternalSettings(); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden index 571809642c..9c7291e532 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden @@ -117,7 +117,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { return chatShouldGenerateAsInternalSettings; } @@ -127,7 +127,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { return echoShouldGenerateAsInternalSettings; } @@ -354,7 +354,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings.Builder chatShouldGenerateAsInternalSettings() { return chatShouldGenerateAsInternalSettings; @@ -365,7 +365,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings * *

    Warning: This method is internal used only. Please do not use directly. */ - @InternalApi("Internal API. This API is not intended for public consumption.") + @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings.Builder echoShouldGenerateAsInternalSettings() { return echoShouldGenerateAsInternalSettings; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java index 5829acac73..6ddf533cbb 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/protoparser/ParserTest.java @@ -22,10 +22,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.api.ClientLibrarySettings; +import com.google.api.CommonLanguageSettings; import com.google.api.FieldInfo.Format; +import com.google.api.JavaSettings; import com.google.api.MethodSettings; import com.google.api.Publishing; import com.google.api.PythonSettings; +import com.google.api.SelectiveGapicGeneration; import com.google.api.Service; import com.google.api.generator.engine.ast.ConcreteReference; import com.google.api.generator.engine.ast.Reference; @@ -884,6 +887,60 @@ void selectiveGenerationTest_shouldGenerateAsPublicIfNoJavaSectionInServiceYaml( SelectiveGapicType.PUBLIC); } + @Test + void selectiveGenerationTest_shouldGenerateAsPublicIfMethodInList() { + String protoPackage = "google.selective.generate.v1beta1"; + String methodsAllowList = + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.EchoShouldGenerateAsUsual"; + Service service = + createServiceWithSelectiveGapicConfiguration(protoPackage, methodsAllowList, true); + + FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); + // methodToGenerate from fileDescriptor: + // google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.EchoShouldGenerateAsUsual + MethodDescriptor methodToGenerate = fileDescriptor.getServices().get(1).getMethods().get(0); + + assertEquals( + Parser.getMethodSelectiveGapicType(methodToGenerate, Optional.of(service), protoPackage), + SelectiveGapicType.PUBLIC); + } + + @Test + void selectiveGenerationTest_shouldGenerateAsInternalIfMethodNotInListWithGenerateOmittedTrue() { + String protoPackage = "google.selective.generate.v1beta1"; + String methodsAllowList = + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.EchoShouldGenerateAsUsual"; + Service service = + createServiceWithSelectiveGapicConfiguration(protoPackage, methodsAllowList, true); + + FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); + // methodToGenerate from fileDescriptor: + // google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.ChatShouldGenerateAsInternal + MethodDescriptor methodToGenerate = fileDescriptor.getServices().get(1).getMethods().get(3); + + assertEquals( + Parser.getMethodSelectiveGapicType(methodToGenerate, Optional.of(service), protoPackage), + SelectiveGapicType.INTERNAL); + } + + @Test + void selectiveGenerationTest_shouldGenerateAsHiddenIfMethodNotInListWithGenerateOmittedFalse() { + String protoPackage = "google.selective.generate.v1beta1"; + String methodsAllowList = + "google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.EchoShouldGenerateAsUsual"; + Service service = + createServiceWithSelectiveGapicConfiguration(protoPackage, methodsAllowList, false); + + FileDescriptor fileDescriptor = SelectiveApiGenerationOuterClass.getDescriptor(); + // methodToGenerate from fileDescriptor: + // google.selective.generate.v1beta1.EchoServiceShouldGeneratePartialUsual.ChatShouldGenerateAsInternal + MethodDescriptor methodToGenerate = fileDescriptor.getServices().get(1).getMethods().get(3); + + assertEquals( + Parser.getMethodSelectiveGapicType(methodToGenerate, Optional.of(service), protoPackage), + SelectiveGapicType.HIDDEN); + } + private void assertMethodArgumentEquals( String name, TypeNode type, List nestedFields, MethodArgument argument) { assertEquals(name, argument.name()); @@ -894,4 +951,33 @@ private void assertMethodArgumentEquals( private static Reference createStatusReference() { return VaporReference.builder().setName("Status").setPakkage("com.google.rpc").build(); } + + private static Service createServiceWithSelectiveGapicConfiguration( + String protoPackage, String methodsAllowList, boolean generateOmittedAsInternal) { + // Create a service with method allow-list and generateOmittedAsInternal flag. + JavaSettings java_settings = + JavaSettings.newBuilder() + .setLibraryPackage("com.google.foobar.v1") + .putServiceClassNames("com.google.foo.v1.BarService", "BazService") + .setCommon( + CommonLanguageSettings.newBuilder() + .setSelectiveGapicGeneration( + SelectiveGapicGeneration.newBuilder() + .addMethods(methodsAllowList) + .setGenerateOmittedAsInternal(generateOmittedAsInternal))) + .build(); + ClientLibrarySettings clientLibrarySettings = + ClientLibrarySettings.newBuilder() + .setVersion(protoPackage) + .setJavaSettings(java_settings) + .build(); + Publishing publishing = + Publishing.newBuilder().addLibrarySettings(clientLibrarySettings).build(); + Service service = + Service.newBuilder() + .setTitle("Selective generation test") + .setPublishing(publishing) + .build(); + return service; + } } From b0553ac7e8a1f817c7f65775da052abd72056c15 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 16 Apr 2025 20:49:56 -0700 Subject: [PATCH 19/21] Add common string and unit tests for parser. --- .../gapic/composer/utils/CommonStrings.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/utils/CommonStrings.java diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/utils/CommonStrings.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/utils/CommonStrings.java new file mode 100644 index 0000000000..201e50e8e7 --- /dev/null +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/utils/CommonStrings.java @@ -0,0 +1,24 @@ +// Copyright 2025 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 +// +// http://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.api.generator.gapic.composer.utils; + +/** Provides Gapic common strings. */ +public class CommonStrings { + public static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; + public static final String INTERNAL_API_WARNING = + "This API is not intended for public consumption."; + public static final String SETTINGS_LITERAL = "Settings"; + public static final String OPERATION_SETTINGS_LITERAL = "OperationSettings"; +} From 01bc7f781bb031fb55d6609d92bfff2eea5af24a Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 17 Apr 2025 08:01:02 -0700 Subject: [PATCH 20/21] Change internal use warning message. --- .../gapic/composer/comment/CommentComposer.java | 2 +- .../api/generator/engine/ast/JavaDocCommentTest.java | 8 ++++---- .../goldens/EchoServiceSelectiveGapicClient.golden | 12 ++++++------ .../EchoServiceSelectiveGapicServiceSettings.golden | 8 ++++---- .../EchoServiceSelectiveGapicStubSettings.golden | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java index 8d93b2f9a3..6e4bf0724f 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/CommentComposer.java @@ -50,7 +50,7 @@ public class CommentComposer { "This method is deprecated and will be removed in the next major version update."; static final String INTERNAL_ONLY_METHOD_STRING = - "This method is internal used only. Please do not use directly."; + "This method is for internal use only. Please do not use it directly."; public static final CommentStatement APACHE_LICENSE_COMMENT = CommentStatement.withComment(BlockComment.withComment(APACHE_LICENSE_STRING)); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java index e74ab2c796..2f6e6532e8 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java @@ -200,7 +200,7 @@ void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { String deprecatedText = "Use the {@link ArchivedBookName} class instead."; String deprecatedText_print = "Use the {@link ShelfBookName} class instead."; - String internalOnlyText = "This method is internal used only. Please do not use directly."; + String internalOnlyText = "This method is for internal use only. Please do not use it directly."; String returnText = "This is the incorrect method return text."; String returnText_print = "This is the correct method return text."; @@ -217,7 +217,7 @@ void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { .build(); String expected = LineFormatter.lines( - "

    Warning: This method is internal used only. Please do not use directly.\n", + "

    Warning: This method is for internal use only. Please do not use it directly.\n", "@throws java.lang.RuntimeException if the remote call fails.\n", "@deprecated Use the {@link ShelfBookName} class instead.\n", "@return This is the correct method return text."); @@ -233,7 +233,7 @@ void createJavaDocComment_allComponents() { // All other add methods should keep the order of how they are added. String content = "this is a test comment"; String deprecatedText = "Use the {@link ArchivedBookName} class instead."; - String internalOnlyText = "This method is internal used only. Please do not use directly."; + String internalOnlyText = "This method is for internal use only. Please do not use it directly."; String returnText = "This is the method return text."; String paramName1 = "shelfName"; String paramDescription1 = "The name of the shelf where books are published to."; @@ -274,7 +274,7 @@ void createJavaDocComment_allComponents() { "

  • A request object method.\n", "
  • A callable method.\n", "\n", - "

    Warning: This method is internal used only. Please do not use directly.\n", + "

    Warning: This method is for internal use only. Please do not use it directly.\n", "@param shelfName The name of the shelf where books are published to.\n", "@param shelf The shelf to create.\n", "@throws com.google.api.gax.rpc.ApiException if the remote call fails.\n", diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden index fca0c67554..731ebe1834 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden @@ -437,7 +437,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -466,7 +466,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. * * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -496,7 +496,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. * * @param name * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -530,7 +530,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -567,7 +567,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public final UnaryCallable chatShouldGenerateAsInternalCallable() { @@ -601,7 +601,7 @@ public class EchoServiceShouldGeneratePartialUsualClient implements BackgroundRe * } * } * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public final BidiStreamingCallable diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden index 5b0c06fbf6..07332f7c75 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden @@ -96,7 +96,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the object with the settings used for calls to chatShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -107,7 +107,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the object with the settings used for calls to echoShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -235,7 +235,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the builder for the settings used for calls to chatShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -246,7 +246,7 @@ public class EchoServiceShouldGeneratePartialUsualSettings /** * Returns the builder for the settings used for calls to echoShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings.Builder diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden index 9c7291e532..5cf83e9e4b 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicStubSettings.golden @@ -115,7 +115,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the object with the settings used for calls to chatShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings chatShouldGenerateAsInternalSettings() { @@ -125,7 +125,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the object with the settings used for calls to echoShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings echoShouldGenerateAsInternalSettings() { @@ -352,7 +352,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the builder for the settings used for calls to chatShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public UnaryCallSettings.Builder @@ -363,7 +363,7 @@ public class EchoServiceShouldGeneratePartialUsualStubSettings /** * Returns the builder for the settings used for calls to echoShouldGenerateAsInternal. * - *

    Warning: This method is internal used only. Please do not use directly. + *

    Warning: This method is for internal use only. Please do not use it directly. */ @InternalApi("This API is not intended for public consumption.") public StreamingCallSettings.Builder From 2ece35b0d697f3e75448c457a99b1a499e3573b3 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 17 Apr 2025 08:03:11 -0700 Subject: [PATCH 21/21] Fix linter formatting. --- .../google/api/generator/engine/ast/JavaDocCommentTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java index 2f6e6532e8..4919e5982b 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java +++ b/gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java @@ -200,7 +200,8 @@ void createJavaDocComment_throwsAndDeprecatedAndInternalAndReturn() { String deprecatedText = "Use the {@link ArchivedBookName} class instead."; String deprecatedText_print = "Use the {@link ShelfBookName} class instead."; - String internalOnlyText = "This method is for internal use only. Please do not use it directly."; + String internalOnlyText = + "This method is for internal use only. Please do not use it directly."; String returnText = "This is the incorrect method return text."; String returnText_print = "This is the correct method return text."; @@ -233,7 +234,8 @@ void createJavaDocComment_allComponents() { // All other add methods should keep the order of how they are added. String content = "this is a test comment"; String deprecatedText = "Use the {@link ArchivedBookName} class instead."; - String internalOnlyText = "This method is for internal use only. Please do not use it directly."; + String internalOnlyText = + "This method is for internal use only. Please do not use it directly."; String returnText = "This is the method return text."; String paramName1 = "shelfName"; String paramDescription1 = "The name of the shelf where books are published to.";