com.google.api.services.storage.model.Bucket.setVersioning()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中com.google.api.services.storage.model.Bucket.setVersioning()方法的一些代码示例,展示了Bucket.setVersioning()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bucket.setVersioning()方法的具体详情如下:
包路径:com.google.api.services.storage.model.Bucket
类名称:Bucket
方法名:setVersioning

Bucket.setVersioning介绍

暂无

代码示例

代码示例来源:origin: googleapis/google-cloud-java

bucketPb.setVersioning(new Versioning().setEnabled(versioningEnabled));

代码示例来源:origin: spinnaker/kayenta

Bucket bucket = new Bucket().setName(bucketName).setVersioning(versioning);

代码示例来源:origin: spinnaker/halyard

private static Bucket createBucket(Storage storage, String projectId, String locationId, String bucketId) {
 try {
  Bucket bucket = new Bucket()
    .setLocation(locationId)
    .setName(bucketId)
    .setVersioning(new Bucket.Versioning().setEnabled(true));
  if (!StringUtils.isEmpty(locationId)) {
   bucket.setLocation(locationId);
  }
  return storage.buckets().insert(projectId, bucket).execute();
 } catch (IOException e) {
  throw new RuntimeException("Unable to create bucket", e);
 }
}

代码示例来源:origin: com.netflix.spinnaker.halyard/halyard-backup

private static Bucket createBucket(Storage storage, String projectId, String locationId, String bucketId) {
 try {
  Bucket bucket = new Bucket()
    .setLocation(locationId)
    .setName(bucketId)
    .setVersioning(new Bucket.Versioning().setEnabled(true));
  if (!StringUtils.isEmpty(locationId)) {
   bucket.setLocation(locationId);
  }
  return storage.buckets().insert(projectId, bucket).execute();
 } catch (IOException e) {
  throw new RuntimeException("Unable to create bucket", e);
 }
}

代码示例来源:origin: com.google.gcloud/gcloud-java-storage

bucketPb.setVersioning(new Versioning().setEnabled(versioningEnabled));

代码示例来源:origin: com.google.cloud/google-cloud-storage

bucketPb.setVersioning(new Versioning().setEnabled(versioningEnabled));

相关文章