io.stigg.api.operations.fragment.FeatureFragment Maven / Gradle / Ivy
//
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL version '3.8.2'.
//
package io.stigg.api.operations.fragment;
import com.apollographql.apollo3.api.Fragment;
import io.stigg.api.operations.type.FeatureType;
import io.stigg.api.operations.type.MeterType;
import io.stigg.api.operations.type.UnitTransformationRound;
import java.lang.Double;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
public class FeatureFragment implements Fragment.Data {
public String __typename;
public FeatureType featureType;
public MeterType meterType;
public String featureUnits;
public String featureUnitsPlural;
public String description;
public String displayName;
public String refId;
/**
* Unit transformation to be applied to the reported usage
*/
public UnitTransformation unitTransformation;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public FeatureFragment(String __typename, FeatureType featureType, MeterType meterType,
String featureUnits, String featureUnitsPlural, String description, String displayName,
String refId, UnitTransformation unitTransformation) {
this.__typename = __typename;
this.featureType = featureType;
this.meterType = meterType;
this.featureUnits = featureUnits;
this.featureUnitsPlural = featureUnitsPlural;
this.description = description;
this.displayName = displayName;
this.refId = refId;
this.unitTransformation = unitTransformation;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof FeatureFragment) {
FeatureFragment that = (FeatureFragment) o;
return ((this.__typename == null) ? (that.__typename == null) : this.__typename.equals(that.__typename))
&&((this.featureType == null) ? (that.featureType == null) : this.featureType.equals(that.featureType))
&&((this.meterType == null) ? (that.meterType == null) : this.meterType.equals(that.meterType))
&&((this.featureUnits == null) ? (that.featureUnits == null) : this.featureUnits.equals(that.featureUnits))
&&((this.featureUnitsPlural == null) ? (that.featureUnitsPlural == null) : this.featureUnitsPlural.equals(that.featureUnitsPlural))
&&((this.description == null) ? (that.description == null) : this.description.equals(that.description))
&&((this.displayName == null) ? (that.displayName == null) : this.displayName.equals(that.displayName))
&&((this.refId == null) ? (that.refId == null) : this.refId.equals(that.refId))
&&((this.unitTransformation == null) ? (that.unitTransformation == null) : this.unitTransformation.equals(that.unitTransformation));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (__typename == null) ? 0 : __typename.hashCode();
__h *= 1000003;
__h ^= (featureType == null) ? 0 : featureType.hashCode();
__h *= 1000003;
__h ^= (meterType == null) ? 0 : meterType.hashCode();
__h *= 1000003;
__h ^= (featureUnits == null) ? 0 : featureUnits.hashCode();
__h *= 1000003;
__h ^= (featureUnitsPlural == null) ? 0 : featureUnitsPlural.hashCode();
__h *= 1000003;
__h ^= (description == null) ? 0 : description.hashCode();
__h *= 1000003;
__h ^= (displayName == null) ? 0 : displayName.hashCode();
__h *= 1000003;
__h ^= (refId == null) ? 0 : refId.hashCode();
__h *= 1000003;
__h ^= (unitTransformation == null) ? 0 : unitTransformation.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "FeatureFragment{"
+ "__typename=" + __typename + ", "
+ "featureType=" + featureType + ", "
+ "meterType=" + meterType + ", "
+ "featureUnits=" + featureUnits + ", "
+ "featureUnitsPlural=" + featureUnitsPlural + ", "
+ "description=" + description + ", "
+ "displayName=" + displayName + ", "
+ "refId=" + refId + ", "
+ "unitTransformation=" + unitTransformation
+ "}";
}
return $toString;
}
public static class UnitTransformation {
/**
* Divide usage by this number
*/
public Double divide;
/**
* After division, either round the result up or down
*/
public UnitTransformationRound round;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public UnitTransformation(Double divide, UnitTransformationRound round) {
this.divide = divide;
this.round = round;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof UnitTransformation) {
UnitTransformation that = (UnitTransformation) o;
return ((this.divide == null) ? (that.divide == null) : this.divide.equals(that.divide))
&&((this.round == null) ? (that.round == null) : this.round.equals(that.round));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int __h = 1;
__h *= 1000003;
__h ^= (divide == null) ? 0 : divide.hashCode();
__h *= 1000003;
__h ^= (round == null) ? 0 : round.hashCode();
$hashCode = __h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "UnitTransformation{"
+ "divide=" + divide + ", "
+ "round=" + round
+ "}";
}
return $toString;
}
}
}