001package com.box.sdkgen.schemas.metadatafieldfilterfloatrange; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.fasterxml.jackson.annotation.JsonFilter; 006import java.util.Objects; 007 008/** 009 * Specifies which `float` field on the template to filter the search results by, specifying a range 010 * of values that can match. 011 */ 012@JsonFilter("nullablePropertyFilter") 013public class MetadataFieldFilterFloatRange extends SerializableObject { 014 015 /** 016 * Specifies the (inclusive) upper bound for the metadata field value. The value of a field must 017 * be lower than (`lt`) or equal to this value for the search query to match this template. 018 */ 019 protected Double lt; 020 021 /** 022 * Specifies the (inclusive) lower bound for the metadata field value. The value of a field must 023 * be greater than (`gt`) or equal to this value for the search query to match this template. 024 */ 025 protected Double gt; 026 027 public MetadataFieldFilterFloatRange() { 028 super(); 029 } 030 031 protected MetadataFieldFilterFloatRange(Builder builder) { 032 super(); 033 this.lt = builder.lt; 034 this.gt = builder.gt; 035 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 036 } 037 038 public Double getLt() { 039 return lt; 040 } 041 042 public Double getGt() { 043 return gt; 044 } 045 046 @Override 047 public boolean equals(Object o) { 048 if (this == o) { 049 return true; 050 } 051 if (o == null || getClass() != o.getClass()) { 052 return false; 053 } 054 MetadataFieldFilterFloatRange casted = (MetadataFieldFilterFloatRange) o; 055 return Objects.equals(lt, casted.lt) && Objects.equals(gt, casted.gt); 056 } 057 058 @Override 059 public int hashCode() { 060 return Objects.hash(lt, gt); 061 } 062 063 @Override 064 public String toString() { 065 return "MetadataFieldFilterFloatRange{" + "lt='" + lt + '\'' + ", " + "gt='" + gt + '\'' + "}"; 066 } 067 068 public static class Builder extends NullableFieldTracker { 069 070 protected Double lt; 071 072 protected Double gt; 073 074 public Builder lt(Double lt) { 075 this.lt = lt; 076 return this; 077 } 078 079 public Builder gt(Double gt) { 080 this.gt = gt; 081 return this; 082 } 083 084 public MetadataFieldFilterFloatRange build() { 085 return new MetadataFieldFilterFloatRange(this); 086 } 087 } 088}