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

docs: label legacy storage classes in documentation #267

Merged
merged 3 commits into from
Apr 17, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
import com.google.cloud.StringEnumValue;

/**
* Enums for the storage classes. See https://cloud.google.com/storage/docs/storage-classes for
* details.
* Enums for the storage classes. See <a
* href="https://cloud.google.com/storage/docs/storage-classes">https://cloud.google.com/storage/docs/storage-classes</a>
* for details.
*/
public final class StorageClass extends StringEnumValue {
private static final long serialVersionUID = -6938125060419556331L;
Expand All @@ -42,42 +43,64 @@ public StorageClass apply(String constant) {
new StringEnumType(StorageClass.class, CONSTRUCTOR);

/**
* Standard storage class. See: https://cloud.google.com/storage/docs/storage-classes for details
* Standard storage class.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#standard">https://cloud.google.com/storage/docs/storage-classes#standard</a>
*/
public static final StorageClass STANDARD = type.createAndRegister("STANDARD");

/**
* Nearline storage class. See: https://cloud.google.com/storage/docs/storage-classes for details
* Nearline storage class.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#nearline">https://cloud.google.com/storage/docs/storage-classes#nearline</a>
*/
public static final StorageClass NEARLINE = type.createAndRegister("NEARLINE");

/**
* Coldline storage class. See: https://cloud.google.com/storage/docs/storage-classes for details
* Coldline storage class.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#coldline">https://cloud.google.com/storage/docs/storage-classes#coldline</a>
*/
public static final StorageClass COLDLINE = type.createAndRegister("COLDLINE");

/**
* Archive storage class. See: https://cloud.google.com/storage/docs/storage-classes for details
* Archive storage class.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#archive">https://cloud.google.com/storage/docs/storage-classes#archive</a>
*/
public static final StorageClass ARCHIVE = type.createAndRegister("ARCHIVE");

/**
* Regional storage class. This is supported as a legacy storage class and will be deprecated in
* the future. See: https://cloud.google.com/storage/docs/storage-classes for details
* the future. This class cannot be set. Unless you already are using it, you should use {@link
* #STANDARD} instead.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#legacy">https://cloud.google.com/storage/docs/storage-classes#legacy</a>
*/
public static final StorageClass REGIONAL = type.createAndRegister("REGIONAL");

/**
* Multi-regional storage class. This is supported as a legacy storage class and will be
* deprecated in the future. See: https://cloud.google.com/storage/docs/storage-classes for
* details
* deprecated in the future. This class cannot be set. Unless you already are using it, you should
Copy link
Member

@frankyn frankyn Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy storage classes can still be set, please remove This class cannot be set for all legacy storage classes.

Additionally, the issue that didn't across in my issue is that a developer at first only see's Mult-regional storage class. and not the rest.

ySdN1VJtAXu

The additional information isn't available until scrolling down:

FAuvGNOgqhx

If it's being truncated because of the period .. then I recommend this:

Legacy Multi-regional storage class, use STANDARD storage class for new buckets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy Multi-regional storage class, use REGIONAL storage class for new buckets.

  1. Do you really mean REGIONAL?

https://cloud.google.com/storage/docs/storage-classes#legacy recommends STANDARD class:

Unless you already are using one of these additional classes, you should use Standard Storage instead.

  1. A storage class can be set not only for buckets, but for object as well. And not only for new, but for existing. Right? May be it's not correct to say for new buckets

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ I meant STANDARD.

Good catch (blobs vs buckets), then use:

Legacy {Storage class} storage class, use STANDARD storage class instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legacyStorageClasses1

...

legacyStorageClasses2

* use {@link #STANDARD} instead.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#legacy">https://cloud.google.com/storage/docs/storage-classes#legacy</a>
*/
public static final StorageClass MULTI_REGIONAL = type.createAndRegister("MULTI_REGIONAL");

/**
* Durable Reduced Availability storage class. This is supported as a legacy storage class and
* will be deprecated in the future. See: https://cloud.google.com/storage/docs/storage-classes
* for details
* will be deprecated in the future. This class cannot be set. Unless you already are using it,
* you should use {@link #STANDARD} instead.
*
* @see <a
* href="https://cloud.google.com/storage/docs/storage-classes#legacy">https://cloud.google.com/storage/docs/storage-classes#legacy</a>
*/
public static final StorageClass DURABLE_REDUCED_AVAILABILITY =
type.createAndRegister("DURABLE_REDUCED_AVAILABILITY");
Expand Down