Skip to content

Commit

Permalink
test generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ldetmer committed Nov 25, 2024
1 parent 4518918 commit f2976ad
Show file tree
Hide file tree
Showing 176 changed files with 15,660 additions and 1,260 deletions.
3,419 changes: 3,419 additions & 0 deletions google-cloud-storage/src/main/java/com/google/storage/v2/StorageClient.java

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"schema": "1.0",
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "java",
"protoPackage": "google.storage.v2",
"libraryPackage": "com.google.storage.v2",
"services": {
"Storage": {
"clients": {
"grpc": {
"libraryClient": "StorageClient",
"rpcs": {
"BidiWriteObject": {
"methods": ["bidiWriteObjectCallable"]
},
"CancelResumableWrite": {
"methods": ["cancelResumableWrite", "cancelResumableWrite", "cancelResumableWriteCallable"]
},
"ComposeObject": {
"methods": ["composeObject", "composeObjectCallable"]
},
"CreateBucket": {
"methods": ["createBucket", "createBucket", "createBucket", "createBucketCallable"]
},
"DeleteBucket": {
"methods": ["deleteBucket", "deleteBucket", "deleteBucket", "deleteBucketCallable"]
},
"DeleteObject": {
"methods": ["deleteObject", "deleteObject", "deleteObject", "deleteObject", "deleteObject", "deleteObjectCallable"]
},
"GetBucket": {
"methods": ["getBucket", "getBucket", "getBucket", "getBucketCallable"]
},
"GetIamPolicy": {
"methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"]
},
"GetObject": {
"methods": ["getObject", "getObject", "getObject", "getObject", "getObject", "getObjectCallable"]
},
"ListBuckets": {
"methods": ["listBuckets", "listBuckets", "listBuckets", "listBucketsPagedCallable", "listBucketsCallable"]
},
"ListObjects": {
"methods": ["listObjects", "listObjects", "listObjects", "listObjectsPagedCallable", "listObjectsCallable"]
},
"LockBucketRetentionPolicy": {
"methods": ["lockBucketRetentionPolicy", "lockBucketRetentionPolicy", "lockBucketRetentionPolicy", "lockBucketRetentionPolicyCallable"]
},
"QueryWriteStatus": {
"methods": ["queryWriteStatus", "queryWriteStatus", "queryWriteStatusCallable"]
},
"ReadObject": {
"methods": ["readObjectCallable"]
},
"RestoreObject": {
"methods": ["restoreObject", "restoreObject", "restoreObject", "restoreObjectCallable"]
},
"RewriteObject": {
"methods": ["rewriteObject", "rewriteObjectCallable"]
},
"SetIamPolicy": {
"methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"]
},
"StartResumableWrite": {
"methods": ["startResumableWrite", "startResumableWriteCallable"]
},
"TestIamPermissions": {
"methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"]
},
"UpdateBucket": {
"methods": ["updateBucket", "updateBucket", "updateBucketCallable"]
},
"UpdateObject": {
"methods": ["updateObject", "updateObject", "updateObjectCallable"]
},
"WriteObject": {
"methods": ["writeObjectCallable"]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* A client to Cloud Storage API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= StorageClient =======================
*
* <p>Service Description: ## API Overview and Naming Syntax
*
* <p>The Cloud Storage gRPC API allows applications to read and write data through the abstractions
* of buckets and objects. For a description of these abstractions please see
* https://cloud.google.com/storage/docs.
*
* <p>Resources are named as follows: - Projects are referred to as they are defined by the Resource
* Manager API, using strings like `projects/123456` or `projects/my-string-id`. - Buckets are named
* using string names of the form: `projects/{project}/buckets/{bucket}` For globally unique
* buckets, `_` may be substituted for the project. - Objects are uniquely identified by their name
* along with the name of the bucket they belong to, as separate strings in this API. For example:
*
* <p>ReadObjectRequest { bucket: 'projects/_/buckets/my-bucket' object: 'my-object' } Note that
* object names can contain `/` characters, which are treated as any other character (no special
* directory semantics).
*
* <p>Sample for StorageClient:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
* storageClient.deleteBucket(name);
* }
* }</pre>
*/
@Generated("by gapic-generator-java")
package com.google.storage.v2;

import javax.annotation.Generated;
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.storage.v2.stub;

import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcCallableFactory;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.BatchingCallSettings;
import com.google.api.gax.rpc.BidiStreamingCallable;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientStreamingCallable;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.ServerStreamingCallSettings;
import com.google.api.gax.rpc.ServerStreamingCallable;
import com.google.api.gax.rpc.StreamingCallSettings;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* gRPC callable factory implementation for the Storage service API.
*
* <p>This class is for advanced usage.
*/
@Generated("by gapic-generator-java")
public class GrpcStorageCallableFactory implements GrpcStubCallableFactory {

@Override
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
UnaryCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT, PagedListResponseT>
UnaryCallable<RequestT, PagedListResponseT> createPagedCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
BatchingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createBatchingCallable(
grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT, MetadataT>
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
GrpcCallSettings<RequestT, Operation> grpcCallSettings,
OperationCallSettings<RequestT, ResponseT, MetadataT> callSettings,
ClientContext clientContext,
OperationsStub operationsStub) {
return GrpcCallableFactory.createOperationCallable(
grpcCallSettings, callSettings, clientContext, operationsStub);
}

@Override
public <RequestT, ResponseT>
BidiStreamingCallable<RequestT, ResponseT> createBidiStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
StreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createBidiStreamingCallable(
grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT>
ServerStreamingCallable<RequestT, ResponseT> createServerStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
ServerStreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createServerStreamingCallable(
grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT>
ClientStreamingCallable<RequestT, ResponseT> createClientStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
StreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createClientStreamingCallable(
grpcCallSettings, callSettings, clientContext);
}
}
Loading

0 comments on commit f2976ad

Please sign in to comment.