1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 // Code generated by Microsoft (R) AutoRest Code Generator
4
5 package com.microsoft.azure.batch.protocol.models;
6
7 import java.util.UUID;
8 import com.microsoft.rest.DateTimeRfc1123;
9 import org.joda.time.DateTime;
10 import com.fasterxml.jackson.annotation.JsonProperty;
11
12 /**
13 * Additional parameters for delete operation.
14 */
15 public class TaskDeleteOptions {
16 /**
17 * The maximum time that the server can spend processing the request, in
18 * seconds. The default is 30 seconds.
19 */
20 @JsonProperty(value = "")
21 private Integer timeout;
22
23 /**
24 * The caller-generated request identity, in the form of a GUID with no
25 * decoration such as curly braces, e.g.
26 * 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
27 */
28 @JsonProperty(value = "")
29 private UUID clientRequestId;
30
31 /**
32 * Whether the server should return the client-request-id in the response.
33 */
34 @JsonProperty(value = "")
35 private Boolean returnClientRequestId;
36
37 /**
38 * The time the request was issued. Client libraries typically set this to
39 * the current system clock time; set it explicitly if you are calling the
40 * REST API directly.
41 */
42 @JsonProperty(value = "")
43 private DateTimeRfc1123 ocpDate;
44
45 /**
46 * An ETag value associated with the version of the resource known to the
47 * client. The operation will be performed only if the resource's current
48 * ETag on the service exactly matches the value specified by the client.
49 */
50 @JsonProperty(value = "")
51 private String ifMatch;
52
53 /**
54 * An ETag value associated with the version of the resource known to the
55 * client. The operation will be performed only if the resource's current
56 * ETag on the service does not match the value specified by the client.
57 */
58 @JsonProperty(value = "")
59 private String ifNoneMatch;
60
61 /**
62 * A timestamp indicating the last modified time of the resource known to
63 * the client. The operation will be performed only if the resource on the
64 * service has been modified since the specified time.
65 */
66 @JsonProperty(value = "")
67 private DateTimeRfc1123 ifModifiedSince;
68
69 /**
70 * A timestamp indicating the last modified time of the resource known to
71 * the client. The operation will be performed only if the resource on the
72 * service has not been modified since the specified time.
73 */
74 @JsonProperty(value = "")
75 private DateTimeRfc1123 ifUnmodifiedSince;
76
77 /**
78 * Get the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.
79 *
80 * @return the timeout value
81 */
82 public Integer timeout() {
83 return this.timeout;
84 }
85
86 /**
87 * Set the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.
88 *
89 * @param timeout the timeout value to set
90 * @return the TaskDeleteOptions object itself.
91 */
92 public TaskDeleteOptions withTimeout(Integer timeout) {
93 this.timeout = timeout;
94 return this;
95 }
96
97 /**
98 * Get the caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
99 *
100 * @return the clientRequestId value
101 */
102 public UUID clientRequestId() {
103 return this.clientRequestId;
104 }
105
106 /**
107 * Set the caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
108 *
109 * @param clientRequestId the clientRequestId value to set
110 * @return the TaskDeleteOptions object itself.
111 */
112 public TaskDeleteOptions withClientRequestId(UUID clientRequestId) {
113 this.clientRequestId = clientRequestId;
114 return this;
115 }
116
117 /**
118 * Get whether the server should return the client-request-id in the response.
119 *
120 * @return the returnClientRequestId value
121 */
122 public Boolean returnClientRequestId() {
123 return this.returnClientRequestId;
124 }
125
126 /**
127 * Set whether the server should return the client-request-id in the response.
128 *
129 * @param returnClientRequestId the returnClientRequestId value to set
130 * @return the TaskDeleteOptions object itself.
131 */
132 public TaskDeleteOptions withReturnClientRequestId(Boolean returnClientRequestId) {
133 this.returnClientRequestId = returnClientRequestId;
134 return this;
135 }
136
137 /**
138 * Get the time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.
139 *
140 * @return the ocpDate value
141 */
142 public DateTime ocpDate() {
143 if (this.ocpDate == null) {
144 return null;
145 }
146 return this.ocpDate.dateTime();
147 }
148
149 /**
150 * Set the time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.
151 *
152 * @param ocpDate the ocpDate value to set
153 * @return the TaskDeleteOptions object itself.
154 */
155 public TaskDeleteOptions withOcpDate(DateTime ocpDate) {
156 if (ocpDate == null) {
157 this.ocpDate = null;
158 } else {
159 this.ocpDate = new DateTimeRfc1123(ocpDate);
160 }
161 return this;
162 }
163
164 /**
165 * Get an ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
166 *
167 * @return the ifMatch value
168 */
169 public String ifMatch() {
170 return this.ifMatch;
171 }
172
173 /**
174 * Set an ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.
175 *
176 * @param ifMatch the ifMatch value to set
177 * @return the TaskDeleteOptions object itself.
178 */
179 public TaskDeleteOptions withIfMatch(String ifMatch) {
180 this.ifMatch = ifMatch;
181 return this;
182 }
183
184 /**
185 * Get an ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
186 *
187 * @return the ifNoneMatch value
188 */
189 public String ifNoneMatch() {
190 return this.ifNoneMatch;
191 }
192
193 /**
194 * Set an ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.
195 *
196 * @param ifNoneMatch the ifNoneMatch value to set
197 * @return the TaskDeleteOptions object itself.
198 */
199 public TaskDeleteOptions withIfNoneMatch(String ifNoneMatch) {
200 this.ifNoneMatch = ifNoneMatch;
201 return this;
202 }
203
204 /**
205 * Get a timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
206 *
207 * @return the ifModifiedSince value
208 */
209 public DateTime ifModifiedSince() {
210 if (this.ifModifiedSince == null) {
211 return null;
212 }
213 return this.ifModifiedSince.dateTime();
214 }
215
216 /**
217 * Set a timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time.
218 *
219 * @param ifModifiedSince the ifModifiedSince value to set
220 * @return the TaskDeleteOptions object itself.
221 */
222 public TaskDeleteOptions withIfModifiedSince(DateTime ifModifiedSince) {
223 if (ifModifiedSince == null) {
224 this.ifModifiedSince = null;
225 } else {
226 this.ifModifiedSince = new DateTimeRfc1123(ifModifiedSince);
227 }
228 return this;
229 }
230
231 /**
232 * Get a timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
233 *
234 * @return the ifUnmodifiedSince value
235 */
236 public DateTime ifUnmodifiedSince() {
237 if (this.ifUnmodifiedSince == null) {
238 return null;
239 }
240 return this.ifUnmodifiedSince.dateTime();
241 }
242
243 /**
244 * Set a timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time.
245 *
246 * @param ifUnmodifiedSince the ifUnmodifiedSince value to set
247 * @return the TaskDeleteOptions object itself.
248 */
249 public TaskDeleteOptions withIfUnmodifiedSince(DateTime ifUnmodifiedSince) {
250 if (ifUnmodifiedSince == null) {
251 this.ifUnmodifiedSince = null;
252 } else {
253 this.ifUnmodifiedSince = new DateTimeRfc1123(ifUnmodifiedSince);
254 }
255 return this;
256 }
257
258 }