encode_json("content_encoding", es_dump_type(string_type), f);
encode_json("content_language", es_dump_type(string_type), f);
encode_json("content_type", es_dump_type(string_type), f);
+ encode_json("storage_class", es_dump_type(string_type), f);
encode_json("etag", es_dump_type(string_type), f);
encode_json("expires", es_dump_type(string_type), f);
f->open_object_section("mtime");
ceph::real_time mtime;
string etag;
string content_type;
+ string storage_class;
map<string, string> custom_str;
map<string, int64_t> custom_int;
map<string, string> custom_date;
parse_time(mtime_str.c_str(), &mtime);
JSONDecoder::decode_json("etag", etag, obj);
JSONDecoder::decode_json("content_type", content_type, obj);
+ JSONDecoder::decode_json("storage_class", storage_class, obj);
list<_custom_entry<string> > str_entries;
JSONDecoder::decode_json("custom-string", str_entries, obj);
for (auto& e : str_entries) {
{ "last_modified", "meta.mtime" },
{ "contenttype", "meta.content_type" },
{ "content_type", "meta.content_type" },
+ { "storageclass", "meta.storage_class" },
+ { "storage_class", "meta.storage_class" },
};
es_query.set_field_aliases(&aliases);
{"meta.etag", ESEntityTypeMap::ES_ENTITY_STR},
{"meta.content_type", ESEntityTypeMap::ES_ENTITY_STR},
{"meta.mtime", ESEntityTypeMap::ES_ENTITY_DATE},
- {"meta.size", ESEntityTypeMap::ES_ENTITY_INT} };
+ {"meta.size", ESEntityTypeMap::ES_ENTITY_INT},
+ {"meta.storage_class", ESEntityTypeMap::ES_ENTITY_STR} };
ESEntityTypeMap gm(generic_map);
es_query.set_generic_type_map(&gm);
s->formatter->dump_int("Size", e.meta.size);
s->formatter->dump_format("ETag", "\"%s\"", e.meta.etag.c_str());
s->formatter->dump_string("ContentType", e.meta.content_type.c_str());
+ s->formatter->dump_string("StorageClass", e.meta.storage_class.c_str());
dump_owner(s, e.owner.get_id(), e.owner.get_display_name());
s->formatter->open_array_section("CustomMetadata");
for (auto& m : e.meta.custom_str) {