-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POSC support for Storage #1670
POSC support for Storage #1670
Conversation
Changes Unknown when pulling 37f08e9 on shinfan:master into ** on GoogleCloudPlatform:master**. |
@@ -357,6 +363,7 @@ static CustomerEncryption fromPb(StorageObject.CustomerEncryption customerEncryp | |||
|
|||
abstract Builder setCustomerEncryption(CustomerEncryption customerEncryption); | |||
|
|||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -66,6 +66,8 @@ | |||
private static final String KEY_SHA256 = "keySha"; | |||
private static final CustomerEncryption CUSTOMER_ENCRYPTION = | |||
new CustomerEncryption(ENCRYPTION_ALGORITHM, KEY_SHA256); | |||
private static final String STORAGE_CLASS = "COLDLINE"; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
7840605
to
37f08e9
Compare
@michaelbausor PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, otherwise LGTM
/** | ||
* String constants for the names of the storage classes. | ||
*/ | ||
public class StorageClass { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@garrettjonesgoogle PTAL |
* Enums for the storage classes. | ||
* See https://cloud.google.com/storage/docs/storage-classes for details. | ||
*/ | ||
public enum StorageClass { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -100,7 +101,7 @@ public Bucket createBucketWithStorageClassAndLocation(String bucketName) { | |||
// [START createBucketWithStorageClassAndLocation] | |||
Bucket bucket = storage.create(BucketInfo.newBuilder(bucketName) | |||
// See here for possible values: http://g.co/cloud/storage/docs/storage-classes | |||
.setStorageClass("COLDLINE") | |||
.setStorageClass(StorageClass.COLDLINE) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
/** | ||
* Sets the bucket's storage class. This defines how blobs in the bucket are stored and | ||
* determines the SLA and the cost of storage. A list of supported values is available | ||
* <a href="https://cloud.google.com/storage/docs/storage-classes">here</a>. | ||
*/ | ||
public abstract Builder setStorageClass(String storageClass); | ||
public abstract Builder setStorageClass(StorageClass storageClass); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -416,14 +416,14 @@ void populateCondition(Rule.Condition condition) { | |||
* <a href="https://cloud.google.com/storage/docs/storage-classes">here</a>. | |||
*/ | |||
@Deprecated | |||
public abstract Builder storageClass(String storageClass); | |||
public abstract Builder storageClass(StorageClass storageClass); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -0,0 +1,48 @@ | |||
/* | |||
* Copyright 2015 Google Inc. All Rights Reserved. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
return setStorageClass(storageClass); | ||
} | ||
|
||
@Override | ||
public Builder setStorageClass(String storageClass) { | ||
public Builder setStorageClass(StorageClass storageClass) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@garrettjonesgoogle PTAL |
LGTM |
Changes Unknown when pulling 59499dc on shinfan:master into ** on GoogleCloudPlatform:master**. |
Fixes: #1602
Tests: Unit tests, Integration tests
cc @omaray