use of com.google.storage.v2.HmacKeyMetadata in project gapic-generator-java by googleapis.
the class AsyncUpdateHmacKey method asyncUpdateHmacKey.
public static void asyncUpdateHmacKey() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
UpdateHmacKeyRequest request = UpdateHmacKeyRequest.newBuilder().setHmacKey(HmacKeyMetadata.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
ApiFuture<HmacKeyMetadata> future = storageClient.updateHmacKeyCallable().futureCall(request);
// Do something.
HmacKeyMetadata response = future.get();
}
}
use of com.google.storage.v2.HmacKeyMetadata in project gapic-generator-java by googleapis.
the class SyncUpdateHmacKeyHmackeymetadataFieldmask method syncUpdateHmacKeyHmackeymetadataFieldmask.
public static void syncUpdateHmacKeyHmackeymetadataFieldmask() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
HmacKeyMetadata response = storageClient.updateHmacKey(hmacKey, updateMask);
}
}
use of com.google.storage.v2.HmacKeyMetadata in project gapic-generator-java by googleapis.
the class SyncGetHmacKeyStringProjectname method syncGetHmacKeyStringProjectname.
public static void syncGetHmacKeyStringProjectname() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
String accessId = "accessId-2146437729";
ProjectName project = ProjectName.of("[PROJECT]");
HmacKeyMetadata response = storageClient.getHmacKey(accessId, project);
}
}
use of com.google.storage.v2.HmacKeyMetadata in project gapic-generator-java by googleapis.
the class SyncGetHmacKeyStringString method syncGetHmacKeyStringString.
public static void syncGetHmacKeyStringString() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
String accessId = "accessId-2146437729";
String project = ProjectName.of("[PROJECT]").toString();
HmacKeyMetadata response = storageClient.getHmacKey(accessId, project);
}
}
use of com.google.storage.v2.HmacKeyMetadata in project gapic-generator-java by googleapis.
the class AsyncGetHmacKey method asyncGetHmacKey.
public static void asyncGetHmacKey() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
GetHmacKeyRequest request = GetHmacKeyRequest.newBuilder().setAccessId("accessId-2146437729").setProject(ProjectName.of("[PROJECT]").toString()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
ApiFuture<HmacKeyMetadata> future = storageClient.getHmacKeyCallable().futureCall(request);
// Do something.
HmacKeyMetadata response = future.get();
}
}
Aggregations