-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathActionAttemptNine.java
More file actions
165 lines (133 loc) · 4.53 KB
/
ActionAttemptNine.java
File metadata and controls
165 lines (133 loc) · 4.53 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
/**
* 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 = ActionAttemptNine.Builder.class)
public final class ActionAttemptNine {
private final String actionAttemptId;
private final Object result;
private final Object error;
private final Map<String, Object> additionalProperties;
private ActionAttemptNine(
String actionAttemptId, Object result, Object error, Map<String, Object> additionalProperties) {
this.actionAttemptId = actionAttemptId;
this.result = result;
this.error = error;
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 "pending";
}
@JsonProperty("result")
public Object getResult() {
return result;
}
@JsonProperty("error")
public Object getError() {
return error;
}
@JsonProperty("action_type")
public String getActionType() {
return "SET_COOL";
}
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof ActionAttemptNine && equalTo((ActionAttemptNine) other);
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
private boolean equalTo(ActionAttemptNine other) {
return actionAttemptId.equals(other.actionAttemptId)
&& result.equals(other.result)
&& error.equals(other.error);
}
@java.lang.Override
public int hashCode() {
return Objects.hash(this.actionAttemptId, this.result, this.error);
}
@java.lang.Override
public String toString() {
return ObjectMappers.stringify(this);
}
public static ActionAttemptIdStage builder() {
return new Builder();
}
public interface ActionAttemptIdStage {
ResultStage actionAttemptId(String actionAttemptId);
Builder from(ActionAttemptNine other);
}
public interface ResultStage {
ErrorStage result(Object result);
}
public interface ErrorStage {
_FinalStage error(Object error);
}
public interface _FinalStage {
ActionAttemptNine build();
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements ActionAttemptIdStage, ResultStage, ErrorStage, _FinalStage {
private String actionAttemptId;
private Object result;
private Object error;
@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();
private Builder() {}
@java.lang.Override
public Builder from(ActionAttemptNine other) {
actionAttemptId(other.getActionAttemptId());
result(other.getResult());
error(other.getError());
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 ResultStage actionAttemptId(String actionAttemptId) {
this.actionAttemptId = actionAttemptId;
return this;
}
@java.lang.Override
@JsonSetter("result")
public ErrorStage result(Object result) {
this.result = result;
return this;
}
@java.lang.Override
@JsonSetter("error")
public _FinalStage error(Object error) {
this.error = error;
return this;
}
@java.lang.Override
public ActionAttemptNine build() {
return new ActionAttemptNine(actionAttemptId, result, error, additionalProperties);
}
}
}