-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead.java
More file actions
159 lines (132 loc) · 5.72 KB
/
ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead.java
File metadata and controls
159 lines (132 loc) · 5.72 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
package com.commercetools.api.client;
import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import com.fasterxml.jackson.core.type.TypeReference;
import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
/**
* <p>Checks if a Quote exists with the provided <code>id</code>. Returns a <code>200</code> status if the Quote exists, or a <code>404</code> status otherwise.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> result = apiRoot
* .withProjectKey("{projectKey}")
* .asAssociate()
* .withAssociateIdValue("{associateId}")
* .inBusinessUnitKeyWithBusinessUnitKeyValue("{businessUnitKey}")
* .quotes()
* .withId("{ID}")
* .head()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead extends
TypeApiMethod<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead, com.fasterxml.jackson.databind.JsonNode>
implements
com.commercetools.api.client.ErrorableTrait<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead> {
@Override
public TypeReference<com.fasterxml.jackson.databind.JsonNode> resultType() {
return new TypeReference<com.fasterxml.jackson.databind.JsonNode>() {
};
}
private String projectKey;
private String associateId;
private String businessUnitKey;
private String ID;
public ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead(
final ApiHttpClient apiHttpClient, String projectKey, String associateId, String businessUnitKey,
String ID) {
super(apiHttpClient);
this.projectKey = projectKey;
this.associateId = associateId;
this.businessUnitKey = businessUnitKey;
this.ID = ID;
}
public ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead(
ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead t) {
super(t);
this.projectKey = t.projectKey;
this.associateId = t.associateId;
this.businessUnitKey = t.businessUnitKey;
this.ID = t.ID;
}
@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/as-associate/%s/in-business-unit/key=%s/quotes/%s",
encodePathParam(this.projectKey), encodePathParam(this.associateId), encodePathParam(this.businessUnitKey),
encodePathParam(this.ID));
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
}
@Override
public ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode> executeBlocking(final ApiHttpClient client,
final Duration timeout) {
return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class);
}
@Override
public CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> execute(
final ApiHttpClient client) {
return execute(client, com.fasterxml.jackson.databind.JsonNode.class);
}
public String getProjectKey() {
return this.projectKey;
}
public String getAssociateId() {
return this.associateId;
}
public String getBusinessUnitKey() {
return this.businessUnitKey;
}
public String getID() {
return this.ID;
}
public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}
public void setAssociateId(final String associateId) {
this.associateId = associateId;
}
public void setBusinessUnitKey(final String businessUnitKey) {
this.businessUnitKey = businessUnitKey;
}
public void setID(final String ID) {
this.ID = ID;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead that = (ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead) o;
return new EqualsBuilder().append(projectKey, that.projectKey)
.append(associateId, that.associateId)
.append(businessUnitKey, that.businessUnitKey)
.append(ID, that.ID)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey)
.append(associateId)
.append(businessUnitKey)
.append(ID)
.toHashCode();
}
@Override
protected ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead copy() {
return new ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDHead(this);
}
}