下面列出了怎么用com.fasterxml.jackson.annotation.JsonProperty的API类实例代码及写法,或者点击链接到github查看源代码。
@JsonCreator
public PlanCostEstimate(
@JsonProperty("cpuCost") double cpuCost,
@JsonProperty("maxMemory") double maxMemory,
@JsonProperty("maxMemoryWhenOutputting") double maxMemoryWhenOutputting,
@JsonProperty("networkCost") double networkCost,
@JsonProperty("rootNodeLocalCostEstimate") LocalCostEstimate rootNodeLocalCostEstimate)
{
checkArgument(!(cpuCost < 0), "cpuCost cannot be negative: %s", cpuCost);
checkArgument(!(maxMemory < 0), "maxMemory cannot be negative: %s", maxMemory);
checkArgument(!(maxMemoryWhenOutputting < 0), "maxMemoryWhenOutputting cannot be negative: %s", maxMemoryWhenOutputting);
checkArgument(!(maxMemoryWhenOutputting > maxMemory), "maxMemoryWhenOutputting cannot be greater than maxMemory: %s > %s", maxMemoryWhenOutputting, maxMemory);
checkArgument(!(networkCost < 0), "networkCost cannot be negative: %s", networkCost);
this.cpuCost = cpuCost;
this.maxMemory = maxMemory;
this.maxMemoryWhenOutputting = maxMemoryWhenOutputting;
this.networkCost = networkCost;
this.rootNodeLocalCostEstimate = requireNonNull(rootNodeLocalCostEstimate, "rootNodeLocalCostEstimate is null");
}
@JsonCreator
public SingularityAppcImage(
@JsonProperty("name") String name,
@JsonProperty("id") Optional<String> id
) {
this.name = name;
this.id = id;
}
/**
* Get firstName
* @return firstName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFirstName() {
return firstName;
}
@JsonCreator
public HashToMergeExchange(@JsonProperty("child") PhysicalOperator child,
@JsonProperty("expr") LogicalExpression expr,
@JsonProperty("orderings") List<Ordering> orderExprs) {
super(child);
this.distExpr = expr;
this.orderExprs = orderExprs;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("useEncryption")
public SamlConfigurationPropertyItemsBoolean getUseEncryption() {
return useEncryption;
}
@JsonCreator
public SingularityS3SearchRequest(
@JsonProperty("requestsAndDeploys") Map<String, List<String>> requestsAndDeploys,
@JsonProperty("fileNamePrefixWhitelist") List<String> fileNamePrefixWhitelist,
@JsonProperty("taskIds") List<String> taskIds,
@JsonProperty("start") Optional<Long> start,
@JsonProperty("end") Optional<Long> end,
@JsonProperty("excludeMetadata") boolean excludeMetadata,
@JsonProperty("listOnly") boolean listOnly,
@JsonProperty("maxPerPage") Optional<Integer> maxPerPage,
@JsonProperty("continuationTokens") Map<String, ContinuationToken> continuationTokens
) {
this.requestsAndDeploys =
requestsAndDeploys != null
? requestsAndDeploys
: Collections.<String, List<String>>emptyMap();
this.fileNamePrefixWhitelist =
fileNamePrefixWhitelist != null ? fileNamePrefixWhitelist : Collections.emptyList();
this.taskIds = taskIds != null ? taskIds : Collections.<String>emptyList();
this.start = start;
this.end = end;
this.excludeMetadata = excludeMetadata;
this.listOnly = listOnly;
this.maxPerPage = maxPerPage;
this.continuationTokens =
continuationTokens != null
? continuationTokens
: Collections.<String, ContinuationToken>emptyMap();
}
/**
* Get name
* @return name
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonCreator
public LocalFileTableHandle(
@JsonProperty("schemaTableName") SchemaTableName schemaTableName,
@JsonProperty("timestampColumn") OptionalInt timestampColumn,
@JsonProperty("serverAddressColumn") OptionalInt serverAddressColumn,
@JsonProperty("constraint") TupleDomain<ColumnHandle> constraint)
{
this.schemaTableName = requireNonNull(schemaTableName, "schemaTableName is null");
this.timestampColumn = requireNonNull(timestampColumn, "timestampColumn is null");
this.serverAddressColumn = requireNonNull(serverAddressColumn, "serverAddressColumn is null");
this.constraint = requireNonNull(constraint, "constraint is null");
}
public OrderPlacedEvent(@JsonProperty("aggregateId") OrderId id,
@JsonProperty("version") int version,
@JsonProperty("timestamp") long timestamp,
@JsonProperty("customerInformation") CustomerInformation customerInformation,
@JsonProperty("orderLines") List<OrderLine> orderLines,
@JsonProperty("orderAmount") long orderAmount) {
super(id, version, timestamp);
this.customerInformation = customerInformation;
this.orderLines = Collections.unmodifiableList(orderLines);
this.orderAmount = orderAmount;
}
@ApiModelProperty(example = "[\"birthdate\",\"gender\"]", required = true, value = "")
@JsonProperty("claims")
@Valid
@NotNull(message = "Property claims cannot be null.")
public List<String> getClaims() {
return claims;
}
@JsonProperty( "mentions" )
@JacksonXmlElementWrapper( localName = "mentions", namespace = DxfNamespaces.DXF_2_0 )
@JacksonXmlProperty( localName = "mentions", namespace = DxfNamespaces.DXF_2_0 )
public List<Mention> getMentions()
{
return mentions;
}
@JsonCreator
public CloneProjectRequest(@JsonProperty(value = "project", required = true) String project,
@JsonProperty(value = "version", required = true) String version,
@JsonProperty(value = "includeTags") boolean includeTags,
@JsonProperty(value = "includeProperties") boolean includeProperties,
@JsonProperty(value = "includeDependencies") boolean includeDependencies,
@JsonProperty(value = "includeAuditHistory") boolean includeAuditHistory) {
this.project = project;
this.version = version;
this.includeTags = includeTags;
this.includeProperties = includeProperties;
this.includeDependencies = includeDependencies;
this.includeAuditHistory = includeAuditHistory;
}
@JsonProperty
@JsonSerialize( using = JacksonPeriodTypeSerializer.class )
@JsonDeserialize( using = JacksonPeriodTypeDeserializer.class )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
@Property( PropertyType.TEXT )
public PeriodType getPeriodType()
{
return periodType;
}
@JsonCreator
public InfoSchemaGroupScan(
@JsonProperty("props") OpProps props,
@JsonProperty("table") InformationSchemaTable table,
@JsonProperty("columns") List<SchemaPath> columns,
@JsonProperty("query") SearchQuery query,
@JsonProperty("pluginId") StoragePluginId pluginId
) {
super(props);
this.table = table;
this.columns = columns;
this.query = query;
this.pluginId = pluginId;
}
@Override
@JsonProperty("id")
public Integer getId() {
return id;
}
@Override
@JsonProperty(PROP_VERSION)
public String getVersion() {
return _version;
}
@JsonProperty("password")
public String getPassword() {
return this.password;
}
@JsonProperty("ModifyIndex")
public BigInteger getModifyIndex() {
return modifyIndex;
}
@JsonProperty("tel")
public String getTel() {
return this.tel;
}
@ApiModelProperty(example = "3", value = "The number of alerts")
@JsonProperty("count")
public Integer getCount() {
return count;
}
@Nullable
@JsonProperty("Mounts")
public abstract ImmutableList<ContainerMount> mounts();
@JsonCreator MovieEntityMixin(@JsonProperty("title") final String title,
@JsonProperty("description") final String description) {
}
@JsonProperty("result")
public Builder withResult(com.amazon.ask.smapi.model.v1.skill.certification.CertificationResult result) {
this.result = result;
return this;
}
@JsonProperty("aggregation")
public abstract Optional<Aggregation> aggregation();
@JsonProperty("planner")
public PlannerProxy getPlannerProxy() {
return planner;
}
@JsonProperty("PreemptedAllocs")
public List<AllocationListStub> getPreemptedAllocs() {
return preemptedAllocs;
}
@ApiModelProperty(value = "")
@JsonProperty("addGroupMemberships")
public SamlConfigurationPropertyItemsBoolean getAddGroupMemberships() {
return addGroupMemberships;
}
@ApiModelProperty(example = "50", required = true, value = "Maximum number of requests which can be sent within a provided unit time ")
@JsonProperty("requestCount")
@NotNull
public Long getRequestCount() {
return requestCount;
}
@JsonProperty("mapped_to_field")
public String getMappedToField() {
return mappedToField;
}
@JsonProperty
public Type getColumnType()
{
return columnType;
}