Java Code Examples for com.fasterxml.jackson.annotation.JsonProperty

The following examples show how to use com.fasterxml.jackson.annotation.JsonProperty. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: presto   Source File: PlanCostEstimate.java    License: Apache License 2.0 6 votes vote down vote up
@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");
}
 
Example 2
Source Project: Singularity   Source File: SingularityAppcImage.java    License: Apache License 2.0 5 votes vote down vote up
@JsonCreator
public SingularityAppcImage(
  @JsonProperty("name") String name,
  @JsonProperty("id") Optional<String> id
) {
  this.name = name;
  this.id = id;
}
 
Example 3
Source Project: openapi-generator   Source File: User.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 4
Source Project: Bats   Source File: HashToMergeExchange.java    License: Apache License 2.0 5 votes vote down vote up
@JsonCreator
public HashToMergeExchange(@JsonProperty("child") PhysicalOperator child,
    @JsonProperty("expr") LogicalExpression expr,
    @JsonProperty("orderings") List<Ordering> orderExprs) {
  super(child);
  this.distExpr = expr;
  this.orderExprs = orderExprs;
}
 
Example 5
Source Project: swagger-aem   Source File: SamlConfigurationProperties.java    License: Apache License 2.0 5 votes vote down vote up
/**
 **/

@ApiModelProperty(value = "")
@JsonProperty("useEncryption")
public SamlConfigurationPropertyItemsBoolean getUseEncryption() {
  return useEncryption;
}
 
Example 6
Source Project: Singularity   Source File: SingularityS3SearchRequest.java    License: Apache License 2.0 5 votes vote down vote up
@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();
}
 
Example 7
Source Project: openapi-generator   Source File: Category.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Get name
 * @return name
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

public String getName() {
  return name;
}
 
Example 8
Source Project: presto   Source File: LocalFileTableHandle.java    License: Apache License 2.0 5 votes vote down vote up
@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");
}
 
Example 9
Source Project: bookstore-cqrs-example   Source File: OrderPlacedEvent.java    License: Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 10
Source Project: identity-api-server   Source File: Scope.java    License: Apache License 2.0 5 votes vote down vote up
@ApiModelProperty(example = "[\"birthdate\",\"gender\"]", required = true, value = "")
@JsonProperty("claims")
@Valid
@NotNull(message = "Property claims cannot be null.")

public List<String> getClaims() {
    return claims;
}
 
Example 11
@JsonProperty( "mentions" )
@JacksonXmlElementWrapper( localName = "mentions", namespace = DxfNamespaces.DXF_2_0 )
@JacksonXmlProperty( localName = "mentions", namespace = DxfNamespaces.DXF_2_0 )
public List<Mention> getMentions()
{
    return mentions;
}
 
Example 12
Source Project: dependency-track   Source File: CloneProjectRequest.java    License: Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 13
@JsonProperty
@JsonSerialize( using = JacksonPeriodTypeSerializer.class )
@JsonDeserialize( using = JacksonPeriodTypeDeserializer.class )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
@Property( PropertyType.TEXT )
public PeriodType getPeriodType()
{
    return periodType;
}
 
Example 14
Source Project: dremio-oss   Source File: InfoSchemaGroupScan.java    License: Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 15
Source Project: sdk-rest   Source File: Note.java    License: MIT License 4 votes vote down vote up
@Override
@JsonProperty("id")
public Integer getId() {
	return id;
}
 
Example 16
Source Project: batfish   Source File: IncrementalBdpAnswerElement.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@JsonProperty(PROP_VERSION)
public String getVersion() {
  return _version;
}
 
Example 17
Source Project: govpay   Source File: Stazione.java    License: GNU General Public License v3.0 4 votes vote down vote up
@JsonProperty("password")
public String getPassword() {
  return this.password;
}
 
Example 18
Source Project: nomad-java-sdk   Source File: JobSummary.java    License: Mozilla Public License 2.0 4 votes vote down vote up
@JsonProperty("ModifyIndex")
public BigInteger getModifyIndex() {
    return modifyIndex;
}
 
Example 19
Source Project: govpay   Source File: UnitaOperativa.java    License: GNU General Public License v3.0 4 votes vote down vote up
@JsonProperty("tel")
public String getTel() {
  return this.tel;
}
 
Example 20
Source Project: carbon-apimgt   Source File: AlertTypesListDTO.java    License: Apache License 2.0 4 votes vote down vote up
@ApiModelProperty(example = "3", value = "The number of alerts")
@JsonProperty("count")
public Integer getCount() {
  return count;
}
 
Example 21
Source Project: docker-client   Source File: Container.java    License: Apache License 2.0 4 votes vote down vote up
@Nullable
@JsonProperty("Mounts")
public abstract ImmutableList<ContainerMount> mounts();
 
Example 22
Source Project: sdn-rx   Source File: MovieModule.java    License: Apache License 2.0 4 votes vote down vote up
@JsonCreator MovieEntityMixin(@JsonProperty("title") final String title,
	@JsonProperty("description") final String description) {
}
 
Example 23
Source Project: alexa-apis-for-java   Source File: CertificationResponse.java    License: Apache License 2.0 4 votes vote down vote up
@JsonProperty("result")

        public Builder withResult(com.amazon.ask.smapi.model.v1.skill.certification.CertificationResult result) {
            this.result = result;
            return this;
        }
 
Example 24
Source Project: heroic   Source File: QueryMetrics.java    License: Apache License 2.0 4 votes vote down vote up
@JsonProperty("aggregation")
public abstract Optional<Aggregation> aggregation();
 
Example 25
Source Project: SeaCloudsPlatform   Source File: DashboardConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@JsonProperty("planner")
public PlannerProxy getPlannerProxy() {
    return planner;
}
 
Example 26
Source Project: nomad-java-sdk   Source File: PlanAnnotations.java    License: Mozilla Public License 2.0 4 votes vote down vote up
@JsonProperty("PreemptedAllocs")
public List<AllocationListStub> getPreemptedAllocs() {
    return preemptedAllocs;
}
 
Example 27
Source Project: swagger-aem   Source File: SamlConfigurationProperties.java    License: Apache License 2.0 4 votes vote down vote up
@ApiModelProperty(value = "")
@JsonProperty("addGroupMemberships")
public SamlConfigurationPropertyItemsBoolean getAddGroupMemberships() {
  return addGroupMemberships;
}
 
Example 28
Source Project: carbon-apimgt   Source File: ThrottlingPolicyDTO.java    License: Apache License 2.0 4 votes vote down vote up
@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;
}
 
Example 29
Source Project: cubeai   Source File: InputField.java    License: Apache License 2.0 4 votes vote down vote up
@JsonProperty("mapped_to_field")
public String getMappedToField() {
	return mappedToField;
}
 
Example 30
Source Project: presto   Source File: ExampleColumnHandle.java    License: Apache License 2.0 4 votes vote down vote up
@JsonProperty
public Type getColumnType()
{
    return columnType;
}