use of com.google.storage.v2.StorageClient in project gapic-generator-java by googleapis.
the class SyncUpdateBucketBucketFieldmask method syncUpdateBucketBucketFieldmask.
public static void syncUpdateBucketBucketFieldmask() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
Bucket bucket = Bucket.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Bucket response = storageClient.updateBucket(bucket, updateMask);
}
}
use of com.google.storage.v2.StorageClient 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.StorageClient 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.StorageClient in project gapic-generator-java by googleapis.
the class SyncUpdateObject method syncUpdateObject.
public static void syncUpdateObject() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
UpdateObjectRequest request = UpdateObjectRequest.newBuilder().setObject(Object.newBuilder().build()).setIfGenerationMatch(-1086241088).setIfGenerationNotMatch(1475720404).setIfMetagenerationMatch(1043427781).setIfMetagenerationNotMatch(1025430873).setPredefinedAcl(PredefinedObjectAcl.forNumber(0)).setUpdateMask(FieldMask.newBuilder().build()).setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
Object response = storageClient.updateObject(request);
}
}
use of com.google.storage.v2.StorageClient in project gapic-generator-java by googleapis.
the class SyncUpdateObjectObjectFieldmask method syncUpdateObjectObjectFieldmask.
public static void syncUpdateObjectObjectFieldmask() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
Object object = Object.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Object response = storageClient.updateObject(object, updateMask);
}
}
Aggregations