-
Notifications
You must be signed in to change notification settings - Fork 645
/
ColorInput.java.expected
156 lines (130 loc) · 4.15 KB
/
ColorInput.java.expected
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
//
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL version '$VERSION'.
//
package com.example.input_object_type.type;
import com.apollographql.apollo3.api.Optional;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
/**
* The input object sent when passing in a color
*/
public class ColorInput {
public final Optional<Integer> red;
public final Optional<Double> green;
public final Optional<Double> blue;
public final Optional<Episode> enumWithDefaultValue;
public final Optional<ReviewRefInput> reviewRefInput;
private transient volatile int $hashCode;
private transient volatile boolean $hashCodeMemoized;
private transient volatile String $toString;
public ColorInput(Optional<Integer> red, Optional<Double> green, Optional<Double> blue,
Optional<Episode> enumWithDefaultValue, Optional<ReviewRefInput> reviewRefInput) {
this.red = red;
this.green = green;
this.blue = blue;
this.enumWithDefaultValue = enumWithDefaultValue;
this.reviewRefInput = reviewRefInput;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ColorInput) {
ColorInput that = (ColorInput) o;
return ((this.red == null) ? (that.red == null) : this.red.equals(that.red))
&&((this.green == null) ? (that.green == null) : this.green.equals(that.green))
&&((this.blue == null) ? (that.blue == null) : this.blue.equals(that.blue))
&&((this.enumWithDefaultValue == null) ? (that.enumWithDefaultValue == null) : this.enumWithDefaultValue.equals(that.enumWithDefaultValue))
&&((this.reviewRefInput == null) ? (that.reviewRefInput == null) : this.reviewRefInput.equals(that.reviewRefInput));
}
return false;
}
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= (red == null) ? 0 : red.hashCode();
h *= 1000003;
h ^= (green == null) ? 0 : green.hashCode();
h *= 1000003;
h ^= (blue == null) ? 0 : blue.hashCode();
h *= 1000003;
h ^= (enumWithDefaultValue == null) ? 0 : enumWithDefaultValue.hashCode();
h *= 1000003;
h ^= (reviewRefInput == null) ? 0 : reviewRefInput.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
@Override
public String toString() {
if ($toString == null) {
$toString = "ColorInput{"
+ "red=" + red + ", "
+ "green=" + green + ", "
+ "blue=" + blue + ", "
+ "enumWithDefaultValue=" + enumWithDefaultValue + ", "
+ "reviewRefInput=" + reviewRefInput
+ "}";
}
return $toString;
}
public static Builder builder() {
return new Builder();
}
public static final class Builder {
private Optional<Integer> red = Optional.absent();
private Optional<Double> green = Optional.absent();
private Optional<Double> blue = Optional.absent();
private Optional<Episode> enumWithDefaultValue = Optional.absent();
private Optional<ReviewRefInput> reviewRefInput = Optional.absent();
Builder() {
}
/**
* A description with a dollar sign: $10
*/
public Builder red(Integer red) {
this.red = Optional.present(red);
return this;
}
/**
* Green color
*/
public Builder green(Double green) {
this.green = Optional.present(green);
return this;
}
/**
* Blue color
*/
public Builder blue(Double blue) {
this.blue = Optional.present(blue);
return this;
}
/**
* for test purpose only
*/
public Builder enumWithDefaultValue(Episode enumWithDefaultValue) {
this.enumWithDefaultValue = Optional.present(enumWithDefaultValue);
return this;
}
/**
* Circle ref to review input
*/
public Builder reviewRefInput(ReviewRefInput reviewRefInput) {
this.reviewRefInput = Optional.present(reviewRefInput);
return this;
}
public ColorInput build() {
return new ColorInput(red, green, blue, enumWithDefaultValue, reviewRefInput);
}
}
}