-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathInvokeConnectionRequest.java
More file actions
82 lines (61 loc) · 2.26 KB
/
InvokeConnectionRequest.java
File metadata and controls
82 lines (61 loc) · 2.26 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
package com.skyflow.vault.connection;
import com.skyflow.enums.RequestMethod;
import java.util.Map;
public class InvokeConnectionRequest {
private final InvokeConnectionRequestBuilder builder;
private InvokeConnectionRequest(InvokeConnectionRequestBuilder builder) {
this.builder = builder;
}
public static InvokeConnectionRequestBuilder builder() {
return new InvokeConnectionRequestBuilder();
}
public RequestMethod getMethod() {
return builder.method;
}
public Map<String, String> getPathParams() {
return builder.pathParams;
}
public Map<String, String> getQueryParams() {
return builder.queryParams;
}
public Map<String, String> getRequestHeaders() {
return builder.requestHeaders;
}
public Object getRequestBody() {
return builder.requestBody;
}
public static final class InvokeConnectionRequestBuilder {
private RequestMethod method;
private Map<String, String> pathParams;
private Map<String, String> queryParams;
private Map<String, String> requestHeaders;
private Object requestBody;
private InvokeConnectionRequestBuilder() {
this.method = RequestMethod.POST;
this.requestBody = new Object();
}
public InvokeConnectionRequestBuilder method(RequestMethod method) {
this.method = method == null ? RequestMethod.POST : method;
return this;
}
public InvokeConnectionRequestBuilder pathParams(Map<String, String> pathParams) {
this.pathParams = pathParams;
return this;
}
public InvokeConnectionRequestBuilder queryParams(Map<String, String> queryParams) {
this.queryParams = queryParams;
return this;
}
public InvokeConnectionRequestBuilder requestHeaders(Map<String, String> requestHeaders) {
this.requestHeaders = requestHeaders;
return this;
}
public InvokeConnectionRequestBuilder requestBody(Object requestBody) {
this.requestBody = requestBody;
return this;
}
public InvokeConnectionRequest build() {
return new InvokeConnectionRequest(this);
}
}
}