/** * This code was auto-generated by a Codezu. * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. */ package com.mozu.api.contracts.content; import java.util.List; import java.util.HashMap; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.joda.time.DateTime; import java.io.IOException; import java.lang.ClassNotFoundException; import com.mozu.api.contracts.content.ViewField; /** * A view can select which fields are returned from a document query. */ @JsonIgnoreProperties(ignoreUnknown = true) public class View implements Serializable { // Default Serial Version UID private static final long serialVersionUID = 1L; /** * A set of expressions that consist of a field, operator, and value and represent search parameter syntax when filtering results of a query. Valid operators include equals (eq), does not equal (ne), greater than (gt), less than (lt), greater than or equal to (ge), less than or equal to (le), starts with (sw), or contains (cont). For example - "filter=IsDisplayed+eq+true" */ protected String filter; public String getFilter() { return this.filter; } public void setFilter(String filter) { this.filter = filter; } /** * Specifies how to filter views based on the status of a document.You can specify the following values for this property: or null—all documents return in the view.—only documents within the active date range (or documents without an active date range specified) return in the view.—only documents with an active date range set in the future return in the view.—only scheduled and active documents return in the view.—only documents with an active date range set in the past return in the view. */ protected String includeInactiveMode; public String getIncludeInactiveMode() { return this.includeInactiveMode; } public void setIncludeInactiveMode(String includeInactiveMode) { this.includeInactiveMode = includeInactiveMode; } /** * If , specifies that the view is the default view for a documentList or documentListType when viewed in . If no view is specified as default, then the first view in the documentList or documentListType is default. Only one view within a documentList or documentListType can have this value set to . */ protected Boolean isAdminDefault; public Boolean getIsAdminDefault() { return this.isAdminDefault; } public void setIsAdminDefault(Boolean isAdminDefault) { this.isAdminDefault = isAdminDefault; } /** * The isVisibleInStorefront field indicates whether documents in the view can be accessed from the storefront application. If true, the storefront application and storefront client application (javascript tier) can GET documents from the view. */ protected Boolean isVisibleInStorefront; public Boolean getIsVisibleInStorefront() { return this.isVisibleInStorefront; } public void setIsVisibleInStorefront(Boolean isVisibleInStorefront) { this.isVisibleInStorefront = isVisibleInStorefront; } /** * The user supplied name that appears in . You can use this field for identification purposes. */ protected String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } /** * A string array that determines where the document or entity list displays. The options are , for displaying content in the Custom Schema page in , and , for displaying content in the site tree in Site Builder (applies only to document lists). The following example demonstrates how to display content across both options: */ protected List<String> usages; public List<String> getUsages() { return this.usages; } public void setUsages(List<String> usages) { this.usages = usages; } /** * The list of fields to display for a view or an associated schema. For example, the address schema would display fields for postal addresses. */ protected List<ViewField> fields; public List<ViewField> getFields() { return this.fields; } public void setFields(List<ViewField> fields) { this.fields = fields; } /** * Metadata content for entities, used by document lists, document type lists, document type, views, entity lists, and list views. */ protected transient com.fasterxml.jackson.databind.JsonNode metadata; public com.fasterxml.jackson.databind.JsonNode getMetadata() { return this.metadata; } public void setMetadata(com.fasterxml.jackson.databind.JsonNode metadata) { this.metadata = metadata; } private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); if(metadata == null){ out.writeBoolean(false); } else { out.writeBoolean(true); new com.fasterxml.jackson.databind.ObjectMapper().configure(com.fasterxml.jackson.core.JsonGenerator.Feature.AUTO_CLOSE_TARGET, false).writeValue(out, metadata); } } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if(in.readBoolean()){ this.metadata = new com.fasterxml.jackson.databind.ObjectMapper().configure(com.fasterxml.jackson.core.JsonParser.Feature.AUTO_CLOSE_SOURCE, false).readValue(in, com.fasterxml.jackson.databind.JsonNode.class); } } }