Skip to content
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

Merged
merged 9 commits into from
Mar 7, 2017
Merged

POSC support for Storage #1670

merged 9 commits into from
Mar 7, 2017

Conversation

shinfan
Copy link
Contributor

@shinfan shinfan commented Feb 28, 2017

Fixes: #1602

Tests: Unit tests, Integration tests
cc @omaray

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2017
@shinfan shinfan added the api: storage Issues related to the Cloud Storage API. label Feb 28, 2017
@coveralls
Copy link

Coverage Status

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.

@@ -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.

@shinfan shinfan force-pushed the master branch 2 times, most recently from 7840605 to 37f08e9 Compare March 2, 2017 22:37
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 81.127% when pulling 37f08e9 on shinfan:master into a47d5a0 on GoogleCloudPlatform:master.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 3, 2017

@michaelbausor PTAL

Copy link
Contributor

@michaelbausor michaelbausor left a 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.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 3, 2017

@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.

This comment was marked as spam.

@@ -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.


/**
* 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.

This comment was marked as spam.

This comment was marked as spam.

@@ -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.

This comment was marked as spam.

This comment was marked as spam.

@@ -0,0 +1,48 @@
/*
* Copyright 2015 Google Inc. All Rights Reserved.

This comment was marked as spam.

This comment was marked as spam.

return setStorageClass(storageClass);
}

@Override
public Builder setStorageClass(String storageClass) {
public Builder setStorageClass(StorageClass storageClass) {

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 81.202% when pulling b3fc31d on shinfan:master into a47d5a0 on GoogleCloudPlatform:master.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 7, 2017

@garrettjonesgoogle PTAL

@garrettjonesgoogle
Copy link
Member

LGTM

@shinfan shinfan merged commit 007f340 into googleapis:master Mar 7, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0001%) to 81.437% when pulling 59499dc on shinfan:master into 5cbbbae on GoogleCloudPlatform:master.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 59499dc on shinfan:master into ** on GoogleCloudPlatform:master**.

rybosome pushed a commit to rybosome/google-cloud-java that referenced this pull request Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants