public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }
@Override public String toString() { return value(); }
public static AccessTier fromValue(String tier) { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(tier, "tier"))); }
currentBlobType = BlobType.fromValue(currentText.toString()); } else if (qName.equals("AccessTier")) { currentAccessTier = AccessTier.fromValue(currentText.toString()); } else if (qName.equals("LeaseStatus")) { currentLeaseStatus = LeaseStatus.fromValue(currentText.toString());
/** * This implementation invokes {@link AzureBlobClient#putObject} * * @param container * container name * @param blob * object */ @Override public String putBlob(String container, Blob blob, PutOptions options) { if (options.getBlobAccess() != BlobAccess.PRIVATE) { throw new UnsupportedOperationException("blob access not supported by Azure"); } String eTag; if (options.isMultipart()) { eTag = putMultipartBlob(container, blob, options); } else { eTag = sync.putBlob(container, blob2AzureBlob.apply(blob)); } Tier tier = blob.getMetadata().getTier(); if (tier != Tier.STANDARD) { sync.setBlobTier(container, blob.getMetadata().getName(), AccessTier.fromTier(tier)); } return eTag; }
to.setTier((tier != null ? tier : AccessTier.HOT).toTier()); return to;
/** * parses the http response headers to create a new {@link MutableBlobProperties} object. */ public MutableBlobProperties apply(HttpResponse from) { BlobMetadata base = blobMetadataParser.apply(from); MutableBlobProperties to = blobToBlobProperties.apply(base); to.setContainer(container); String tier = from.getFirstHeaderOrNull("x-ms-access-tier"); if (tier != null) { to.setTier(AccessTier.fromValue(tier)); } return to; }