diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b86e4b5d3..0719b66995 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - # Java 8 tests uses JDK 11 to compile and JDK 8 to run tests. + # Java 8 tests uses JDK 17 to compile and JDK 8 to run tests. - uses: actions/setup-java@v3 with: java-version: 8 @@ -69,7 +69,7 @@ jobs: shell: bash run: | set -x - export JAVA_HOME=$JAVA11_HOME + export JAVA_HOME=$JAVA_HOME export PATH=${JAVA_HOME}/bin:$PATH # Maven surefire plugin lets us to specify the JVM when running tests via # the "jvm" system property. diff --git a/gapic-generator-java/DEVELOPMENT.md b/gapic-generator-java/DEVELOPMENT.md index 7052d0d0ac..d097e491fc 100644 --- a/gapic-generator-java/DEVELOPMENT.md +++ b/gapic-generator-java/DEVELOPMENT.md @@ -50,6 +50,8 @@ than the "test" phase. To run integration test for gapic-generator-java, run this Bazel command in the root of the repository (where you have WORKSPACE file for Bazel.) +*Note* Make sure you run `mvn clean install` to gather any changes you have made before updating the integration tests. + ```sh # In the repository root directory bazelisk test //... # integration tests @@ -73,6 +75,13 @@ bazelisk test //... # integration tests bazelisk run //test/integration:update_redis ``` +- To update all integration tests you can use this command: + + ```sh + # In the repository root directory + bazelisk run //test/integration:update_asset && bazelisk run //test/integration:update_credentials && bazelisk run //test/integration:update_iam && bazelisk run //test/integration:update_kms && bazelisk run //test/integration:update_pubsub && bazelisk run //test/integration:update_logging && bazelisk run //test/integration:update_redis && bazelisk run //test/integration:update_storage && bazelisk run //test/integration:update_library && bazelisk run //test/integration:update_compute && bazelisk run //test/integration:update_bigtable && bazelisk run //test/integration:update_apigeeconnect + ``` + ## Running the Plugin under googleapis with local gapic-generator-java For running the Plugin with showcase protos and local gapic-generator-java, see 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 5835c77935..49ed6e168e 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 @@ -14,6 +14,8 @@ package com.google.api.generator.gapic.composer.comment; +import static java.util.stream.Collectors.toList; + import com.google.api.generator.engine.ast.CommentStatement; import com.google.api.generator.engine.ast.JavaDocComment; import com.google.api.generator.engine.ast.TypeNode; @@ -27,6 +29,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.Optional; public class ServiceClientCommentComposer { @@ -39,9 +42,6 @@ public class ServiceClientCommentComposer { private static final String SERVICE_DESCRIPTION_INTRO_STRING = "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:"; - private static final String SERVICE_DESCRIPTION_SURFACE_SUMMARY_STRING = - "The surface of this class includes several types of Java methods for each of the API's " - + "methods:"; private static final String SERVICE_DESCRIPTION_SURFACE_CODA_STRING = "See the individual methods for example code."; private static final String SERVICE_DESCRIPTION_RESOURCE_NAMES_FORMATTING_STRING = @@ -61,18 +61,6 @@ public class ServiceClientCommentComposer { private static final String METHOD_DESCRIPTION_SAMPLE_CODE_SUMMARY_STRING = "Sample code:"; - private static final List SERVICE_DESCRIPTION_SURFACE_DESCRIPTION = - Arrays.asList( - "A \"flattened\" method. With this type of method, the fields of the request type have" - + " been converted into function parameters. It may be the case that not all fields" - + " are available as parameters, and not every API method will have a flattened" - + " method entry point.", - "A \"request object\" method. This type of method only takes one parameter, a request" - + " object, which must be constructed before the call. Not every API method will" - + " have a request object method.", - "A \"callable\" method. This type of method takes no parameters and returns an immutable " - + "API callable object, which can be used to initiate calls to the service."); - // Patterns. private static final String CREATE_METHOD_STUB_ARG_PATTERN = "Constructs an instance of %s, using the given stub for making calls. This is for" @@ -109,6 +97,7 @@ public class ServiceClientCommentComposer { + " operation returned by another API method call."); public static List createClassHeaderComments( + Map> methodVariantsForClientHeader, Service service, String classMethodSampleCode, String credentialsSampleCode, @@ -132,8 +121,14 @@ public static List createClassHeaderComments( classHeaderJavadocBuilder.addParagraph( String.format( SERVICE_DESCRIPTION_CLOSE_PATTERN, ClassNames.getServiceClientClassName(service))); - classHeaderJavadocBuilder.addParagraph(SERVICE_DESCRIPTION_SURFACE_SUMMARY_STRING); - classHeaderJavadocBuilder.addOrderedList(SERVICE_DESCRIPTION_SURFACE_DESCRIPTION); + + // Build the map of methods and descriptions to create the table in Client Overviews + List methodAndVariantsList = + service.methods().stream() + .map((Method method) -> createMethodAndVariants(method, methodVariantsForClientHeader)) + .collect(toList()); + + classHeaderJavadocBuilder.addUnescapedComment(createTableOfMethods(methodAndVariantsList)); classHeaderJavadocBuilder.addParagraph(SERVICE_DESCRIPTION_SURFACE_CODA_STRING); // Formatting resource names. @@ -215,6 +210,95 @@ public static List createRpcMethodHeaderComment( return comments; } + private static MethodAndVariants createMethodAndVariants( + Method method, Map> methodVariantsForClientHeader) { + String name = method.name(); + String description = method.description(); + if (description == null) description = ""; + return new MethodAndVariants(name, description, methodVariantsForClientHeader.get(name)); + } + + private static String createTableOfMethods(List methodAndVariantsList) { + String FLATTENED_METHODS = + "

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

\n"; + String REQUEST_OBJECT_METHODS = + "

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

\n"; + String CALLABLE_METHODS = + "

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

\n"; + String ASYNC_METHODS = + "

Methods that return long-running operations have \"Async\" method variants that return `OperationFuture`, which is used to track polling of the service.

