use of com.google.cloud.iam.credentials.v1.SignBlobResponse in project gapic-generator-java by googleapis.
the class AsyncSignBlob method asyncSignBlob.
public static void asyncSignBlob() throws Exception {
// It may require modifications to work in your environment.
try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
SignBlobRequest request = SignBlobRequest.newBuilder().setName(ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]").toString()).addAllDelegates(new ArrayList<String>()).setPayload(ByteString.EMPTY).build();
ApiFuture<SignBlobResponse> future = iamCredentialsClient.signBlobCallable().futureCall(request);
// Do something.
SignBlobResponse response = future.get();
}
}
use of com.google.cloud.iam.credentials.v1.SignBlobResponse in project gapic-generator-java by googleapis.
the class SyncSignBlobServiceaccountnameListstringBytestring method syncSignBlobServiceaccountnameListstringBytestring.
public static void syncSignBlobServiceaccountnameListstringBytestring() throws Exception {
// It may require modifications to work in your environment.
try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
ServiceAccountName name = ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]");
List<String> delegates = new ArrayList<>();
ByteString payload = ByteString.EMPTY;
SignBlobResponse response = iamCredentialsClient.signBlob(name, delegates, payload);
}
}
use of com.google.cloud.iam.credentials.v1.SignBlobResponse in project gapic-generator-java by googleapis.
the class SyncSignBlobStringListstringBytestring method syncSignBlobStringListstringBytestring.
public static void syncSignBlobStringListstringBytestring() throws Exception {
// It may require modifications to work in your environment.
try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
String name = ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]").toString();
List<String> delegates = new ArrayList<>();
ByteString payload = ByteString.EMPTY;
SignBlobResponse response = iamCredentialsClient.signBlob(name, delegates, payload);
}
}
use of com.google.cloud.iam.credentials.v1.SignBlobResponse in project gapic-generator-java by googleapis.
the class SyncSignBlob method syncSignBlob.
public static void syncSignBlob() throws Exception {
// It may require modifications to work in your environment.
try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
SignBlobRequest request = SignBlobRequest.newBuilder().setName(ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]").toString()).addAllDelegates(new ArrayList<String>()).setPayload(ByteString.EMPTY).build();
SignBlobResponse response = iamCredentialsClient.signBlob(request);
}
}
Aggregations