All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qcloud.cos.model.StorageClass Maven / Gradle / Ivy

There is a newer version: 5.6.238.2
Show newest version
package com.qcloud.cos.model;

/**
 * 

* Specifies constants that define COS storage classes. The standard storage class * is the default storage class. *

*

* Qcloud COS offers multiple storage classes for different customers' needs. The * STANDARD storage class is the default storage class, and means that * redundant copies of data will be stored in different locations. *

*/ public enum StorageClass { /** * The default COS class. This storage class * is recommended for critical, non-reproducible data. The standard * storage class is a highly available and highly redundant storage option * provided for an affordable price. */ Standard("Standard"), /** * STANDARD_IA */ Standard_IA("Standard_IA"), /** * Archive */ Archive("Archive"); /** * Returns the Qcloud COS {@link StorageClass} enumeration value representing the * specified Qcloud COS StorageClass ID string. * If the specified string doesn't map to a known Qcloud COS storage class, * an IllegalArgumentException is thrown. * * @param cosStorageClassString The Qcloud COS storage class ID string. * @return The Qcloud COS StorageClass enumeration value representing the * specified Qcloud COS storage class ID. * @throws IllegalArgumentException If the specified value does not map to one of the known * Qcloud COS storage classes. */ public static StorageClass fromValue(String cosStorageClassString) throws IllegalArgumentException { for (StorageClass storageClass : StorageClass.values()) { if (storageClass.toString().equals(cosStorageClassString)) return storageClass; } throw new IllegalArgumentException( "Cannot create enum from " + cosStorageClassString + " value!"); } private final String storageClassId; private StorageClass(String id) { this.storageClassId = id; } /* (non-Javadoc) * @see java.lang.Enum#toString() */ @Override public String toString() { return storageClassId; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy