-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathActionAttemptFour.java
More file actions
168 lines (136 loc) · 4.67 KB
/
ActionAttemptFour.java
File metadata and controls
168 lines (136 loc) · 4.67 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.seam.api.types;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.seam.api.core.ObjectMappers;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonDeserialize(builder = ActionAttemptFour.Builder.class)
public final class ActionAttemptFour {
private final String actionAttemptId;
private final Object error;
private final ActionAttemptFourResult result;
private final Map<String, Object> additionalProperties;
private ActionAttemptFour(
String actionAttemptId,
Object error,
ActionAttemptFourResult result,
Map<String, Object> additionalProperties) {
this.actionAttemptId = actionAttemptId;
this.error = error;
this.result = result;
this.additionalProperties = additionalProperties;
}
/**
* @return The ID of the action attempt.
*/
@JsonProperty("action_attempt_id")
public String getActionAttemptId() {
return actionAttemptId;
}
@JsonProperty("status")
public String getStatus() {
return "success";
}
@JsonProperty("error")
public Object getError() {
return error;
}
@JsonProperty("action_type")
public String getActionType() {
return "UNLOCK_DOOR";
}
@JsonProperty("result")
public ActionAttemptFourResult getResult() {
return result;
}
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof ActionAttemptFour && equalTo((ActionAttemptFour) other);
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
private boolean equalTo(ActionAttemptFour other) {
return actionAttemptId.equals(other.actionAttemptId)
&& error.equals(other.error)
&& result.equals(other.result);
}
@java.lang.Override
public int hashCode() {
return Objects.hash(this.actionAttemptId, this.error, this.result);
}
@java.lang.Override
public String toString() {
return ObjectMappers.stringify(this);
}
public static ActionAttemptIdStage builder() {
return new Builder();
}
public interface ActionAttemptIdStage {
ErrorStage actionAttemptId(String actionAttemptId);
Builder from(ActionAttemptFour other);
}
public interface ErrorStage {
ResultStage error(Object error);
}
public interface ResultStage {
_FinalStage result(ActionAttemptFourResult result);
}
public interface _FinalStage {
ActionAttemptFour build();
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements ActionAttemptIdStage, ErrorStage, ResultStage, _FinalStage {
private String actionAttemptId;
private Object error;
private ActionAttemptFourResult result;
@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();
private Builder() {}
@java.lang.Override
public Builder from(ActionAttemptFour other) {
actionAttemptId(other.getActionAttemptId());
error(other.getError());
result(other.getResult());
return this;
}
/**
* <p>The ID of the action attempt.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("action_attempt_id")
public ErrorStage actionAttemptId(String actionAttemptId) {
this.actionAttemptId = actionAttemptId;
return this;
}
@java.lang.Override
@JsonSetter("error")
public ResultStage error(Object error) {
this.error = error;
return this;
}
@java.lang.Override
@JsonSetter("result")
public _FinalStage result(ActionAttemptFourResult result) {
this.result = result;
return this;
}
@java.lang.Override
public ActionAttemptFour build() {
return new ActionAttemptFour(actionAttemptId, error, result, additionalProperties);
}
}
}