\n"; + + StringBuilder tableBuilder = new StringBuilder(); + tableBuilder + .append("\n") + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n"); + for (MethodAndVariants method : methodAndVariantsList) { + tableBuilder + .append(" \n") + .append(" \n") + .append(" \n") + .append(" \n").append(" \n"); + } + tableBuilder.append(" \n").append("
MethodDescriptionMethod Variants
") + .append(method.method) + .append("") + .append("

" + method.description + "

") + .append("
\n"); + generateUnorderedListMethodVariants( + tableBuilder, REQUEST_OBJECT_METHODS, method.requestObjectVariants); + generateUnorderedListMethodVariants( + tableBuilder, FLATTENED_METHODS, method.flattenedVariants); + generateUnorderedListMethodVariants(tableBuilder, ASYNC_METHODS, method.asyncVariants); + generateUnorderedListMethodVariants(tableBuilder, CALLABLE_METHODS, method.callableVariants); + tableBuilder.append("
\n"); + return tableBuilder.toString(); + } + + private static void generateUnorderedListMethodVariants( + StringBuilder tableBuilder, String methodType, List methodVariants) { + if (!methodVariants.isEmpty()) { + tableBuilder + .append(" " + methodType + " ") + .append("
    \n") + .append("
  • ") + .append(String.join("\n
  • ", methodVariants)) + .append("\n") + .append("
") + .append("\n"); + } + } + + private static class MethodAndVariants { + private final String method; + // Description may be empty. It comes from the proto comments above the method. If it is empty, + // then nothing will be displayed. + private final String description; + + private final List flattenedVariants; + private final List requestObjectVariants; + private final List callableVariants; + private final List asyncVariants; + + private MethodAndVariants(String method, String description, List methodVariants) { + this.method = method; + this.description = description; + requestObjectVariants = + methodVariants.stream().filter(s -> s.contains("request")).collect(toList()); + // Flattened method variants do not have a suffix, so the easiest way to identify them is by + // removing all other method variant types. + methodVariants.removeAll(requestObjectVariants); + callableVariants = + methodVariants.stream().filter(s -> s.contains("Callable")).collect(toList()); + methodVariants.removeAll(callableVariants); + asyncVariants = methodVariants.stream().filter(s -> s.contains("Async")).collect(toList()); + methodVariants.removeAll(asyncVariants); + flattenedVariants = methodVariants; + } + } + public static List createRpcMethodHeaderComment( Method method, Optional sampleCodeOpt) { return createRpcMethodHeaderComment(method, Collections.emptyList(), sampleCodeOpt); 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 b6095be08b..987cd9adc8 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 @@ -139,11 +139,10 @@ public GapicClass generate(GapicContext context, Service service) { List samples = new ArrayList<>(); Map> grpcRpcsToJavaMethodNames = new HashMap<>(); + Map> methodVariantsForClientHeader = new HashMap<>(); ClassDefinition classDef = ClassDefinition.builder() - .setHeaderCommentStatements( - createClassHeaderComments(service, typeStore, resourceNames, messageTypes, samples)) .setPackageString(pakkage) .setAnnotations(createClassAnnotations(service, typeStore)) .setScope(ScopeNode.PUBLIC) @@ -158,8 +157,17 @@ public GapicClass generate(GapicContext context, Service service) { resourceNames, hasLroClient, grpcRpcsToJavaMethodNames, + methodVariantsForClientHeader, samples)) .setNestedClasses(createNestedPagingClasses(service, messageTypes, typeStore)) + .setHeaderCommentStatements( + createClassHeaderComments( + methodVariantsForClientHeader, + service, + typeStore, + resourceNames, + messageTypes, + samples)) .build(); updateGapicMetadata(context, service, className, grpcRpcsToJavaMethodNames); @@ -189,6 +197,7 @@ private static List createClassImplements(TypeStore typeStore) { } protected List createClassHeaderComments( + Map> methodVariantsForClientHeader, Service service, TypeStore typeStore, Map resourceNames, @@ -207,6 +216,7 @@ protected List createClassHeaderComments( clientType, settingsType, service); samples.addAll(Arrays.asList(classMethodSampleCode, credentialsSampleCode, endpointSampleCode)); return ServiceClientCommentComposer.createClassHeaderComments( + methodVariantsForClientHeader, service, SampleCodeWriter.writeInlineSample(classMethodSampleCode.body()), SampleCodeWriter.writeInlineSample(credentialsSampleCode.body()), @@ -223,6 +233,7 @@ private List createClassMethods( Map resourceNames, boolean hasLroClient, Map> grpcRpcToJavaMethodMetadata, + Map> methodVariantsForClientHeader, List samples) { List methods = new ArrayList<>(); methods.addAll(createStaticCreatorMethods(service, typeStore)); @@ -230,7 +241,13 @@ private List createClassMethods( methods.addAll(createGetterMethods(service, typeStore, hasLroClient)); methods.addAll( createServiceMethods( - service, messageTypes, typeStore, resourceNames, grpcRpcToJavaMethodMetadata, samples)); + service, + messageTypes, + typeStore, + resourceNames, + grpcRpcToJavaMethodMetadata, + methodVariantsForClientHeader, + samples)); methods.addAll(createBackgroundResourceMethods(service, typeStore)); return methods; } @@ -561,18 +578,53 @@ private List createGetterMethods( .collect(Collectors.toList()); } + private static String getJavaMethod(MethodDefinition m) { + StringBuilder methodSignature = new StringBuilder(); + + // Method name + methodSignature.append(m.methodIdentifier().name()).append("("); + + // Iterate through and add all parameters + List parameters = + m.arguments().stream().map(VariableExpr::variable).collect(Collectors.toList()); + + // If reference is empty, that means the parameter is a non-Object type. Therefore, use the + // typeKind directly. + for (int i = 0; i < parameters.size(); i++) { + Variable param = parameters.get(i); + String paramType = + param.type().reference() != null + ? param.type().reference().name() + " " + : param.type().typeKind().name().toLowerCase() + " "; + String paramName = param.identifier().name(); + + methodSignature.append(paramType).append(paramName); + + // Add a comma if there are more parameters + if (i < parameters.size() - 1) { + methodSignature.append(", "); + } + } + + methodSignature.append(")"); + + return methodSignature.toString(); + } + private static List createServiceMethods( Service service, Map messageTypes, TypeStore typeStore, Map resourceNames, Map> grpcRpcToJavaMethodMetadata, + Map> methodVariantsForClientHeader, List samples) { List javaMethods = new ArrayList<>(); Function javaMethodNameFn = m -> m.methodIdentifier().name(); for (Method method : service.methods()) { if (!grpcRpcToJavaMethodMetadata.containsKey(method.name())) { grpcRpcToJavaMethodMetadata.put(method.name(), new ArrayList<>()); + methodVariantsForClientHeader.put(method.name(), new ArrayList<>()); } if (method.stream().equals(Stream.NONE)) { List generatedMethods = @@ -592,6 +644,14 @@ private static List createServiceMethods( generatedMethods.stream() .map(m -> javaMethodNameFn.apply(m)) .collect(Collectors.toList())); + + // Collect data for Client header + methodVariantsForClientHeader + .get(method.name()) + .addAll( + generatedMethods.stream() + .map(AbstractServiceClientClassComposer::getJavaMethod) + .collect(Collectors.toList())); javaMethods.addAll(generatedMethods); MethodDefinition generatedMethod = @@ -604,8 +664,9 @@ private static List createServiceMethods( samples, service); - // Collect data for gapic_metadata.json. + // Collect data for gapic_metadata.json and client header. grpcRpcToJavaMethodMetadata.get(method.name()).add(javaMethodNameFn.apply(generatedMethod)); + methodVariantsForClientHeader.get(method.name()).add(getJavaMethod(generatedMethod)); javaMethods.add(generatedMethod); } if (method.hasLro()) { @@ -613,8 +674,9 @@ private static List createServiceMethods( createLroCallableMethod( service, method, typeStore, messageTypes, resourceNames, samples); - // Collect data for gapic_metadata.json. + // Collect data for gapic_metadata.json and client header. grpcRpcToJavaMethodMetadata.get(method.name()).add(javaMethodNameFn.apply(generatedMethod)); + methodVariantsForClientHeader.get(method.name()).add(getJavaMethod(generatedMethod)); javaMethods.add(generatedMethod); } if (method.isPaged()) { @@ -622,15 +684,17 @@ private static List createServiceMethods( createPagedCallableMethod( service, method, typeStore, messageTypes, resourceNames, samples); - // Collect data for gapic_metadata.json. + // Collect data for gapic_metadata.json and client header. grpcRpcToJavaMethodMetadata.get(method.name()).add(javaMethodNameFn.apply(generatedMethod)); + methodVariantsForClientHeader.get(method.name()).add(getJavaMethod(generatedMethod)); javaMethods.add(generatedMethod); } MethodDefinition generatedMethod = createCallableMethod(service, method, typeStore, messageTypes, resourceNames, samples); - // Collect data for the gapic_metadata.json file. + // Collect data for the gapic_metadata.json file and client header. grpcRpcToJavaMethodMetadata.get(method.name()).add(javaMethodNameFn.apply(generatedMethod)); + methodVariantsForClientHeader.get(method.name()).add(getJavaMethod(generatedMethod)); javaMethods.add(generatedMethod); } return javaMethods; diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpcrest/ServiceClientClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpcrest/ServiceClientClassComposer.java index c101c96469..3710f69492 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpcrest/ServiceClientClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpcrest/ServiceClientClassComposer.java @@ -44,6 +44,7 @@ public static ServiceClientClassComposer instance() { @Override protected List createClassHeaderComments( + Map> grpcRpcsToJavaMethodNames, Service service, TypeStore typeStore, Map resourceNames, @@ -51,7 +52,7 @@ protected List createClassHeaderComments( List samples) { if (!service.hasAnyEnabledMethodsForTransport(Transport.REST)) { return super.createClassHeaderComments( - service, typeStore, resourceNames, messageTypes, samples); + grpcRpcsToJavaMethodNames, service, typeStore, resourceNames, messageTypes, samples); } TypeNode clientType = typeStore.get(ClassNames.getServiceClientClassName(service)); TypeNode settingsType = typeStore.get(ClassNames.getServiceSettingsClassName(service)); @@ -72,6 +73,7 @@ protected List createClassHeaderComments( classMethodSampleCode, credentialsSampleCode, endpointSampleCode, transportSampleCode)); return ServiceClientCommentComposer.createClassHeaderComments( + grpcRpcsToJavaMethodNames, service, SampleCodeWriter.writeInlineSample(classMethodSampleCode.body()), SampleCodeWriter.writeInlineSample(credentialsSampleCode.body()), 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 84c259a6b6..2d21bb2e1e 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 @@ -31,19 +31,27 @@ import javax.annotation.Generated; * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
NestedMessageMethod

+ *

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

+ *
    + *
  • nestedMessageMethod(Outer.Middle request) + *
+ *

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

+ *
    + *
  • nestedMessageMethodCallable() + *
+ *
* *

See the individual methods for example code. * 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 e1de9b7f4e..48f0b53808 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 @@ -31,19 +31,32 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetBook

+ *

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

+ *
    + *
  • getBook(GetBookRequest request) + *
+ *

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

+ *
    + *
  • getBook(int booksCount, List books) + *
  • getBook(String booksList, List books) + *
+ *

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

+ *
    + *
  • getBookCallable() + *
+ *
* *

See the individual methods for example code. * 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 25847773a2..12b3308b17 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 @@ -30,19 +30,41 @@ import javax.annotation.Generated; * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
FastFibonacci

+ *

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

+ *
    + *
  • fastFibonacci(FibonacciRequest request) + *
+ *

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

+ *
    + *
  • fastFibonacciCallable() + *
+ *
SlowFibonacci

+ *

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

+ *
    + *
  • slowFibonacci(FibonacciRequest request) + *
+ *

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

+ *
    + *
  • slowFibonacciCallable() + *
+ *
* *

See the individual methods for example code. * 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 5bc547af78..8ba5cd0aa2 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 @@ -52,19 +52,160 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Echo

+ *

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

+ *
    + *
  • echo(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.

+ *
    + *
  • echo() + *
  • echo(ResourceName parent) + *
  • echo(Status error) + *
  • echo(FoobarName name) + *
  • echo(String content) + *
  • echo(String name) + *
  • echo(String parent) + *
  • echo(String content, Severity severity) + *
+ *

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

+ *
    + *
  • echoCallable() + *
+ *
Expand

+ *

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

+ *
    + *
  • expandCallable() + *
+ *
Collect

+ *

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

+ *
    + *
  • collectCallable() + *
+ *
Chat

+ *

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

+ *
    + *
  • chatCallable() + *
+ *
ChatAgain

+ *

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

+ *
    + *
  • chatAgainCallable() + *
+ *
PagedExpand

+ *

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

+ *
    + *
  • pagedExpand(PagedExpandRequest request) + *
+ *

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

+ *
    + *
  • pagedExpandPagedCallable() + *
  • pagedExpandCallable() + *
+ *
SimplePagedExpand

+ *

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

+ *
    + *
  • simplePagedExpand(PagedExpandRequest request) + *
+ *

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

+ *
    + *
  • simplePagedExpand() + *
+ *

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

+ *
    + *
  • simplePagedExpandPagedCallable() + *
  • simplePagedExpandCallable() + *
+ *
Wait

+ *

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

+ *
    + *
  • waitAsync(WaitRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • waitAsync(Duration ttl) + *
  • waitAsync(Timestamp endTime) + *
+ *

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

+ *
    + *
  • waitOperationCallable() + *
  • waitCallable() + *
+ *
Block

+ *

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

+ *
    + *
  • block(BlockRequest request) + *
+ *

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

+ *
    + *
  • blockCallable() + *
+ *
CollideName

+ *

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

+ *
    + *
  • collideName(EchoRequest request) + *
+ *

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

+ *
    + *
  • collideNameCallable() + *
+ *
* *

See the individual methods for example code. * 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 bcd0f26738..0a21abc7da 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 @@ -40,19 +40,100 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateUser

+ *

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

+ *
    + *
  • createUser(CreateUserRequest request) + *
+ *

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

+ *
    + *
  • createUser(String parent, String displayName, String email) + *
  • createUser(String parent, String displayName, String email, int age, String nickname, boolean enableNotifications, double heightFeet) + *
  • createUser(String parent, String displayName, String email, String hobbyName, String songName, int weeklyFrequency, String companyName, String title, String subject, String artistName) + *
+ *

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

+ *
    + *
  • createUserCallable() + *
+ *
GetUser

+ *

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

+ *
    + *
  • getUser(GetUserRequest request) + *
+ *

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

+ *
    + *
  • getUser(UserName name) + *
  • getUser(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.

+ *
    + *
  • getUserCallable() + *
+ *
UpdateUser

+ *

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

+ *
    + *
  • updateUser(UpdateUserRequest request) + *
+ *

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

+ *
    + *
  • updateUserCallable() + *
+ *
DeleteUser

+ *

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

+ *
    + *
  • deleteUser(DeleteUserRequest request) + *
+ *

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

+ *
    + *
  • deleteUser(UserName name) + *
  • deleteUser(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.

+ *
    + *
  • deleteUserCallable() + *
+ *
ListUsers

+ *

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

+ *
    + *
  • listUsers(ListUsersRequest request) + *
+ *

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

+ *
    + *
  • listUsersPagedCallable() + *
  • listUsersCallable() + *
+ *
* *

See the individual methods for example code. * 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 78b665668f..5635b8ea96 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 @@ -47,19 +47,243 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateRoom

+ *

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

+ *
    + *
  • createRoom(CreateRoomRequest request) + *
+ *

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

+ *
    + *
  • createRoom(String displayName, String description) + *
+ *

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

+ *
    + *
  • createRoomCallable() + *
+ *
GetRoom

+ *

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

+ *
    + *
  • getRoom(GetRoomRequest request) + *
+ *

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

+ *
    + *
  • getRoom(RoomName name) + *
  • getRoom(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.

+ *
    + *
  • getRoomCallable() + *
+ *
UpdateRoom

+ *

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

+ *
    + *
  • updateRoom(UpdateRoomRequest request) + *
+ *

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

+ *
    + *
  • updateRoomCallable() + *
+ *
DeleteRoom

+ *

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

+ *
    + *
  • deleteRoom(DeleteRoomRequest request) + *
+ *

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

+ *
    + *
  • deleteRoom(RoomName name) + *
  • deleteRoom(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.

+ *
    + *
  • deleteRoomCallable() + *
+ *
ListRooms

+ *

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

+ *
    + *
  • listRooms(ListRoomsRequest request) + *
+ *

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

+ *
    + *
  • listRoomsPagedCallable() + *
  • listRoomsCallable() + *
+ *
CreateBlurb

+ *

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

+ *
    + *
  • createBlurb(CreateBlurbRequest request) + *
+ *

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

+ *
    + *
  • createBlurb(ProfileName parent, ByteString image) + *
  • createBlurb(ProfileName parent, String text) + *
  • createBlurb(RoomName parent, ByteString image) + *
  • createBlurb(RoomName parent, String text) + *
  • createBlurb(String parent, ByteString image) + *
  • createBlurb(String parent, String text) + *
+ *

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

+ *
    + *
  • createBlurbCallable() + *
+ *
GetBlurb

+ *

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

+ *
    + *
  • getBlurb(GetBlurbRequest request) + *
+ *

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

+ *
    + *
  • getBlurb(BlurbName name) + *
  • getBlurb(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.

+ *
    + *
  • getBlurbCallable() + *
+ *
UpdateBlurb

+ *

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

+ *
    + *
  • updateBlurb(UpdateBlurbRequest request) + *
+ *

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

+ *
    + *
  • updateBlurbCallable() + *
+ *
DeleteBlurb

+ *

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

+ *
    + *
  • deleteBlurb(DeleteBlurbRequest request) + *
+ *

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

+ *
    + *
  • deleteBlurb(BlurbName name) + *
  • deleteBlurb(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.

+ *
    + *
  • deleteBlurbCallable() + *
+ *
ListBlurbs

+ *

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

+ *
    + *
  • listBlurbs(ListBlurbsRequest request) + *
+ *

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

+ *
    + *
  • listBlurbs(ProfileName parent) + *
  • listBlurbs(RoomName parent) + *
  • listBlurbs(String parent) + *
+ *

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

+ *
    + *
  • listBlurbsPagedCallable() + *
  • listBlurbsCallable() + *
+ *
SearchBlurbs

+ *

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

+ *
    + *
  • searchBlurbsAsync(SearchBlurbsRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • searchBlurbsAsync(String query) + *
+ *

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

+ *
    + *
  • searchBlurbsOperationCallable() + *
  • searchBlurbsCallable() + *
+ *
StreamBlurbs

+ *

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

+ *
    + *
  • streamBlurbsCallable() + *
+ *
SendBlurbs

+ *

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

+ *
    + *
  • sendBlurbsCallable() + *
+ *
Connect

+ *

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

+ *
    + *
  • connectCallable() + *
+ *
* *

See the individual methods for example code. * 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 334dacf40b..35f4eaf45b 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 @@ -47,19 +47,186 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Echo

+ *

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

+ *
    + *
  • echo(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.

+ *
    + *
  • echo() + *
  • echo(ResourceName parent) + *
  • echo(Status error) + *
  • echo(FoobarName name) + *
  • echo(String content) + *
  • echo(String name) + *
  • echo(String parent) + *
  • echo(String content, Severity severity) + *
+ *

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

+ *
    + *
  • echoCallable() + *
+ *
Expand

+ *

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

+ *
    + *
  • expandCallable() + *
+ *
PagedExpand

+ *

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

+ *
    + *
  • pagedExpand(PagedExpandRequest request) + *
+ *

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

+ *
    + *
  • pagedExpandPagedCallable() + *
  • pagedExpandCallable() + *
+ *
SimplePagedExpand

+ *

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

+ *
    + *
  • simplePagedExpand(PagedExpandRequest request) + *
+ *

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

+ *
    + *
  • simplePagedExpand() + *
+ *

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

+ *
    + *
  • simplePagedExpandPagedCallable() + *
  • simplePagedExpandCallable() + *
+ *
Wait

+ *

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

+ *
    + *
  • waitAsync(WaitRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • waitAsync(Duration ttl) + *
  • waitAsync(Timestamp endTime) + *
+ *

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

+ *
    + *
  • waitOperationCallable() + *
  • waitCallable() + *
+ *
Block

+ *

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

+ *
    + *
  • block(BlockRequest request) + *
+ *

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

+ *
    + *
  • blockCallable() + *
+ *
CollideName

+ *

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

+ *
    + *
  • collideName(EchoRequest request) + *
+ *

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

+ *
    + *
  • collideNameCallable() + *
+ *
NestedBinding

+ *

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

+ *
    + *
  • nestedBinding(EchoRequest request) + *
+ *

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

+ *
    + *
  • nestedBindingCallable() + *
+ *
Chat

+ *

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

+ *
    + *
  • chatCallable() + *
+ *
NoBinding

+ *

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

+ *
    + *
  • noBinding(EchoRequest request) + *
+ *

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

+ *
    + *
  • noBindingCallable() + *
+ *
UpdateCase

+ *

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

+ *
    + *
  • updateCase(UpdateCaseRequest request) + *
+ *

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

+ *
    + *
  • updateCase(Case case_, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCaseCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoEmpty.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoEmpty.golden index ad2bd517d2..5076d1bee1 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoEmpty.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoEmpty.golden @@ -25,19 +25,13 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + *
MethodDescriptionMethod Variants
* *

See the individual methods for example code. * 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 67f9212085..15f46c3f6a 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 @@ -32,19 +32,47 @@ import javax.annotation.Generated; *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CraftEvilPlan

+ *

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

+ *
    + *
  • craftEvilPlan(EvilRequest request) + *
+ *

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

+ *
    + *
  • craftEvilPlanCallable() + *
+ *
BrainstormEvilPlans

+ *

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

+ *
    + *
  • brainstormEvilPlansCallable() + *
+ *
PersuadeEvilPlan

+ *

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

+ *
    + *
  • persuadeEvilPlanCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceClient.java index c760c1f1a4..b5b68a1383 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceClient.java @@ -79,19 +79,251 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
RepeatDataBody

This method echoes the ComplianceData request. This method exercises + * sending the entire request object in the REST body.

+ *

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

+ *
    + *
  • repeatDataBody(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataBodyCallable() + *
+ *
RepeatDataBodyInfo

This method echoes the ComplianceData request. This method exercises + * sending the a message-type field in the REST body. Per AIP-127, only + * top-level, non-repeated fields can be sent this way.

+ *

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

+ *
    + *
  • repeatDataBodyInfo(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataBodyInfoCallable() + *
+ *
RepeatDataQuery

This method echoes the ComplianceData request. This method exercises + * sending all request fields as query parameters.

+ *

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

+ *
    + *
  • repeatDataQuery(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataQueryCallable() + *
+ *
RepeatDataSimplePath

This method echoes the ComplianceData request. This method exercises + * sending some parameters as "simple" path variables (i.e., of the form + * "/bar/{foo}" rather than "/{foo=bar/*}"), and the rest as query parameters.

+ *

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

+ *
    + *
  • repeatDataSimplePath(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataSimplePathCallable() + *
+ *
RepeatDataPathResource

Same as RepeatDataSimplePath, but with a path resource.

+ *

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

+ *
    + *
  • repeatDataPathResource(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataPathResourceCallable() + *
+ *
RepeatDataPathTrailingResource

Same as RepeatDataSimplePath, but with a trailing resource.

+ *

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

+ *
    + *
  • repeatDataPathTrailingResource(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataPathTrailingResourceCallable() + *
+ *
RepeatDataBodyPut

This method echoes the ComplianceData request, using the HTTP PUT method.

+ *

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

+ *
    + *
  • repeatDataBodyPut(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataBodyPutCallable() + *
+ *
RepeatDataBodyPatch

This method echoes the ComplianceData request, using the HTTP PATCH method.

+ *

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

+ *
    + *
  • repeatDataBodyPatch(RepeatRequest request) + *
+ *

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

+ *
    + *
  • repeatDataBodyPatchCallable() + *
+ *
GetEnum

This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the + * .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum vaues they receive, use the + * response from this RPC as the request to VerifyEnum() * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for + * VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs.

+ *

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

+ *
    + *
  • getEnum(EnumRequest request) + *
+ *

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

+ *
    + *
  • getEnumCallable() + *
+ *
VerifyEnum

This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum() + * verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds + * with the same EnumResponse; otherwise, the RPC errors. + * + * This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run, + * although they are not guaranteed to be the same across separate Showcase server runs.

+ *

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

+ *
    + *
  • verifyEnum(EnumResponse request) + *
+ *

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

+ *
    + *
  • verifyEnumCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java index c93226be71..fe9d0d186f 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java @@ -82,19 +82,246 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Echo

This method simply echoes the request. This method showcases unary RPCs.

+ *

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

+ *
    + *
  • echo(EchoRequest request) + *
+ *

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

+ *
    + *
  • echoCallable() + *
+ *
EchoErrorDetails

This method returns error details in a repeated "google.protobuf.Any" + * field. This method showcases handling errors thus encoded, particularly + * over REST transport. Note that GAPICs only allow the type + * "google.protobuf.Any" for field paths ending in "error.details", and, at + * run-time, the actual types for these fields must be one of the types in + * google/rpc/error_details.proto.

+ *

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

+ *
    + *
  • echoErrorDetails(EchoErrorDetailsRequest request) + *
+ *

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

+ *
    + *
  • echoErrorDetailsCallable() + *
+ *
Expand

This method splits the given content into words and will pass each word back + * through the stream. This method showcases server-side streaming RPCs.

+ *

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

+ *
    + *
  • expandCallable() + *
+ *
Collect

This method will collect the words given to it. When the stream is closed + * by the client, this method will return the a concatenation of the strings + * passed to it. This method showcases client-side streaming RPCs.

+ *

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

+ *
    + *
  • collectCallable() + *
+ *
Chat

This method, upon receiving a request on the stream, will pass the same + * content back on the stream. This method showcases bidirectional + * streaming RPCs.

+ *

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

+ *
    + *
  • chatCallable() + *
+ *
PagedExpand

This is similar to the Expand method but instead of returning a stream of + * expanded words, this method returns a paged list of expanded words.

+ *

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

+ *
    + *
  • pagedExpand(PagedExpandRequest request) + *
+ *

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

+ *
    + *
  • pagedExpandPagedCallable() + *
  • pagedExpandCallable() + *
+ *
PagedExpandLegacy

This is similar to the PagedExpand except that it uses + * max_results instead of page_size, as some legacy APIs still + * do. New APIs should NOT use this pattern.

+ *

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

+ *
    + *
  • pagedExpandLegacy(PagedExpandLegacyRequest request) + *
+ *

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

+ *
    + *
  • pagedExpandLegacyCallable() + *
+ *
PagedExpandLegacyMapped

This method returns a map containing lists of words that appear in the input, keyed by their + * initial character. The only words returned are the ones included in the current page, + * as determined by page_token and page_size, which both refer to the word indices in the + * input. This paging result consisting of a map of lists is a pattern used by some legacy + * APIs. New APIs should NOT use this pattern.

+ *

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

+ *
    + *
  • pagedExpandLegacyMapped(PagedExpandRequest request) + *
+ *

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

+ *
    + *
  • pagedExpandLegacyMappedPagedCallable() + *
  • pagedExpandLegacyMappedCallable() + *
+ *
Wait

This method will wait for the requested amount of time and then return. + * This method showcases how a client handles a request timeout.

+ *

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

+ *
    + *
  • waitAsync(WaitRequest request) + *
+ *

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

+ *
    + *
  • waitOperationCallable() + *
  • waitCallable() + *
+ *
Block

This method will block (wait) for the requested amount of time + * and then return the response or error. + * This method showcases how a client handles delays or retries.

+ *

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

+ *
    + *
  • block(BlockRequest request) + *
+ *

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

+ *
    + *
  • blockCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java index 93777c8925..1f67d20e5b 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java @@ -66,19 +66,181 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateUser

Creates a user.

+ *

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

+ *
    + *
  • createUser(CreateUserRequest request) + *
+ *

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

+ *
    + *
  • createUser(String displayName, String email) + *
  • createUser(String displayName, String email, int age, String nickname, boolean enableNotifications, double heightFeet) + *
+ *

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

+ *
    + *
  • createUserCallable() + *
+ *
GetUser

Retrieves the User with the given uri.

+ *

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

+ *
    + *
  • getUser(GetUserRequest request) + *
+ *

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

+ *
    + *
  • getUser(UserName name) + *
  • getUser(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.

+ *
    + *
  • getUserCallable() + *
+ *
UpdateUser

Updates a user.

+ *

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

+ *
    + *
  • updateUser(UpdateUserRequest request) + *
+ *

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

+ *
    + *
  • updateUserCallable() + *
+ *
DeleteUser

Deletes a user, their profile, and all of their authored messages.

+ *

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

+ *
    + *
  • deleteUser(DeleteUserRequest request) + *
+ *

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

+ *
    + *
  • deleteUser(UserName name) + *
  • deleteUser(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.

+ *
    + *
  • deleteUserCallable() + *
+ *
ListUsers

Lists all users.

+ *

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

+ *
    + *
  • listUsers(ListUsersRequest request) + *
+ *

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

+ *
    + *
  • listUsersPagedCallable() + *
  • listUsersCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java index 38922dbca2..408e5b077c 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java @@ -77,19 +77,343 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateRoom

Creates a room.

+ *

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

+ *
    + *
  • createRoom(CreateRoomRequest request) + *
+ *

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

+ *
    + *
  • createRoom(String displayName, String description) + *
+ *

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

+ *
    + *
  • createRoomCallable() + *
+ *
GetRoom

Retrieves the Room with the given resource name.

+ *

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

+ *
    + *
  • getRoom(GetRoomRequest request) + *
+ *

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

+ *
    + *
  • getRoom(RoomName name) + *
  • getRoom(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.

+ *
    + *
  • getRoomCallable() + *
+ *
UpdateRoom

Updates a room.

+ *

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

+ *
    + *
  • updateRoom(UpdateRoomRequest request) + *
+ *

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

+ *
    + *
  • updateRoomCallable() + *
+ *
DeleteRoom

Deletes a room and all of its blurbs.

+ *

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

+ *
    + *
  • deleteRoom(DeleteRoomRequest request) + *
+ *

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

+ *
    + *
  • deleteRoom(RoomName name) + *
  • deleteRoom(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.

+ *
    + *
  • deleteRoomCallable() + *
+ *
ListRooms

Lists all chat rooms.

+ *

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

+ *
    + *
  • listRooms(ListRoomsRequest request) + *
+ *

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

+ *
    + *
  • listRoomsPagedCallable() + *
  • listRoomsCallable() + *
+ *
CreateBlurb

Creates a blurb. If the parent is a room, the blurb is understood to be a + * message in that room. If the parent is a profile, the blurb is understood + * to be a post on the profile.

+ *

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

+ *
    + *
  • createBlurb(CreateBlurbRequest request) + *
+ *

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

+ *
    + *
  • createBlurb(ProfileName parent, UserName user, ByteString image) + *
  • createBlurb(ProfileName parent, UserName user, String text) + *
  • createBlurb(ProfileName parent, String user, ByteString image) + *
  • createBlurb(ProfileName parent, String user, String text) + *
  • createBlurb(RoomName parent, UserName user, ByteString image) + *
  • createBlurb(RoomName parent, UserName user, String text) + *
  • createBlurb(RoomName parent, String user, ByteString image) + *
  • createBlurb(RoomName parent, String user, String text) + *
  • createBlurb(String parent, UserName user, ByteString image) + *
  • createBlurb(String parent, UserName user, String text) + *
  • createBlurb(String parent, String user, ByteString image) + *
  • createBlurb(String parent, String user, String text) + *
+ *

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

+ *
    + *
  • createBlurbCallable() + *
+ *
GetBlurb

Retrieves the Blurb with the given resource name.

+ *

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

+ *
    + *
  • getBlurb(GetBlurbRequest request) + *
+ *

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

+ *
    + *
  • getBlurb(BlurbName name) + *
  • getBlurb(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.

+ *
    + *
  • getBlurbCallable() + *
+ *
UpdateBlurb

Updates a blurb.

+ *

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

+ *
    + *
  • updateBlurb(UpdateBlurbRequest request) + *
+ *

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

+ *
    + *
  • updateBlurbCallable() + *
+ *
DeleteBlurb

Deletes a blurb.

+ *

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

+ *
    + *
  • deleteBlurb(DeleteBlurbRequest request) + *
+ *

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

+ *
    + *
  • deleteBlurb(BlurbName name) + *
  • deleteBlurb(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.

+ *
    + *
  • deleteBlurbCallable() + *
+ *
ListBlurbs

Lists blurbs for a specific chat room or user profile depending on the + * parent resource name.

+ *

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

+ *
    + *
  • listBlurbs(ListBlurbsRequest request) + *
+ *

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

+ *
    + *
  • listBlurbs(ProfileName parent) + *
  • listBlurbs(RoomName parent) + *
  • listBlurbs(String parent) + *
+ *

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

+ *
    + *
  • listBlurbsPagedCallable() + *
  • listBlurbsCallable() + *
+ *
SearchBlurbs

This method searches through all blurbs across all rooms and profiles + * for blurbs containing to words found in the query. Only posts that + * contain an exact match of a queried word will be returned.

+ *

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

+ *
    + *
  • searchBlurbsAsync(SearchBlurbsRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • searchBlurbsAsync(ProfileName parent, String query) + *
  • searchBlurbsAsync(RoomName parent, String query) + *
  • searchBlurbsAsync(String parent, String query) + *
+ *

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

+ *
    + *
  • searchBlurbsOperationCallable() + *
  • searchBlurbsCallable() + *
+ *
StreamBlurbs

This returns a stream that emits the blurbs that are created for a + * particular chat room or user profile.

+ *

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

+ *
    + *
  • streamBlurbsCallable() + *
+ *
SendBlurbs

This is a stream to create multiple blurbs. If an invalid blurb is + * requested to be created, the stream will close with an error.

+ *

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

+ *
    + *
  • sendBlurbsCallable() + *
+ *
Connect

This method starts a bidirectional stream that receives all blurbs that + * are being created after the stream has started and sends requests to create + * blurbs. If an invalid blurb is requested to be created, the stream will + * close with an error.

+ *

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

+ *
    + *
  • connectCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java index 3185e04cd4..9ab9076c8a 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java @@ -65,19 +65,198 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateSequence

Creates a sequence.

+ *

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

+ *
    + *
  • createSequence(CreateSequenceRequest request) + *
+ *

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

+ *
    + *
  • createSequence(Sequence sequence) + *
+ *

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

+ *
    + *
  • createSequenceCallable() + *
+ *
CreateStreamingSequence

Creates a sequence.

+ *

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

+ *
    + *
  • createStreamingSequence(CreateStreamingSequenceRequest request) + *
+ *

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

+ *
    + *
  • createStreamingSequence(StreamingSequence streamingSequence) + *
+ *

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

+ *
    + *
  • createStreamingSequenceCallable() + *
+ *
GetSequenceReport

Retrieves a sequence.

+ *

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

+ *
    + *
  • getSequenceReport(GetSequenceReportRequest request) + *
+ *

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

+ *
    + *
  • getSequenceReport(SequenceReportName name) + *
  • getSequenceReport(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.

+ *
    + *
  • getSequenceReportCallable() + *
+ *
GetStreamingSequenceReport

Retrieves a sequence.

+ *

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

+ *
    + *
  • getStreamingSequenceReport(GetStreamingSequenceReportRequest request) + *
+ *

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

+ *
    + *
  • getStreamingSequenceReport(StreamingSequenceReportName name) + *
  • getStreamingSequenceReport(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.

+ *
    + *
  • getStreamingSequenceReportCallable() + *
+ *
AttemptSequence

Attempts a sequence.

+ *

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

+ *
    + *
  • attemptSequence(AttemptSequenceRequest request) + *
+ *

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

+ *
    + *
  • attemptSequence(SequenceName name) + *
  • attemptSequence(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.

+ *
    + *
  • attemptSequenceCallable() + *
+ *
AttemptStreamingSequence

Attempts a streaming sequence.

+ *

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

+ *
    + *
  • attemptStreamingSequenceCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java index 9691ed234a..2d6dc12ac6 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java @@ -66,19 +66,219 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateSession

Creates a new testing session.

+ *

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

+ *
    + *
  • createSession(CreateSessionRequest request) + *
+ *

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

+ *
    + *
  • createSessionCallable() + *
+ *
GetSession

Gets a testing session.

+ *

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

+ *
    + *
  • getSession(GetSessionRequest request) + *
+ *

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

+ *
    + *
  • getSessionCallable() + *
+ *
ListSessions

Lists the current test sessions.

+ *

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

+ *
    + *
  • listSessions(ListSessionsRequest request) + *
+ *

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

+ *
    + *
  • listSessionsPagedCallable() + *
  • listSessionsCallable() + *
+ *
DeleteSession

Delete a test session.

+ *

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

+ *
    + *
  • deleteSession(DeleteSessionRequest request) + *
+ *

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

+ *
    + *
  • deleteSessionCallable() + *
+ *
ReportSession

Report on the status of a session. + * This generates a report detailing which tests have been completed, + * and an overall rollup.

+ *

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

+ *
    + *
  • reportSession(ReportSessionRequest request) + *
+ *

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

+ *
    + *
  • reportSessionCallable() + *
+ *
ListTests

List the tests of a sessesion.

+ *

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

+ *
    + *
  • listTests(ListTestsRequest request) + *
+ *

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

+ *
    + *
  • listTestsPagedCallable() + *
  • listTestsCallable() + *
+ *
DeleteTest

Explicitly decline to implement a test. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * This removes the test from subsequent `ListTests` calls, and + * attempting to do the test will error. + * + * This method will error if attempting to delete a required test.

+ *

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

+ *
    + *
  • deleteTest(DeleteTestRequest request) + *
+ *

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

+ *
    + *
  • deleteTestCallable() + *
+ *
VerifyTest

Register a response to a test. + * + * In cases where a test involves registering a final answer at the + * end of the test, this method provides the means to do so.

+ *

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

+ *
    + *
  • verifyTest(VerifyTestRequest request) + *
+ *

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

+ *
    + *
  • verifyTestCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * 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 0254061ebe..159caa5e68 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 @@ -57,19 +57,34 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListConnections

Lists connections that are currently active for the given Apigee Connect + * endpoint.

+ *

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

+ *
    + *
  • listConnections(ListConnectionsRequest request) + *
+ *

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

+ *
    + *
  • listConnections(EndpointName parent) + *
  • listConnections(String parent) + *
+ *

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

+ *
    + *
  • listConnectionsPagedCallable() + *
  • listConnectionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/TetherClient.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/TetherClient.java index d085337c32..f9fff0caf7 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/TetherClient.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/TetherClient.java @@ -61,19 +61,29 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Egress

Egress streams egress requests and responses. Logically, this is not + * actually a streaming request, but uses streaming as a mechanism to flip + * the client-server relationship of gRPC so that the server can act as a + * client. + * The listener, the RPC server, accepts connections from the dialer, + * the RPC client. + * The listener streams http requests and the dialer streams http responses.

+ *

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

+ *
    + *
  • egressCallable() + *
+ *
* *

See the individual methods for example code. * 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 bea5e6251a..237a5b6147 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 @@ -69,19 +69,411 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ExportAssets

Exports assets with time and resource types to a given Cloud Storage + * location/BigQuery table. For Cloud Storage location destinations, the + * output format is newline-delimited JSON. Each line represents a + * [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON format; for BigQuery table + * destinations, the output table stores the fields in asset Protobuf as + * columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] API, + * which allows you to keep track of the export. We recommend intervals of at + * least 2 seconds with exponential retry to poll the export operation result. + * For regular-size resource parent, the export operation usually finishes + * within 5 minutes.

+ *

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

+ *
    + *
  • exportAssetsAsync(ExportAssetsRequest request) + *
+ *

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

+ *
    + *
  • exportAssetsOperationCallable() + *
  • exportAssetsCallable() + *
+ *
ListAssets

Lists assets with time and resource types and returns paged results in + * response.

+ *

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

+ *
    + *
  • listAssets(ListAssetsRequest request) + *
+ *

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

+ *
    + *
  • listAssets(ResourceName parent) + *
  • listAssets(String parent) + *
+ *

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

+ *
    + *
  • listAssetsPagedCallable() + *
  • listAssetsCallable() + *
+ *
BatchGetAssetsHistory

Batch gets the update history of assets that overlap a time window. + * For IAM_POLICY content, this API outputs history when the asset and its + * attached IAM POLICY both exist. This can create gaps in the output history. + * Otherwise, this API outputs history with asset in both non-delete or + * deleted status. + * If a specified asset does not exist, this API returns an INVALID_ARGUMENT + * error.

+ *

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

+ *
    + *
  • batchGetAssetsHistory(BatchGetAssetsHistoryRequest request) + *
+ *

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

+ *
    + *
  • batchGetAssetsHistoryCallable() + *
+ *
CreateFeed

Creates a feed in a parent project/folder/organization to listen to its + * asset updates.

+ *

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

+ *
    + *
  • createFeed(CreateFeedRequest request) + *
+ *

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

+ *
    + *
  • createFeed(String parent) + *
+ *

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

+ *
    + *
  • createFeedCallable() + *
+ *
GetFeed

Gets details about an asset feed.

+ *

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

+ *
    + *
  • getFeed(GetFeedRequest request) + *
+ *

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

+ *
    + *
  • getFeed(FeedName name) + *
  • getFeed(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.

+ *
    + *
  • getFeedCallable() + *
+ *
ListFeeds

Lists all asset feeds in a parent project/folder/organization.

+ *

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

+ *
    + *
  • listFeeds(ListFeedsRequest request) + *
+ *

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

+ *
    + *
  • listFeeds(String parent) + *
+ *

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

+ *
    + *
  • listFeedsCallable() + *
+ *
UpdateFeed

Updates an asset feed configuration.

+ *

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

+ *
    + *
  • updateFeed(UpdateFeedRequest request) + *
+ *

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

+ *
    + *
  • updateFeed(Feed feed) + *
+ *

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

+ *
    + *
  • updateFeedCallable() + *
+ *
DeleteFeed

Deletes an asset feed.

+ *

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

+ *
    + *
  • deleteFeed(DeleteFeedRequest request) + *
+ *

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

+ *
    + *
  • deleteFeed(FeedName name) + *
  • deleteFeed(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.

+ *
    + *
  • deleteFeedCallable() + *
+ *
SearchAllResources

Searches all Cloud resources within the specified scope, such as a project, + * folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllResources` permission on the desired scope, + * otherwise the request will be rejected.

+ *

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

+ *
    + *
  • searchAllResources(SearchAllResourcesRequest request) + *
+ *

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

+ *
    + *
  • searchAllResources(String scope, String query, List assetTypes) + *
+ *

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

+ *
    + *
  • searchAllResourcesPagedCallable() + *
  • searchAllResourcesCallable() + *
+ *
SearchAllIamPolicies

Searches all IAM policies within the specified scope, such as a project, + * folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + * otherwise the request will be rejected.

+ *

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

+ *
    + *
  • searchAllIamPolicies(SearchAllIamPoliciesRequest request) + *
+ *

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

+ *
    + *
  • searchAllIamPolicies(String scope, String query) + *
+ *

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

+ *
    + *
  • searchAllIamPoliciesPagedCallable() + *
  • searchAllIamPoliciesCallable() + *
+ *
AnalyzeIamPolicy

Analyzes IAM policies to answer which identities have what accesses on + * which resources.

+ *

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

+ *
    + *
  • analyzeIamPolicy(AnalyzeIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • analyzeIamPolicyCallable() + *
+ *
AnalyzeIamPolicyLongrunning

Analyzes IAM policies asynchronously to answer which identities have what + * accesses on which resources, and writes the analysis results to a Google + * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + * output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the + * [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation + * status. We recommend intervals of at least 2 seconds with exponential + * backoff retry to poll the operation result. The metadata contains the + * metadata for the long-running operation.

+ *

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

+ *
    + *
  • analyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request) + *
+ *

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

+ *
    + *
  • analyzeIamPolicyLongrunningOperationCallable() + *
  • analyzeIamPolicyLongrunningCallable() + *
+ *
AnalyzeMove

Analyze moving a resource to a specified destination without kicking off + * the actual move. The analysis is best effort depending on the user's + * permissions of viewing different hierarchical policies and configurations. + * The policies and configuration are subject to change before the actual + * resource migration takes place.

+ *

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

+ *
    + *
  • analyzeMove(AnalyzeMoveRequest request) + *
+ *

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

+ *
    + *
  • analyzeMoveCallable() + *
+ *
QueryAssets

Issue a job that queries assets using a SQL statement compatible with + * [BigQuery Standard + * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * If the query execution finishes within timeout and there's no pagination, + * the full query results will be returned in the `QueryAssetsResponse`. + * + * Otherwise, full query results can be obtained by issuing extra requests + * with the `job_reference` from the a previous `QueryAssets` call. + * + * Note, the query result has approximately 10 GB limitation enforced by + * BigQuery + * https://cloud.google.com/bigquery/docs/best-practices-performance-output, + * queries return larger results will result in errors.

+ *

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

+ *
    + *
  • queryAssets(QueryAssetsRequest request) + *
+ *

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

+ *
    + *
  • queryAssetsCallable() + *
+ *
CreateSavedQuery

Creates a saved query in a parent project/folder/organization.

+ *

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

+ *
    + *
  • createSavedQuery(CreateSavedQueryRequest request) + *
+ *

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

+ *
    + *
  • createSavedQuery(FolderName parent, SavedQuery savedQuery, String savedQueryId) + *
  • createSavedQuery(OrganizationName parent, SavedQuery savedQuery, String savedQueryId) + *
  • createSavedQuery(ProjectName parent, SavedQuery savedQuery, String savedQueryId) + *
  • createSavedQuery(String parent, SavedQuery savedQuery, String savedQueryId) + *
+ *

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

+ *
    + *
  • createSavedQueryCallable() + *
+ *
GetSavedQuery

Gets details about a saved query.

+ *

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

+ *
    + *
  • getSavedQuery(GetSavedQueryRequest request) + *
+ *

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

+ *
    + *
  • getSavedQuery(SavedQueryName name) + *
  • getSavedQuery(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.

+ *
    + *
  • getSavedQueryCallable() + *
+ *
ListSavedQueries

Lists all saved queries in a parent project/folder/organization.

+ *

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

+ *
    + *
  • listSavedQueries(ListSavedQueriesRequest request) + *
+ *

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

+ *
    + *
  • listSavedQueries(FolderName parent) + *
  • listSavedQueries(OrganizationName parent) + *
  • listSavedQueries(ProjectName parent) + *
  • listSavedQueries(String parent) + *
+ *

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

+ *
    + *
  • listSavedQueriesPagedCallable() + *
  • listSavedQueriesCallable() + *
+ *
UpdateSavedQuery

Updates a saved query.

+ *

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

+ *
    + *
  • updateSavedQuery(UpdateSavedQueryRequest request) + *
+ *

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

+ *
    + *
  • updateSavedQuery(SavedQuery savedQuery, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateSavedQueryCallable() + *
+ *
DeleteSavedQuery

Deletes a saved query.

+ *

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

+ *
    + *
  • deleteSavedQuery(DeleteSavedQueryRequest request) + *
+ *

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

+ *
    + *
  • deleteSavedQuery(SavedQueryName name) + *
  • deleteSavedQuery(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.

+ *
    + *
  • deleteSavedQueryCallable() + *
+ *
BatchGetEffectiveIamPolicies

Gets effective IAM policies for a batch of resources.

+ *

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

+ *
    + *
  • batchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest request) + *
+ *

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

+ *
    + *
  • batchGetEffectiveIamPoliciesCallable() + *
+ *
* *

See the individual methods for example code. * 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 34257fb4cd..7a919c82df 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 @@ -71,19 +71,142 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ReadRows

Streams back the contents of all requested rows in key order, optionally + * applying the same Reader filter to each. Depending on their size, + * rows and cells may be broken up across multiple responses, but + * atomicity of each row will still be preserved. See the + * ReadRowsResponse documentation for details.

+ *

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

+ *
    + *
  • readRowsCallable() + *
+ *
SampleRowKeys

Returns a sample of row keys in the table. The returned row keys will + * delimit contiguous sections of the table of approximately equal size, + * which can be used to break up the data for distributed tasks like + * mapreduces.

+ *

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

+ *
    + *
  • sampleRowKeysCallable() + *
+ *
MutateRow

Mutates a row atomically. Cells already present in the row are left + * unchanged unless explicitly changed by `mutation`.

+ *

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

+ *
    + *
  • mutateRow(MutateRowRequest request) + *
+ *

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

+ *
    + *
  • mutateRow(TableName tableName, ByteString rowKey, List mutations) + *
  • mutateRow(String tableName, ByteString rowKey, List mutations) + *
  • mutateRow(TableName tableName, ByteString rowKey, List mutations, String appProfileId) + *
  • mutateRow(String tableName, ByteString rowKey, List mutations, String appProfileId) + *
+ *

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

+ *
    + *
  • mutateRowCallable() + *
+ *
MutateRows

Mutates multiple rows in a batch. Each individual row is mutated + * atomically as in MutateRow, but the entire batch is not executed + * atomically.

+ *

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

+ *
    + *
  • mutateRowsCallable() + *
+ *
CheckAndMutateRow

Mutates a row atomically based on the output of a predicate Reader filter.

+ *

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

+ *
    + *
  • checkAndMutateRow(CheckAndMutateRowRequest request) + *
+ *

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

+ *
    + *
  • checkAndMutateRow(TableName tableName, ByteString rowKey, RowFilter predicateFilter, List trueMutations, List falseMutations) + *
  • checkAndMutateRow(String tableName, ByteString rowKey, RowFilter predicateFilter, List trueMutations, List falseMutations) + *
  • checkAndMutateRow(TableName tableName, ByteString rowKey, RowFilter predicateFilter, List trueMutations, List falseMutations, String appProfileId) + *
  • checkAndMutateRow(String tableName, ByteString rowKey, RowFilter predicateFilter, List trueMutations, List falseMutations, String appProfileId) + *
+ *

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

+ *
    + *
  • checkAndMutateRowCallable() + *
+ *
PingAndWarm

Warm up associated instance metadata for this connection. + * This call is not required but may be useful for connection keep-alive.

+ *

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

+ *
    + *
  • pingAndWarm(PingAndWarmRequest request) + *
+ *

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

+ *
    + *
  • pingAndWarm(InstanceName name) + *
  • pingAndWarm(String name) + *
  • pingAndWarm(InstanceName name, String appProfileId) + *
  • pingAndWarm(String name, String appProfileId) + *
+ *

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

+ *
    + *
  • pingAndWarmCallable() + *
+ *
ReadModifyWriteRow

Modifies a row atomically on the server. The method reads the latest + * existing timestamp and value from the specified columns and writes a new + * entry based on pre-defined read/modify/write rules. The new value for the + * timestamp is the greater of the existing timestamp or the current server + * time. The method returns the new contents of all modified cells.

+ *

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

+ *
    + *
  • readModifyWriteRow(ReadModifyWriteRowRequest request) + *
+ *

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

+ *
    + *
  • readModifyWriteRow(TableName tableName, ByteString rowKey, List rules) + *
  • readModifyWriteRow(String tableName, ByteString rowKey, List rules) + *
  • readModifyWriteRow(TableName tableName, ByteString rowKey, List rules, String appProfileId) + *
  • readModifyWriteRow(String tableName, ByteString rowKey, List rules, String appProfileId) + *
+ *

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

+ *
    + *
  • readModifyWriteRowCallable() + *
+ *
* *

See the individual methods for example code. * 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 7da6db9b67..49d630f108 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 @@ -63,19 +63,89 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
AggregatedList

Retrieves an aggregated list of addresses.

+ *

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

+ *
    + *
  • aggregatedList(AggregatedListAddressesRequest request) + *
+ *

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

+ *
    + *
  • aggregatedList(String project) + *
+ *

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

+ *
    + *
  • aggregatedListPagedCallable() + *
  • aggregatedListCallable() + *
+ *
Delete

Deletes the specified address resource.

+ *

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

+ *
    + *
  • deleteAsync(DeleteAddressRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteAsync(String project, String region, String address) + *
+ *

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

+ *
    + *
  • deleteOperationCallable() + *
  • deleteCallable() + *
+ *
Insert

Creates an address resource in the specified project by using the data included in the request.

+ *

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

+ *
    + *
  • insertAsync(InsertAddressRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • insertAsync(String project, String region, Address addressResource) + *
+ *

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

+ *
    + *
  • insertOperationCallable() + *
  • insertCallable() + *
+ *
List

Retrieves a list of addresses contained within the specified region.

+ *

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

+ *
    + *
  • list(ListAddressesRequest request) + *
+ *

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

+ *
    + *
  • list(String project, String region, String orderBy) + *
+ *

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

+ *
    + *
  • listPagedCallable() + *
  • listCallable() + *
+ *
* *

See the individual methods for example code. * 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 d74718729f..2dcf79a74b 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 @@ -49,19 +49,53 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Get

Retrieves the specified region-specific Operations resource.

+ *

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

+ *
    + *
  • get(GetRegionOperationRequest request) + *
+ *

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

+ *
    + *
  • get(String project, String region, String operation) + *
+ *

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

+ *
    + *
  • getCallable() + *
+ *
Wait

Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * This method is called on a best-effort basis. Specifically: + * - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. + * - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.

+ *

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

+ *
    + *
  • wait(WaitRegionOperationRequest request) + *
+ *

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

+ *
    + *
  • wait(String project, String region, String operation) + *
+ *

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

+ *
    + *
  • waitCallable() + *
+ *
* *

See the individual methods for example code. * 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 aa18c91623..4306642718 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 @@ -60,19 +60,89 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GenerateAccessToken

Generates an OAuth 2.0 access token for a service account.

+ *

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

+ *
    + *
  • generateAccessToken(GenerateAccessTokenRequest request) + *
+ *

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

+ *
    + *
  • generateAccessToken(ServiceAccountName name, List delegates, List scope, Duration lifetime) + *
  • generateAccessToken(String name, List delegates, List scope, Duration lifetime) + *
+ *

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

+ *
    + *
  • generateAccessTokenCallable() + *
+ *
GenerateIdToken

Generates an OpenID Connect ID token for a service account.

+ *

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

+ *
    + *
  • generateIdToken(GenerateIdTokenRequest request) + *
+ *

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

+ *
    + *
  • generateIdToken(ServiceAccountName name, List delegates, String audience, boolean includeEmail) + *
  • generateIdToken(String name, List delegates, String audience, boolean includeEmail) + *
+ *

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

+ *
    + *
  • generateIdTokenCallable() + *
+ *
SignBlob

Signs a blob using a service account's system-managed private key.

+ *

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

+ *
    + *
  • signBlob(SignBlobRequest request) + *
+ *

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

+ *
    + *
  • signBlob(ServiceAccountName name, List delegates, ByteString payload) + *
  • signBlob(String name, List delegates, ByteString payload) + *
+ *

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

+ *
    + *
  • signBlobCallable() + *
+ *
SignJwt

Signs a JWT using a service account's system-managed private key.

+ *

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

+ *
    + *
  • signJwt(SignJwtRequest request) + *
+ *

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

+ *
    + *
  • signJwt(ServiceAccountName name, List delegates, String payload) + *
  • signJwt(String name, List delegates, String payload) + *
+ *

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

+ *
    + *
  • signJwtCallable() + *
+ *
* *

See the individual methods for example code. * 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 43009b89f4..066f37362b 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 @@ -72,19 +72,66 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
SetIamPolicy

Sets the access control policy on the specified resource. Replaces any + * existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * 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 23f83c2389..bccc7ff3d5 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 @@ -80,19 +80,588 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListKeyRings

Lists [KeyRings][google.cloud.kms.v1.KeyRing].

+ *

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

+ *
    + *
  • listKeyRings(ListKeyRingsRequest request) + *
+ *

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

+ *
    + *
  • listKeyRings(LocationName parent) + *
  • listKeyRings(String parent) + *
+ *

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

+ *
    + *
  • listKeyRingsPagedCallable() + *
  • listKeyRingsCallable() + *
+ *
ListCryptoKeys

Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].

+ *

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

+ *
    + *
  • listCryptoKeys(ListCryptoKeysRequest request) + *
+ *

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

+ *
    + *
  • listCryptoKeys(KeyRingName parent) + *
  • listCryptoKeys(String parent) + *
+ *

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

+ *
    + *
  • listCryptoKeysPagedCallable() + *
  • listCryptoKeysCallable() + *
+ *
ListCryptoKeyVersions

Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].

+ *

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

+ *
    + *
  • listCryptoKeyVersions(ListCryptoKeyVersionsRequest request) + *
+ *

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

+ *
    + *
  • listCryptoKeyVersions(CryptoKeyName parent) + *
  • listCryptoKeyVersions(String parent) + *
+ *

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

+ *
    + *
  • listCryptoKeyVersionsPagedCallable() + *
  • listCryptoKeyVersionsCallable() + *
+ *
ListImportJobs

Lists [ImportJobs][google.cloud.kms.v1.ImportJob].

+ *

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

+ *
    + *
  • listImportJobs(ListImportJobsRequest request) + *
+ *

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

+ *
    + *
  • listImportJobs(KeyRingName parent) + *
  • listImportJobs(String parent) + *
+ *

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

+ *
    + *
  • listImportJobsPagedCallable() + *
  • listImportJobsCallable() + *
+ *
GetKeyRing

Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].

+ *

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

+ *
    + *
  • getKeyRing(GetKeyRingRequest request) + *
+ *

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

+ *
    + *
  • getKeyRing(KeyRingName name) + *
  • getKeyRing(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.

+ *
    + *
  • getKeyRingCallable() + *
+ *
GetCryptoKey

Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as + * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

+ *

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

+ *
    + *
  • getCryptoKey(GetCryptoKeyRequest request) + *
+ *

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

+ *
    + *
  • getCryptoKey(CryptoKeyName name) + *
  • getCryptoKey(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.

+ *
    + *
  • getCryptoKeyCallable() + *
+ *
GetCryptoKeyVersion

Returns metadata for a given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

+ *

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

+ *
    + *
  • getCryptoKeyVersion(GetCryptoKeyVersionRequest request) + *
+ *

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

+ *
    + *
  • getCryptoKeyVersion(CryptoKeyVersionName name) + *
  • getCryptoKeyVersion(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.

+ *
    + *
  • getCryptoKeyVersionCallable() + *
+ *
GetPublicKey

Returns the public key for the given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] + * or + * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].

+ *

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

+ *
    + *
  • getPublicKey(GetPublicKeyRequest request) + *
+ *

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

+ *
    + *
  • getPublicKey(CryptoKeyVersionName name) + *
  • getPublicKey(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.

+ *
    + *
  • getPublicKeyCallable() + *
+ *
GetImportJob

Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].

+ *

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

+ *
    + *
  • getImportJob(GetImportJobRequest request) + *
+ *

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

+ *
    + *
  • getImportJob(ImportJobName name) + *
  • getImportJob(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.

+ *
    + *
  • getImportJobCallable() + *
+ *
CreateKeyRing

Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and + * Location.

+ *

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

+ *
    + *
  • createKeyRing(CreateKeyRingRequest request) + *
+ *

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

+ *
    + *
  • createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) + *
  • createKeyRing(String parent, String keyRingId, KeyRing keyRing) + *
+ *

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

+ *
    + *
  • createKeyRingCallable() + *
+ *
CreateCryptoKey

Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + * are required.

+ *

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

+ *
    + *
  • createCryptoKey(CreateCryptoKeyRequest request) + *
+ *

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

+ *
    + *
  • createCryptoKey(KeyRingName parent, String cryptoKeyId, CryptoKey cryptoKey) + *
  • createCryptoKey(String parent, String cryptoKeyId, CryptoKey cryptoKey) + *
+ *

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

+ *
    + *
  • createCryptoKeyCallable() + *
+ *
CreateCryptoKeyVersion

Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The server will assign the next sequential id. If unset, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED].

+ *

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

+ *
    + *
  • createCryptoKeyVersion(CreateCryptoKeyVersionRequest request) + *
+ *

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

+ *
    + *
  • createCryptoKeyVersion(CryptoKeyName parent, CryptoKeyVersion cryptoKeyVersion) + *
  • createCryptoKeyVersion(String parent, CryptoKeyVersion cryptoKeyVersion) + *
+ *

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

+ *
    + *
  • createCryptoKeyVersionCallable() + *
+ *
ImportCryptoKeyVersion

Imports a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] into + * an existing [CryptoKey][google.cloud.kms.v1.CryptoKey] using the wrapped + * key material provided in the request. + * + * The version ID will be assigned the next sequential id within the + * [CryptoKey][google.cloud.kms.v1.CryptoKey].

+ *

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

+ *
    + *
  • importCryptoKeyVersion(ImportCryptoKeyVersionRequest request) + *
+ *

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

+ *
    + *
  • importCryptoKeyVersionCallable() + *
+ *
CreateImportJob

Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is + * required.

+ *

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

+ *
    + *
  • createImportJob(CreateImportJobRequest request) + *
+ *

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

+ *
    + *
  • createImportJob(KeyRingName parent, String importJobId, ImportJob importJob) + *
  • createImportJob(String parent, String importJobId, ImportJob importJob) + *
+ *

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

+ *
    + *
  • createImportJobCallable() + *
+ *
UpdateCryptoKey

Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].

+ *

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

+ *
    + *
  • updateCryptoKey(UpdateCryptoKeyRequest request) + *
+ *

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

+ *
    + *
  • updateCryptoKey(CryptoKey cryptoKey, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCryptoKeyCallable() + *
+ *
UpdateCryptoKeyVersion

Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s + * metadata. + * + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * and + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + * using this method. See + * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] + * and + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * to move between other states.

+ *

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

+ *
    + *
  • updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request) + *
+ *

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

+ *
    + *
  • updateCryptoKeyVersion(CryptoKeyVersion cryptoKeyVersion, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCryptoKeyVersionCallable() + *
+ *
Encrypt

Encrypts data, so that it can only be recovered by a call to + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].

+ *

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

+ *
    + *
  • encrypt(EncryptRequest request) + *
+ *

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

+ *
    + *
  • encrypt(ResourceName name, ByteString plaintext) + *
  • encrypt(String name, ByteString plaintext) + *
+ *

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

+ *
    + *
  • encryptCallable() + *
+ *
Decrypt

Decrypts data that was protected by + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].

+ *

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

+ *
    + *
  • decrypt(DecryptRequest request) + *
+ *

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

+ *
    + *
  • decrypt(CryptoKeyName name, ByteString ciphertext) + *
  • decrypt(String name, ByteString ciphertext) + *
+ *

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

+ *
    + *
  • decryptCallable() + *
+ *
AsymmetricSign

Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_SIGN, producing a signature that can be verified with the public + * key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].

+ *

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

+ *
    + *
  • asymmetricSign(AsymmetricSignRequest request) + *
+ *

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

+ *
    + *
  • asymmetricSign(CryptoKeyVersionName name, Digest digest) + *
  • asymmetricSign(String name, Digest digest) + *
+ *

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

+ *
    + *
  • asymmetricSignCallable() + *
+ *
AsymmetricDecrypt

Decrypts data that was encrypted with a public key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_DECRYPT.

+ *

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

+ *
    + *
  • asymmetricDecrypt(AsymmetricDecryptRequest request) + *
+ *

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

+ *
    + *
  • asymmetricDecrypt(CryptoKeyVersionName name, ByteString ciphertext) + *
  • asymmetricDecrypt(String name, ByteString ciphertext) + *
+ *

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

+ *
    + *
  • asymmetricDecryptCallable() + *
+ *
UpdateCryptoKeyPrimaryVersion

Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that + * will be used in + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + * + * Returns an error if called on an asymmetric key.

+ *

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

+ *
    + *
  • updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request) + *
+ *

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

+ *
    + *
  • updateCryptoKeyPrimaryVersion(CryptoKeyName name, String cryptoKeyVersionId) + *
  • updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) + *
+ *

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

+ *
    + *
  • updateCryptoKeyPrimaryVersionCallable() + *
+ *
DestroyCryptoKeyVersion

Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for + * destruction. + * + * Upon calling this method, + * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will + * be set to + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be set to a time 24 hours in the future, at which point the + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be changed to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], + * and the key material will be irrevocably destroyed. + * + * Before the + * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is + * reached, + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * may be called to reverse the process.

+ *

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

+ *
    + *
  • destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request) + *
+ *

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

+ *
    + *
  • destroyCryptoKeyVersion(CryptoKeyVersionName name) + *
  • destroyCryptoKeyVersion(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.

+ *
    + *
  • destroyCryptoKeyVersionCallable() + *
+ *
RestoreCryptoKeyVersion

Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state. + * + * Upon restoration of the CryptoKeyVersion, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be cleared.

+ *

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

+ *
    + *
  • restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request) + *
+ *

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

+ *
    + *
  • restoreCryptoKeyVersion(CryptoKeyVersionName name) + *
  • restoreCryptoKeyVersion(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.

+ *
    + *
  • restoreCryptoKeyVersionCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. ADDED ONLY FOR MIXIN TESTS. + * Returns an empty policy if the resource exists and does not have a policy + * set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
TestIamPermissions

This is a different comment for TestIamPermissions in the yaml file that should clobber the documentation in iam_policy.proto.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * 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 0796286c2e..9f1485abfa 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 @@ -80,19 +80,232 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateShelf

Creates a shelf, and returns the new Shelf.

+ *

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

+ *
    + *
  • createShelf(CreateShelfRequest request) + *
+ *

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

+ *
    + *
  • createShelf(Shelf shelf) + *
+ *

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

+ *
    + *
  • createShelfCallable() + *
+ *
GetShelf

Gets a shelf. Returns NOT_FOUND if the shelf does not exist.

+ *

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

+ *
    + *
  • getShelf(GetShelfRequest request) + *
+ *

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

+ *
    + *
  • getShelf(ShelfName name) + *
  • getShelf(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.

+ *
    + *
  • getShelfCallable() + *
+ *
ListShelves

Lists shelves. The order is unspecified but deterministic. Newly created + * shelves will not necessarily be added to the end of this list.

+ *

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

+ *
    + *
  • listShelves(ListShelvesRequest request) + *
+ *

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

+ *
    + *
  • listShelvesPagedCallable() + *
  • listShelvesCallable() + *
+ *
DeleteShelf

Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.

+ *

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

+ *
    + *
  • deleteShelf(DeleteShelfRequest request) + *
+ *

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

+ *
    + *
  • deleteShelf(ShelfName name) + *
  • deleteShelf(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.

+ *
    + *
  • deleteShelfCallable() + *
+ *
MergeShelves

Merges two shelves by adding all books from the shelf named + * `other_shelf_name` to shelf `name`, and deletes + * `other_shelf_name`. Returns the updated shelf. + * The book ids of the moved books may not be the same as the original books. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Returns NOT_FOUND if either shelf does not exist. + * This call is a no-op if the specified shelves are the same.

+ *

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

+ *
    + *
  • mergeShelves(MergeShelvesRequest request) + *
+ *

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

+ *
    + *
  • mergeShelves(ShelfName name, ShelfName otherShelf) + *
  • mergeShelves(ShelfName name, String otherShelf) + *
  • mergeShelves(String name, ShelfName otherShelf) + *
  • mergeShelves(String name, String otherShelf) + *
+ *

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

+ *
    + *
  • mergeShelvesCallable() + *
+ *
CreateBook

Creates a book, and returns the new Book.

+ *

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

+ *
    + *
  • createBook(CreateBookRequest request) + *
+ *

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

+ *
    + *
  • createBook(ShelfName parent, Book book) + *
  • createBook(String parent, Book book) + *
+ *

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

+ *
    + *
  • createBookCallable() + *
+ *
GetBook

Gets a book. Returns NOT_FOUND if the book does not exist.

+ *

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

+ *
    + *
  • getBook(GetBookRequest request) + *
+ *

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

+ *
    + *
  • getBook(BookName name) + *
  • getBook(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.

+ *
    + *
  • getBookCallable() + *
+ *
ListBooks

Lists books in a shelf. The order is unspecified but deterministic. Newly + * created books will not necessarily be added to the end of this list. + * Returns NOT_FOUND if the shelf does not exist.

+ *

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

+ *
    + *
  • listBooks(ListBooksRequest request) + *
+ *

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

+ *
    + *
  • listBooks(ShelfName parent) + *
  • listBooks(String parent) + *
+ *

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

+ *
    + *
  • listBooksPagedCallable() + *
  • listBooksCallable() + *
+ *
DeleteBook

Deletes a book. Returns NOT_FOUND if the book does not exist.

+ *

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

+ *
    + *
  • deleteBook(DeleteBookRequest request) + *
+ *

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

+ *
    + *
  • deleteBook(BookName name) + *
  • deleteBook(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.

+ *
    + *
  • deleteBookCallable() + *
+ *
UpdateBook

Updates a book. Returns INVALID_ARGUMENT if the name of the book + * is non-empty and does not equal the existing name.

+ *

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

+ *
    + *
  • updateBook(UpdateBookRequest request) + *
+ *

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

+ *
    + *
  • updateBook(Book book, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateBookCallable() + *
+ *
MoveBook

Moves a book to another shelf, and returns the new book. The book + * id of the new book may not be the same as the original book.

+ *

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

+ *
    + *
  • moveBook(MoveBookRequest request) + *
+ *

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

+ *
    + *
  • moveBook(BookName name, ShelfName otherShelfName) + *
  • moveBook(BookName name, String otherShelfName) + *
  • moveBook(String name, ShelfName otherShelfName) + *
  • moveBook(String name, String otherShelfName) + *
+ *

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

+ *
    + *
  • moveBookCallable() + *
+ *
* *

See the individual methods for example code. * 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 72aa8590aa..dc3f61327a 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 @@ -114,19 +114,548 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListBuckets

Lists log buckets.

+ *

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

+ *
    + *
  • listBuckets(ListBucketsRequest request) + *
+ *

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

+ *
    + *
  • listBuckets(BillingAccountLocationName parent) + *
  • listBuckets(FolderLocationName parent) + *
  • listBuckets(LocationName parent) + *
  • listBuckets(OrganizationLocationName parent) + *
  • listBuckets(String parent) + *
+ *

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

+ *
    + *
  • listBucketsPagedCallable() + *
  • listBucketsCallable() + *
+ *
GetBucket

Gets a log bucket.

+ *

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

+ *
    + *
  • getBucket(GetBucketRequest request) + *
+ *

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

+ *
    + *
  • getBucketCallable() + *
+ *
CreateBucket

Creates a log bucket that can be used to store log entries. After a bucket + * has been created, the bucket's location cannot be changed.

+ *

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

+ *
    + *
  • createBucket(CreateBucketRequest request) + *
+ *

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

+ *
    + *
  • createBucketCallable() + *
+ *
UpdateBucket

Updates a log bucket. This method replaces the following fields in the + * existing bucket with values from the new bucket: `retention_period` * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * If the retention period is decreased and the bucket is locked, + * `FAILED_PRECONDITION` will be returned. + * + * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + * `FAILED_PRECONDITION` will be returned. + * + * After a bucket has been created, the bucket's location cannot be changed.

+ *

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

+ *
    + *
  • updateBucket(UpdateBucketRequest request) + *
+ *

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

+ *
    + *
  • updateBucketCallable() + *
+ *
DeleteBucket

Deletes a log bucket. + * + * Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. + * After 7 days, the bucket will be purged and all log entries in the bucket + * will be permanently deleted.

+ *

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

+ *
    + *
  • deleteBucket(DeleteBucketRequest request) + *
+ *

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

+ *
    + *
  • deleteBucketCallable() + *
+ *
UndeleteBucket

Undeletes a log bucket. A bucket that has been deleted can be undeleted + * within the grace period of 7 days.

+ *

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

+ *
    + *
  • undeleteBucket(UndeleteBucketRequest request) + *
+ *

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

+ *
    + *
  • undeleteBucketCallable() + *
+ *
ListViews

Lists views on a log bucket.

+ *

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

+ *
    + *
  • listViews(ListViewsRequest request) + *
+ *

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

+ *
    + *
  • listViews(String parent) + *
+ *

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

+ *
    + *
  • listViewsPagedCallable() + *
  • listViewsCallable() + *
+ *
GetView

Gets a view on a log bucket..

+ *

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

+ *
    + *
  • getView(GetViewRequest request) + *
+ *

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

+ *
    + *
  • getViewCallable() + *
+ *
CreateView

Creates a view over log entries in a log bucket. A bucket may contain a + * maximum of 30 views.

+ *

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

+ *
    + *
  • createView(CreateViewRequest request) + *
+ *

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

+ *
    + *
  • createViewCallable() + *
+ *
UpdateView

Updates a view on a log bucket. This method replaces the following fields + * in the existing view with values from the new view: `filter`. + * If an `UNAVAILABLE` error is returned, this indicates that system is not in + * a state where it can update the view. If this occurs, please try again in a + * few minutes.

+ *

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

+ *
    + *
  • updateView(UpdateViewRequest request) + *
+ *

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

+ *
    + *
  • updateViewCallable() + *
+ *
DeleteView

Deletes a view on a log bucket. + * If an `UNAVAILABLE` error is returned, this indicates that system is not in + * a state where it can delete the view. If this occurs, please try again in a + * few minutes.

+ *

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

+ *
    + *
  • deleteView(DeleteViewRequest request) + *
+ *

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

+ *
    + *
  • deleteViewCallable() + *
+ *
ListSinks

Lists sinks.

+ *

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

+ *
    + *
  • listSinks(ListSinksRequest request) + *
+ *

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

+ *
    + *
  • listSinks(BillingAccountName parent) + *
  • listSinks(FolderName parent) + *
  • listSinks(OrganizationName parent) + *
  • listSinks(ProjectName parent) + *
  • listSinks(String parent) + *
+ *

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

+ *
    + *
  • listSinksPagedCallable() + *
  • listSinksCallable() + *
+ *
GetSink

Gets a sink.

+ *

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

+ *
    + *
  • getSink(GetSinkRequest request) + *
+ *

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

+ *
    + *
  • getSink(LogSinkName sinkName) + *
  • getSink(String sinkName) + *
+ *

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

+ *
    + *
  • getSinkCallable() + *
+ *
CreateSink

Creates a sink that exports specified log entries to a destination. The + * export of newly-ingested log entries begins immediately, unless the sink's + * `writer_identity` is not permitted to write to the destination. A sink can + * export log entries only from the resource owning the sink.

+ *

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

+ *
    + *
  • createSink(CreateSinkRequest request) + *
+ *

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

+ *
    + *
  • createSink(BillingAccountName parent, LogSink sink) + *
  • createSink(FolderName parent, LogSink sink) + *
  • createSink(OrganizationName parent, LogSink sink) + *
  • createSink(ProjectName parent, LogSink sink) + *
  • createSink(String parent, LogSink sink) + *
+ *

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

+ *
    + *
  • createSinkCallable() + *
+ *
UpdateSink

Updates a sink. This method replaces the following fields in the existing + * sink with values from the new sink: `destination`, and `filter`. + * + * The updated sink might also have a new `writer_identity`; see the + * `unique_writer_identity` field.

+ *

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

+ *
    + *
  • updateSink(UpdateSinkRequest request) + *
+ *

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

+ *
    + *
  • updateSink(LogSinkName sinkName, LogSink sink) + *
  • updateSink(String sinkName, LogSink sink) + *
  • updateSink(LogSinkName sinkName, LogSink sink, FieldMask updateMask) + *
  • updateSink(String sinkName, LogSink sink, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateSinkCallable() + *
+ *
DeleteSink

Deletes a sink. If the sink has a unique `writer_identity`, then that + * service account is also deleted.

+ *

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

+ *
    + *
  • deleteSink(DeleteSinkRequest request) + *
+ *

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

+ *
    + *
  • deleteSink(LogSinkName sinkName) + *
  • deleteSink(String sinkName) + *
+ *

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

+ *
    + *
  • deleteSinkCallable() + *
+ *
ListExclusions

Lists all the exclusions on the _Default sink in a parent resource.

+ *

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

+ *
    + *
  • listExclusions(ListExclusionsRequest request) + *
+ *

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

+ *
    + *
  • listExclusions(BillingAccountName parent) + *
  • listExclusions(FolderName parent) + *
  • listExclusions(OrganizationName parent) + *
  • listExclusions(ProjectName parent) + *
  • listExclusions(String parent) + *
+ *

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

+ *
    + *
  • listExclusionsPagedCallable() + *
  • listExclusionsCallable() + *
+ *
GetExclusion

Gets the description of an exclusion in the _Default sink.

+ *

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

+ *
    + *
  • getExclusion(GetExclusionRequest request) + *
+ *

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

+ *
    + *
  • getExclusion(LogExclusionName name) + *
  • getExclusion(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.

+ *
    + *
  • getExclusionCallable() + *
+ *
CreateExclusion

Creates a new exclusion in the _Default sink in a specified parent + * resource. Only log entries belonging to that resource can be excluded. You + * can have up to 10 exclusions in a resource.

+ *

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

+ *
    + *
  • createExclusion(CreateExclusionRequest request) + *
+ *

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

+ *
    + *
  • createExclusion(BillingAccountName parent, LogExclusion exclusion) + *
  • createExclusion(FolderName parent, LogExclusion exclusion) + *
  • createExclusion(OrganizationName parent, LogExclusion exclusion) + *
  • createExclusion(ProjectName parent, LogExclusion exclusion) + *
  • createExclusion(String parent, LogExclusion exclusion) + *
+ *

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

+ *
    + *
  • createExclusionCallable() + *
+ *
UpdateExclusion

Changes one or more properties of an existing exclusion in the _Default + * sink.

+ *

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

+ *
    + *
  • updateExclusion(UpdateExclusionRequest request) + *
+ *

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

+ *
    + *
  • updateExclusion(LogExclusionName name, LogExclusion exclusion, FieldMask updateMask) + *
  • updateExclusion(String name, LogExclusion exclusion, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateExclusionCallable() + *
+ *
DeleteExclusion

Deletes an exclusion in the _Default sink.

+ *

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

+ *
    + *
  • deleteExclusion(DeleteExclusionRequest request) + *
+ *

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

+ *
    + *
  • deleteExclusion(LogExclusionName name) + *
  • deleteExclusion(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.

+ *
    + *
  • deleteExclusionCallable() + *
+ *
GetCmekSettings

Gets the Logging CMEK settings for the given resource. + * + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information.

+ *

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

+ *
    + *
  • getCmekSettings(GetCmekSettingsRequest request) + *
+ *

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

+ *
    + *
  • getCmekSettingsCallable() + *
+ *
UpdateCmekSettings

Updates the Log Router CMEK settings for the given resource. + * + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information.

+ *

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

+ *
    + *
  • updateCmekSettings(UpdateCmekSettingsRequest request) + *
+ *

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

+ *
    + *
  • updateCmekSettingsCallable() + *
+ *
GetSettings

Gets the Log Router settings for the given resource. + * + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, 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. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information.

+ *

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

+ *
    + *
  • getSettings(GetSettingsRequest request) + *
+ *

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

+ *
    + *
  • getSettings(SettingsName name) + *
  • getSettings(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.

+ *
    + *
  • getSettingsCallable() + *
+ *
UpdateSettings

Updates the Log Router settings for the given resource. + * + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. 4) `location_id` is not supported by + * Logging. 5) `location_id` violate OrgPolicy. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information.

+ *

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

+ *
    + *
  • updateSettings(UpdateSettingsRequest request) + *
+ *

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

+ *
    + *
  • updateSettings(Settings settings, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateSettingsCallable() + *
+ *
CopyLogEntries

Copies a set of log entries from a log bucket to a Cloud Storage bucket.

+ *

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

+ *
    + *
  • copyLogEntriesAsync(CopyLogEntriesRequest request) + *
+ *

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

+ *
    + *
  • copyLogEntriesOperationCallable() + *
  • copyLogEntriesCallable() + *
+ *
* *

See the individual methods for example code. * 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 642d2947a5..6690d5c40f 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 @@ -76,19 +76,132 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
DeleteLog

Deletes all the log entries in a log for the _Default Log Bucket. The log + * reappears if it receives new entries. Log entries written shortly before + * the delete operation might not be deleted. Entries received after the + * delete operation with a timestamp before the operation will be deleted.

+ *

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

+ *
    + *
  • deleteLog(DeleteLogRequest request) + *
+ *

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

+ *
    + *
  • deleteLog(LogName logName) + *
  • deleteLog(String logName) + *
+ *

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

+ *
    + *
  • deleteLogCallable() + *
+ *
WriteLogEntries

Writes log entries to Logging. This API method is the + * only way to send log entries to Logging. This method + * is used, directly or indirectly, by the Logging agent + * (fluentd) and all logging libraries configured to use Logging. + * A single request may contain log entries for a maximum of 1000 + * different resources (projects, organizations, billing accounts or + * folders)

+ *

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

+ *
    + *
  • writeLogEntries(WriteLogEntriesRequest request) + *
+ *

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

+ *
    + *
  • writeLogEntries(LogName logName, MonitoredResource resource, Map labels, List entries) + *
  • writeLogEntries(String logName, MonitoredResource resource, Map labels, List entries) + *
+ *

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

+ *
    + *
  • writeLogEntriesCallable() + *
+ *
ListLogEntries

Lists log entries. Use this method to retrieve log entries that originated + * from a project/folder/organization/billing account. For ways to export log + * entries, see [Exporting + * Logs](https://cloud.google.com/logging/docs/export).

+ *

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

+ *
    + *
  • listLogEntries(ListLogEntriesRequest request) + *
+ *

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

+ *
    + *
  • listLogEntries(List resourceNames, String filter, String orderBy) + *
+ *

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

+ *
    + *
  • listLogEntriesPagedCallable() + *
  • listLogEntriesCallable() + *
+ *
ListMonitoredResourceDescriptors

Lists the descriptors for monitored resource types used by Logging.

+ *

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

+ *
    + *
  • listMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request) + *
+ *

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

+ *
    + *
  • listMonitoredResourceDescriptorsPagedCallable() + *
  • listMonitoredResourceDescriptorsCallable() + *
+ *
ListLogs

Lists the logs in projects, organizations, folders, or billing accounts. + * Only logs that have entries are listed.

+ *

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

+ *
    + *
  • listLogs(ListLogsRequest request) + *
+ *

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

+ *
    + *
  • listLogs(BillingAccountName parent) + *
  • listLogs(FolderName parent) + *
  • listLogs(OrganizationName parent) + *
  • listLogs(ProjectName parent) + *
  • listLogs(String parent) + *
+ *

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

+ *
    + *
  • listLogsPagedCallable() + *
  • listLogsCallable() + *
+ *
TailLogEntries

Streaming read of log entries as they are ingested. Until the stream is + * terminated, it will continue reading logs.

+ *

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

+ *
    + *
  • tailLogEntriesCallable() + *
+ *
* *

See the individual methods for example code. * 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 a0306451a1..ac38b44464 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 @@ -64,19 +64,109 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListLogMetrics

Lists logs-based metrics.

+ *

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

+ *
    + *
  • listLogMetrics(ListLogMetricsRequest request) + *
+ *

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

+ *
    + *
  • listLogMetrics(ProjectName parent) + *
  • listLogMetrics(String parent) + *
+ *

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

+ *
    + *
  • listLogMetricsPagedCallable() + *
  • listLogMetricsCallable() + *
+ *
GetLogMetric

Gets a logs-based metric.

+ *

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

+ *
    + *
  • getLogMetric(GetLogMetricRequest request) + *
+ *

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

+ *
    + *
  • getLogMetric(LogMetricName metricName) + *
  • getLogMetric(String metricName) + *
+ *

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

+ *
    + *
  • getLogMetricCallable() + *
+ *
CreateLogMetric

Creates a logs-based metric.

+ *

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

+ *
    + *
  • createLogMetric(CreateLogMetricRequest request) + *
+ *

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

+ *
    + *
  • createLogMetric(ProjectName parent, LogMetric metric) + *
  • createLogMetric(String parent, LogMetric metric) + *
+ *

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

+ *
    + *
  • createLogMetricCallable() + *
+ *
UpdateLogMetric

Creates or updates a logs-based metric.

+ *

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

+ *
    + *
  • updateLogMetric(UpdateLogMetricRequest request) + *
+ *

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

+ *
    + *
  • updateLogMetric(LogMetricName metricName, LogMetric metric) + *
  • updateLogMetric(String metricName, LogMetric metric) + *
+ *

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

+ *
    + *
  • updateLogMetricCallable() + *
+ *
DeleteLogMetric

Deletes a logs-based metric.

+ *

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

+ *
    + *
  • deleteLogMetric(DeleteLogMetricRequest request) + *
+ *

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

+ *
    + *
  • deleteLogMetric(LogMetricName metricName) + *
  • deleteLogMetric(String metricName) + *
+ *

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

+ *
    + *
  • deleteLogMetricCallable() + *
+ *
* *

See the individual methods for example code. * 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 fd82725ee7..0b191d15cc 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 @@ -79,19 +79,253 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateSchema

Creates a schema.

+ *

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

+ *
    + *
  • createSchema(CreateSchemaRequest request) + *
+ *

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

+ *
    + *
  • createSchema(ProjectName parent, Schema schema, String schemaId) + *
  • createSchema(String parent, Schema schema, String schemaId) + *
+ *

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

+ *
    + *
  • createSchemaCallable() + *
+ *
GetSchema

Gets a schema.

+ *

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

+ *
    + *
  • getSchema(GetSchemaRequest request) + *
+ *

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

+ *
    + *
  • getSchema(SchemaName name) + *
  • getSchema(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.

+ *
    + *
  • getSchemaCallable() + *
+ *
ListSchemas

Lists schemas in a project.

+ *

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

+ *
    + *
  • listSchemas(ListSchemasRequest request) + *
+ *

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

+ *
    + *
  • listSchemas(ProjectName parent) + *
  • listSchemas(String parent) + *
+ *

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

+ *
    + *
  • listSchemasPagedCallable() + *
  • listSchemasCallable() + *
+ *
ListSchemaRevisions

Lists all schema revisions for the named schema.

+ *

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

+ *
    + *
  • listSchemaRevisions(ListSchemaRevisionsRequest request) + *
+ *

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

+ *
    + *
  • listSchemaRevisions(SchemaName name) + *
  • listSchemaRevisions(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.

+ *
    + *
  • listSchemaRevisionsPagedCallable() + *
  • listSchemaRevisionsCallable() + *
+ *
CommitSchema

Commits a new schema revision to an existing schema.

+ *

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

+ *
    + *
  • commitSchema(CommitSchemaRequest request) + *
+ *

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

+ *
    + *
  • commitSchema(SchemaName name, Schema schema) + *
  • commitSchema(String name, Schema schema) + *
+ *

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

+ *
    + *
  • commitSchemaCallable() + *
+ *
RollbackSchema

Creates a new schema revision that is a copy of the provided revision_id.

+ *

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

+ *
    + *
  • rollbackSchema(RollbackSchemaRequest request) + *
+ *

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

+ *
    + *
  • rollbackSchema(SchemaName name, String revisionId) + *
  • rollbackSchema(String name, String revisionId) + *
+ *

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

+ *
    + *
  • rollbackSchemaCallable() + *
+ *
DeleteSchemaRevision

Deletes a specific schema revision.

+ *

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

+ *
    + *
  • deleteSchemaRevision(DeleteSchemaRevisionRequest request) + *
+ *

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

+ *
    + *
  • deleteSchemaRevision(SchemaName name, String revisionId) + *
  • deleteSchemaRevision(String name, String revisionId) + *
+ *

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

+ *
    + *
  • deleteSchemaRevisionCallable() + *
+ *
DeleteSchema

Deletes a schema.

+ *

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

+ *
    + *
  • deleteSchema(DeleteSchemaRequest request) + *
+ *

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

+ *
    + *
  • deleteSchema(SchemaName name) + *
  • deleteSchema(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.

+ *
    + *
  • deleteSchemaCallable() + *
+ *
ValidateSchema

Validates a schema.

+ *

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

+ *
    + *
  • validateSchema(ValidateSchemaRequest request) + *
+ *

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

+ *
    + *
  • validateSchema(ProjectName parent, Schema schema) + *
  • validateSchema(String parent, Schema schema) + *
+ *

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

+ *
    + *
  • validateSchemaCallable() + *
+ *
ValidateMessage

Validates a message against a schema.

+ *

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

+ *
    + *
  • validateMessage(ValidateMessageRequest request) + *
+ *

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

+ *
    + *
  • validateMessageCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces + * any existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + * errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * 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 87b846e1c8..e400953590 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 @@ -95,19 +95,434 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateSubscription

Creates a subscription to a given topic. See the [resource name rules] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * If the subscription already exists, returns `ALREADY_EXISTS`. + * If the corresponding topic doesn't exist, returns `NOT_FOUND`. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * If the name is not provided in the request, the server will assign a random + * name for this subscription on the same project as the topic, conforming + * to the [resource name format] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated + * name is populated in the returned Subscription object. Note that for REST + * API requests, you must specify a name in the request.

+ *

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

+ *
    + *
  • createSubscription(Subscription request) + *
+ *

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

+ *
    + *
  • createSubscription(SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
  • createSubscription(SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
  • createSubscription(String name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
  • createSubscription(String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
+ *

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

+ *
    + *
  • createSubscriptionCallable() + *
+ *
GetSubscription

Gets the configuration details of a subscription.

+ *

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

+ *
    + *
  • getSubscription(GetSubscriptionRequest request) + *
+ *

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

+ *
    + *
  • getSubscription(SubscriptionName subscription) + *
  • getSubscription(String subscription) + *
+ *

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

+ *
    + *
  • getSubscriptionCallable() + *
+ *
UpdateSubscription

Updates an existing subscription. Note that certain properties of a + * subscription, such as its topic, are not modifiable.

+ *

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

+ *
    + *
  • updateSubscription(UpdateSubscriptionRequest request) + *
+ *

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

+ *
    + *
  • updateSubscriptionCallable() + *
+ *
ListSubscriptions

Lists matching subscriptions.

+ *

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

+ *
    + *
  • listSubscriptions(ListSubscriptionsRequest request) + *
+ *

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

+ *
    + *
  • listSubscriptions(ProjectName project) + *
  • listSubscriptions(String project) + *
+ *

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

+ *
    + *
  • listSubscriptionsPagedCallable() + *
  • listSubscriptionsCallable() + *
+ *
DeleteSubscription

Deletes an existing subscription. All messages retained in the subscription + * are immediately dropped. Calls to `Pull` after deletion will return + * `NOT_FOUND`. After a subscription is deleted, a new one may be created with + * the same name, but the new one has no association with the old + * subscription or its topic unless the same topic is specified.

+ *

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

+ *
    + *
  • deleteSubscription(DeleteSubscriptionRequest request) + *
+ *

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

+ *
    + *
  • deleteSubscription(SubscriptionName subscription) + *
  • deleteSubscription(String subscription) + *
+ *

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

+ *
    + *
  • deleteSubscriptionCallable() + *
+ *
ModifyAckDeadline

Modifies the ack deadline for a specific message. This method is useful + * to indicate that more time is needed to process a message by the + * subscriber, or to make the message available for redelivery if the + * processing was interrupted. Note that this does not modify the + * subscription-level `ackDeadlineSeconds` used for subsequent messages.

+ *

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

+ *
    + *
  • modifyAckDeadline(ModifyAckDeadlineRequest request) + *
+ *

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

+ *
    + *
  • modifyAckDeadline(SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) + *
  • modifyAckDeadline(String subscription, List ackIds, int ackDeadlineSeconds) + *
+ *

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

+ *
    + *
  • modifyAckDeadlineCallable() + *
+ *
Acknowledge

Acknowledges the messages associated with the `ack_ids` in the + * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages + * from the subscription. + * + * Acknowledging a message whose ack deadline has expired may succeed, + * but such a message may be redelivered later. Acknowledging a message more + * than once will not result in an error.

+ *

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

+ *
    + *
  • acknowledge(AcknowledgeRequest request) + *
+ *

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

+ *
    + *
  • acknowledge(SubscriptionName subscription, List ackIds) + *
  • acknowledge(String subscription, List ackIds) + *
+ *

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

+ *
    + *
  • acknowledgeCallable() + *
+ *
Pull

Pulls messages from the server. The server may return `UNAVAILABLE` if + * there are too many concurrent pull requests pending for the given + * subscription.

+ *

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

+ *
    + *
  • pull(PullRequest request) + *
+ *

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

+ *
    + *
  • pull(SubscriptionName subscription, int maxMessages) + *
  • pull(String subscription, int maxMessages) + *
  • pull(SubscriptionName subscription, boolean returnImmediately, int maxMessages) + *
  • pull(String subscription, boolean returnImmediately, int maxMessages) + *
+ *

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

+ *
    + *
  • pullCallable() + *
+ *
StreamingPull

Establishes a stream with the server, which sends messages down to the + * client. The client streams acknowledgements and ack deadline modifications + * back to the server. The server will close the stream and return the status + * on any error. The server may close the stream with status `UNAVAILABLE` to + * reassign server-side resources, in which case, the client should + * re-establish the stream. Flow control can be achieved by configuring the + * underlying RPC channel.

+ *

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

+ *
    + *
  • streamingPullCallable() + *
+ *
ModifyPushConfig

Modifies the `PushConfig` for a specified subscription. + * + * This may be used to change a push subscription to a pull one (signified by + * an empty `PushConfig`) or vice versa, or change the endpoint URL and other + * attributes of a push subscription. Messages will accumulate for delivery + * continuously through the call regardless of changes to the `PushConfig`.

+ *

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

+ *
    + *
  • modifyPushConfig(ModifyPushConfigRequest request) + *
+ *

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

+ *
    + *
  • modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) + *
  • modifyPushConfig(String subscription, PushConfig pushConfig) + *
+ *

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

+ *
    + *
  • modifyPushConfigCallable() + *
+ *
GetSnapshot

Gets the configuration details of a snapshot. Snapshots are used in + * Seek + * operations, which allow you to manage message acknowledgments in bulk. That + * is, you can set the acknowledgment state of messages in an existing + * subscription to the state captured by a snapshot.

+ *

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

+ *
    + *
  • getSnapshot(GetSnapshotRequest request) + *
+ *

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

+ *
    + *
  • getSnapshot(SnapshotName snapshot) + *
  • getSnapshot(String snapshot) + *
+ *

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

+ *
    + *
  • getSnapshotCallable() + *
+ *
ListSnapshots

Lists the existing snapshots. Snapshots are used in [Seek]( + * https://cloud.google.com/pubsub/docs/replay-overview) operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set + * the acknowledgment state of messages in an existing subscription to the + * state captured by a snapshot.

+ *

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

+ *
    + *
  • listSnapshots(ListSnapshotsRequest request) + *
+ *

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

+ *
    + *
  • listSnapshots(ProjectName project) + *
  • listSnapshots(String project) + *
+ *

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

+ *
    + *
  • listSnapshotsPagedCallable() + *
  • listSnapshotsCallable() + *
+ *
CreateSnapshot

Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, + * which allow you to manage message acknowledgments in bulk. That is, you can + * set the acknowledgment state of messages in an existing subscription to the + * state captured by a snapshot. + * If the snapshot already exists, returns `ALREADY_EXISTS`. + * If the requested subscription doesn't exist, returns `NOT_FOUND`. + * If the backlog in the subscription is too old -- and the resulting snapshot + * would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. + * See also the `Snapshot.expire_time` field. If the name is not provided in + * the request, the server will assign a random + * name for this snapshot on the same project as the subscription, conforming + * to the [resource name format] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for + * REST API requests, you must specify a name in the request.

+ *

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

+ *
    + *
  • createSnapshot(CreateSnapshotRequest request) + *
+ *

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

+ *
    + *
  • createSnapshot(SnapshotName name, SubscriptionName subscription) + *
  • createSnapshot(SnapshotName name, String subscription) + *
  • createSnapshot(String name, SubscriptionName subscription) + *
  • createSnapshot(String name, String subscription) + *
+ *

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

+ *
    + *
  • createSnapshotCallable() + *
+ *
UpdateSnapshot

Updates an existing snapshot. Snapshots are used in + * Seek + * operations, which allow + * you to manage message acknowledgments in bulk. That is, you can set the + * acknowledgment state of messages in an existing subscription to the state + * captured by a snapshot.

+ *

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

+ *
    + *
  • updateSnapshot(UpdateSnapshotRequest request) + *
+ *

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

+ *
    + *
  • updateSnapshotCallable() + *
+ *
DeleteSnapshot

Removes an existing snapshot. Snapshots are used in [Seek] + * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set + * the acknowledgment state of messages in an existing subscription to the + * state captured by a snapshot. + * When the snapshot is deleted, all messages retained in the snapshot + * are immediately dropped. After a snapshot is deleted, a new one may be + * created with the same name, but the new one has no association with the old + * snapshot or its subscription, unless the same subscription is specified.

+ *

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

+ *
    + *
  • deleteSnapshot(DeleteSnapshotRequest request) + *
+ *

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

+ *
    + *
  • deleteSnapshot(SnapshotName snapshot) + *
  • deleteSnapshot(String snapshot) + *
+ *

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

+ *
    + *
  • deleteSnapshotCallable() + *
+ *
Seek

Seeks an existing subscription to a point in time or to a given snapshot, + * whichever is provided in the request. Snapshots are used in [Seek] + * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set + * the acknowledgment state of messages in an existing subscription to the + * state captured by a snapshot. Note that both the subscription and the + * snapshot must be on the same topic.

+ *

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

+ *
    + *
  • seek(SeekRequest request) + *
+ *

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

+ *
    + *
  • seekCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces + * any existing policy. + * + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + * errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * 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 bb74a760d4..7d6e4b9249 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 @@ -78,19 +78,244 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateTopic

Creates the given topic with the given name. See the [resource name rules] + * (https://cloud.google.com/pubsub/docs/admin#resource_names).

+ *

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

+ *
    + *
  • createTopic(Topic request) + *
+ *

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

+ *
    + *
  • createTopic(TopicName name) + *
  • createTopic(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.

+ *
    + *
  • createTopicCallable() + *
+ *
UpdateTopic

Updates an existing topic. Note that certain properties of a + * topic are not modifiable.

+ *

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

+ *
    + *
  • updateTopic(UpdateTopicRequest request) + *
+ *

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

+ *
    + *
  • updateTopicCallable() + *
+ *
Publish

Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + * does not exist.

+ *

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

+ *
    + *
  • publish(PublishRequest request) + *
+ *

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

+ *
    + *
  • publish(TopicName topic, List messages) + *
  • publish(String topic, List messages) + *
+ *

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

+ *
    + *
  • publishCallable() + *
+ *
GetTopic

Gets the configuration of a topic.

+ *

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

+ *
    + *
  • getTopic(GetTopicRequest request) + *
+ *

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

+ *
    + *
  • getTopic(TopicName topic) + *
  • getTopic(String topic) + *
+ *

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

+ *
    + *
  • getTopicCallable() + *
+ *
ListTopics

Lists matching topics.

+ *

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

+ *
    + *
  • listTopics(ListTopicsRequest request) + *
+ *

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

+ *
    + *
  • listTopics(ProjectName project) + *
  • listTopics(String project) + *
+ *

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

+ *
    + *
  • listTopicsPagedCallable() + *
  • listTopicsCallable() + *
+ *
ListTopicSubscriptions

Lists the names of the attached subscriptions on this topic.

+ *

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

+ *
    + *
  • listTopicSubscriptions(ListTopicSubscriptionsRequest request) + *
+ *

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

+ *
    + *
  • listTopicSubscriptions(TopicName topic) + *
  • listTopicSubscriptions(String topic) + *
+ *

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

+ *
    + *
  • listTopicSubscriptionsPagedCallable() + *
  • listTopicSubscriptionsCallable() + *
+ *
ListTopicSnapshots

Lists the names of the snapshots on this topic. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, + * which allow you to manage message acknowledgments in bulk. That is, you can + * set the acknowledgment state of messages in an existing subscription to the + * state captured by a snapshot.

+ *

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

+ *
    + *
  • listTopicSnapshots(ListTopicSnapshotsRequest request) + *
+ *

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

+ *
    + *
  • listTopicSnapshots(TopicName topic) + *
  • listTopicSnapshots(String topic) + *
+ *

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

+ *
    + *
  • listTopicSnapshotsPagedCallable() + *
  • listTopicSnapshotsCallable() + *
+ *
DeleteTopic

Deletes the topic with the given name. Returns `NOT_FOUND` if the topic + * does not exist. After a topic is deleted, a new topic may be created with + * the same name; this is an entirely new topic with none of the old + * configuration or subscriptions. Existing subscriptions to this topic are + * not deleted, but their `topic` field is set to `_deleted-topic_`.

+ *

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

+ *
    + *
  • deleteTopic(DeleteTopicRequest request) + *
+ *

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

+ *
    + *
  • deleteTopic(TopicName topic) + *
  • deleteTopic(String topic) + *
+ *

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

+ *
    + *
  • deleteTopicCallable() + *
+ *
DetachSubscription

Detaches a subscription from this topic. All messages retained in the + * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests + * will return FAILED_PRECONDITION. If the subscription is a push + * subscription, pushes to the endpoint will stop.

+ *

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

+ *
    + *
  • detachSubscription(DetachSubscriptionRequest request) + *
+ *

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

+ *
    + *
  • detachSubscriptionCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replaces + * any existing policy. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + * errors.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a `NOT_FOUND` error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * 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 fb9a41852b..64ce17a14e 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 @@ -82,19 +82,269 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListInstances

Lists all Redis instances owned by a project in either the specified + * location (region) or all locations. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * The location should have the following format: + * + * * `projects/{project_id}/locations/{location_id}` + * + * If `location_id` is specified as `-` (wildcard), then all regions + * available to the project are queried, and the results are aggregated.

+ *

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

+ *
    + *
  • listInstances(ListInstancesRequest request) + *
+ *

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

+ *
    + *
  • listInstances(LocationName parent) + *
  • listInstances(String parent) + *
+ *

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

+ *
    + *
  • listInstancesPagedCallable() + *
  • listInstancesCallable() + *
+ *
GetInstance

Gets the details of a specific Redis instance.

+ *

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

+ *
    + *
  • getInstance(GetInstanceRequest request) + *
+ *

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

+ *
    + *
  • getInstance(InstanceName name) + *
  • getInstance(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.

+ *
    + *
  • getInstanceCallable() + *
+ *
GetInstanceAuthString

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the + * instance the response will be empty. This information is not included in + * the details returned to GetInstance.

+ *

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

+ *
    + *
  • getInstanceAuthString(GetInstanceAuthStringRequest request) + *
+ *

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

+ *
    + *
  • getInstanceAuthString(InstanceName name) + *
  • getInstanceAuthString(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.

+ *
    + *
  • getInstanceAuthStringCallable() + *
+ *
CreateInstance

Creates a Redis instance based on the specified tier and memory size. + * + * By default, the instance is accessible from the project's + * [default network](https://cloud.google.com/vpc/docs/vpc). + * + * The creation is executed asynchronously and callers may check the returned + * operation to track its progress. Once the operation is completed the Redis + * instance will be fully functional. The completed longrunning.Operation will + * contain the new instance object in the response field. + * + * The returned operation is automatically deleted after a few hours, so there + * is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • createInstanceAsync(CreateInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createInstanceAsync(LocationName parent, String instanceId, Instance instance) + *
  • createInstanceAsync(String parent, String instanceId, Instance instance) + *
+ *

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

+ *
    + *
  • createInstanceOperationCallable() + *
  • createInstanceCallable() + *
+ *
UpdateInstance

Updates the metadata and configuration of a specific Redis instance. + * + * Completed longrunning.Operation will contain the new instance object + * in the response field. The returned operation is automatically deleted + * after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • updateInstanceAsync(UpdateInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateInstanceAsync(FieldMask updateMask, Instance instance) + *
+ *

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

+ *
    + *
  • updateInstanceOperationCallable() + *
  • updateInstanceCallable() + *
+ *
UpgradeInstance

Upgrades Redis instance to the newer Redis version specified in the + * request.

+ *

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

+ *
    + *
  • upgradeInstanceAsync(UpgradeInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • upgradeInstanceAsync(InstanceName name, String redisVersion) + *
  • upgradeInstanceAsync(String name, String redisVersion) + *
+ *

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

+ *
    + *
  • upgradeInstanceOperationCallable() + *
  • upgradeInstanceCallable() + *
+ *
ImportInstance

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. + * + * Redis may stop serving during this operation. Instance state will be + * IMPORTING for entire operation. When complete, the instance will contain + * only data from the imported file. + * + * The returned operation is automatically deleted after a few hours, so + * there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • importInstanceAsync(ImportInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • importInstanceAsync(String name, InputConfig inputConfig) + *
+ *

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

+ *
    + *
  • importInstanceOperationCallable() + *
  • importInstanceCallable() + *
+ *
ExportInstance

Export Redis instance data into a Redis RDB format file in Cloud Storage. + * + * Redis will continue serving during this operation. + * + * The returned operation is automatically deleted after a few hours, so + * there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • exportInstanceAsync(ExportInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • exportInstanceAsync(String name, OutputConfig outputConfig) + *
+ *

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

+ *
    + *
  • exportInstanceOperationCallable() + *
  • exportInstanceCallable() + *
+ *
FailoverInstance

Initiates a failover of the primary node to current replica node for a + * specific STANDARD tier Cloud Memorystore for Redis instance.

+ *

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

+ *
    + *
  • failoverInstanceAsync(FailoverInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • failoverInstanceAsync(InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) + *
  • failoverInstanceAsync(String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) + *
+ *

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

+ *
    + *
  • failoverInstanceOperationCallable() + *
  • failoverInstanceCallable() + *
+ *
DeleteInstance

Deletes a specific Redis instance. Instance stops serving and data is + * deleted.

+ *

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

+ *
    + *
  • deleteInstanceAsync(DeleteInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteInstanceAsync(InstanceName name) + *
  • deleteInstanceAsync(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.

+ *
    + *
  • deleteInstanceOperationCallable() + *
  • deleteInstanceCallable() + *
+ *
RescheduleMaintenance

Reschedule maintenance for a given instance in a given project and + * location.

+ *

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

+ *
    + *
  • rescheduleMaintenanceAsync(RescheduleMaintenanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • rescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime) + *
  • rescheduleMaintenanceAsync(String name, RescheduleMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime) + *
+ *

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

+ *
    + *
  • rescheduleMaintenanceOperationCallable() + *
  • rescheduleMaintenanceCallable() + *
+ *
* *

See the individual methods for example code. * 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 650dafb7a8..361af38658 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 @@ -78,19 +78,631 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
DeleteBucket

Permanently deletes an empty bucket.

+ *

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

+ *
    + *
  • deleteBucket(DeleteBucketRequest request) + *
+ *

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

+ *
    + *
  • deleteBucket(BucketName name) + *
  • deleteBucket(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.

+ *
    + *
  • deleteBucketCallable() + *
+ *
GetBucket

Returns metadata for the specified bucket.

+ *

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

+ *
    + *
  • getBucket(GetBucketRequest request) + *
+ *

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

+ *
    + *
  • getBucket(BucketName name) + *
  • getBucket(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.

+ *
    + *
  • getBucketCallable() + *
+ *
CreateBucket

Creates a new bucket.

+ *

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

+ *
    + *
  • createBucket(CreateBucketRequest request) + *
+ *

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

+ *
    + *
  • createBucket(ProjectName parent, Bucket bucket, String bucketId) + *
  • createBucket(String parent, Bucket bucket, String bucketId) + *
+ *

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

+ *
    + *
  • createBucketCallable() + *
+ *
ListBuckets

Retrieves a list of buckets for a given project.

+ *

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

+ *
    + *
  • listBuckets(ListBucketsRequest request) + *
+ *

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

+ *
    + *
  • listBuckets(ProjectName parent) + *
  • listBuckets(String parent) + *
+ *

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

+ *
    + *
  • listBucketsPagedCallable() + *
  • listBucketsCallable() + *
+ *
LockBucketRetentionPolicy

Locks retention policy on a bucket.

+ *

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

+ *
    + *
  • lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest request) + *
+ *

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

+ *
    + *
  • lockBucketRetentionPolicy(BucketName bucket) + *
  • lockBucketRetentionPolicy(String bucket) + *
+ *

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

+ *
    + *
  • lockBucketRetentionPolicyCallable() + *
+ *
GetIamPolicy

Gets the IAM policy for a specified bucket or object. + * The `resource` field in the request should be + * projects/_/buckets/ for a bucket or + * projects/_/buckets//objects/ for an object.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Updates an IAM policy for the specified bucket or object. + * The `resource` field in the request should be + * projects/_/buckets/ for a bucket or + * projects/_/buckets//objects/ for an object.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Tests a set of permissions on the given bucket or object to see which, if + * any, are held by the caller. + * The `resource` field in the request should be + * projects/_/buckets/ for a bucket or + * projects/_/buckets//objects/ for an object.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
UpdateBucket

Updates a bucket. Equivalent to JSON API's storage.buckets.patch method.

+ *

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

+ *
    + *
  • updateBucket(UpdateBucketRequest request) + *
+ *

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

+ *
    + *
  • updateBucket(Bucket bucket, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateBucketCallable() + *
+ *
DeleteNotification

Permanently deletes a notification subscription.

+ *

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

+ *
    + *
  • deleteNotification(DeleteNotificationRequest request) + *
+ *

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

+ *
    + *
  • deleteNotification(NotificationName name) + *
  • deleteNotification(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.

+ *
    + *
  • deleteNotificationCallable() + *
+ *
GetNotification

View a notification config.

+ *

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

+ *
    + *
  • getNotification(GetNotificationRequest request) + *
+ *

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

+ *
    + *
  • getNotification(BucketName name) + *
  • getNotification(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.

+ *
    + *
  • getNotificationCallable() + *
+ *
CreateNotification

Creates a notification subscription for a given bucket. + * These notifications, when triggered, publish messages to the specified + * Pub/Sub topics. + * See https://cloud.google.com/storage/docs/pubsub-notifications.

+ *

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

+ *
    + *
  • createNotification(CreateNotificationRequest request) + *
+ *

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

+ *
    + *
  • createNotification(ProjectName parent, Notification notification) + *
  • createNotification(String parent, Notification notification) + *
+ *

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

+ *
    + *
  • createNotificationCallable() + *
+ *
ListNotifications

Retrieves a list of notification subscriptions for a given bucket.

+ *

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

+ *
    + *
  • listNotifications(ListNotificationsRequest request) + *
+ *

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

+ *
    + *
  • listNotifications(ProjectName parent) + *
  • listNotifications(String parent) + *
+ *

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

+ *
    + *
  • listNotificationsPagedCallable() + *
  • listNotificationsCallable() + *
+ *
ComposeObject

Concatenates a list of existing objects into a new object in the same + * bucket.

+ *

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

+ *
    + *
  • composeObject(ComposeObjectRequest request) + *
+ *

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

+ *
    + *
  • composeObjectCallable() + *
+ *
DeleteObject

Deletes an object and its metadata. Deletions are permanent if versioning + * is not enabled for the bucket, or if the `generation` parameter is used.

+ *

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

+ *
    + *
  • deleteObject(DeleteObjectRequest request) + *
+ *

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

+ *
    + *
  • deleteObject(String bucket, String object) + *
  • deleteObject(String bucket, String object, long generation) + *
+ *

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

+ *
    + *
  • deleteObjectCallable() + *
+ *
CancelResumableWrite

Cancels an in-progress resumable upload.

+ *

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

+ *
    + *
  • cancelResumableWrite(CancelResumableWriteRequest request) + *
+ *

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

+ *
    + *
  • cancelResumableWrite(String uploadId) + *
+ *

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

+ *
    + *
  • cancelResumableWriteCallable() + *
+ *
GetObject

Retrieves an object's metadata.

+ *

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

+ *
    + *
  • getObject(GetObjectRequest request) + *
+ *

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

+ *
    + *
  • getObject(String bucket, String object) + *
  • getObject(String bucket, String object, long generation) + *
+ *

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

+ *
    + *
  • getObjectCallable() + *
+ *
ReadObject

Reads an object's data.

+ *

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

+ *
    + *
  • readObjectCallable() + *
+ *
UpdateObject

Updates an object's metadata. + * Equivalent to JSON API's storage.objects.patch.

+ *

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

+ *
    + *
  • updateObject(UpdateObjectRequest request) + *
+ *

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

+ *
    + *
  • updateObject(Object object, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateObjectCallable() + *
+ *
WriteObject

Stores a new object and metadata. * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * An object can be written either in a single message stream or in a + * resumable sequence of message streams. To write using a single stream, + * the client should include in the first message of the stream an + * `WriteObjectSpec` describing the destination bucket, object, and any + * preconditions. Additionally, the final message must set 'finish_write' to + * true, or else it is an error. + * + * For a resumable write, the client should instead call + * `StartResumableWrite()`, populating a `WriteObjectSpec` into that request. + * They should then attach the returned `upload_id` to the first message of + * each following call to `WriteObject`. If the stream is closed before + * finishing the upload (either explicitly by the client or due to a network + * error or an error response from the server), the client should do as + * follows: + * - Check the result Status of the stream, to determine if writing can be + * resumed on this stream or must be restarted from scratch (by calling + * `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED, + * INTERNAL, and UNAVAILABLE. For each case, the client should use binary + * exponential backoff before retrying. Additionally, writes can be + * resumed after RESOURCE_EXHAUSTED errors, but only after taking + * appropriate measures, which may include reducing aggregate send rate + * across clients and/or requesting a quota increase for your project. + * - If the call to `WriteObject` returns `ABORTED`, that indicates + * concurrent attempts to update the resumable write, caused either by + * multiple racing clients or by a single client where the previous + * request was timed out on the client side but nonetheless reached the + * server. In this case the client should take steps to prevent further + * concurrent writes (e.g., increase the timeouts, stop using more than + * one process to perform the upload, etc.), and then should follow the + * steps below for resuming the upload. + * - For resumable errors, the client should call `QueryWriteStatus()` and + * then continue writing from the returned `persisted_size`. This may be + * less than the amount of data the client previously sent. Note also that + * it is acceptable to send data starting at an offset earlier than the + * returned `persisted_size`; in this case, the service will skip data at + * offsets that were already persisted (without checking that it matches + * the previously written data), and write only the data starting from the + * persisted offset. This behavior can make client-side handling simpler + * in some cases. + * + * The service will not view the object as complete until the client has + * sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any + * requests on a stream after sending a request with `finish_write` set to + * `true` will cause an error. The client **should** check the response it + * receives to determine how much data the service was able to commit and + * whether the service views the object as complete. + * + * Attempting to resume an already finalized object will result in an OK + * status, with a WriteObjectResponse containing the finalized object's + * metadata.

+ *

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

+ *
    + *
  • writeObjectCallable() + *
+ *
ListObjects

Retrieves a list of objects matching the criteria.

+ *

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

+ *
    + *
  • listObjects(ListObjectsRequest request) + *
+ *

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

+ *
    + *
  • listObjects(ProjectName parent) + *
  • listObjects(String parent) + *
+ *

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

+ *
    + *
  • listObjectsPagedCallable() + *
  • listObjectsCallable() + *
+ *
RewriteObject

Rewrites a source object to a destination object. Optionally overrides + * metadata.

+ *

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

+ *
    + *
  • rewriteObject(RewriteObjectRequest request) + *
+ *

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

+ *
    + *
  • rewriteObjectCallable() + *
+ *
StartResumableWrite

Starts a resumable write. How long the write operation remains valid, and + * what happens when the write operation becomes invalid, are + * service-dependent.

+ *

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

+ *
    + *
  • startResumableWrite(StartResumableWriteRequest request) + *
+ *

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

+ *
    + *
  • startResumableWriteCallable() + *
+ *
QueryWriteStatus

Determines the `persisted_size` for an object that is being written, which + * can then be used as the `write_offset` for the next `Write()` call. + * + * If the object does not exist (i.e., the object has been deleted, or the + * first `Write()` has not yet reached the service), this method returns the + * error `NOT_FOUND`. + * + * The client **may** call `QueryWriteStatus()` at any time to determine how + * much data has been processed for this object. This is useful if the + * client is buffering data and needs to know which data can be safely + * evicted. For any sequence of `QueryWriteStatus()` calls for a given + * object name, the sequence of returned `persisted_size` values will be + * non-decreasing.

+ *

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

+ *
    + *
  • queryWriteStatus(QueryWriteStatusRequest request) + *
+ *

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

+ *
    + *
  • queryWriteStatus(String uploadId) + *
+ *

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

+ *
    + *
  • queryWriteStatusCallable() + *
+ *
GetServiceAccount

Retrieves the name of a project's Google Cloud Storage service account.

+ *

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

+ *
    + *
  • getServiceAccount(GetServiceAccountRequest request) + *
+ *

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

+ *
    + *
  • getServiceAccount(ProjectName project) + *
  • getServiceAccount(String project) + *
+ *

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

+ *
    + *
  • getServiceAccountCallable() + *
+ *
CreateHmacKey

Creates a new HMAC key for the given service account.

+ *

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

+ *
    + *
  • createHmacKey(CreateHmacKeyRequest request) + *
+ *

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

+ *
    + *
  • createHmacKey(ProjectName project, String serviceAccountEmail) + *
  • createHmacKey(String project, String serviceAccountEmail) + *
+ *

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

+ *
    + *
  • createHmacKeyCallable() + *
+ *
DeleteHmacKey

Deletes a given HMAC key. Key must be in an INACTIVE state.

+ *

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

+ *
    + *
  • deleteHmacKey(DeleteHmacKeyRequest request) + *
+ *

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

+ *
    + *
  • deleteHmacKey(String accessId, ProjectName project) + *
  • deleteHmacKey(String accessId, String project) + *
+ *

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

+ *
    + *
  • deleteHmacKeyCallable() + *
+ *
GetHmacKey

Gets an existing HMAC key metadata for the given id.

+ *

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

+ *
    + *
  • getHmacKey(GetHmacKeyRequest request) + *
+ *

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

+ *
    + *
  • getHmacKey(String accessId, ProjectName project) + *
  • getHmacKey(String accessId, String project) + *
+ *

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

+ *
    + *
  • getHmacKeyCallable() + *
+ *
ListHmacKeys

Lists HMAC keys under a given project with the additional filters provided.

+ *

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

+ *
    + *
  • listHmacKeys(ListHmacKeysRequest request) + *
+ *

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

+ *
    + *
  • listHmacKeys(ProjectName project) + *
  • listHmacKeys(String project) + *
+ *

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

+ *
    + *
  • listHmacKeysPagedCallable() + *
  • listHmacKeysCallable() + *
+ *
UpdateHmacKey

Updates a given HMAC key state between ACTIVE and INACTIVE.

+ *

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

+ *
    + *
  • updateHmacKey(UpdateHmacKeyRequest request) + *
+ *

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

+ *
    + *
  • updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateHmacKeyCallable() + *
+ *
* *

See the individual methods for example code. *