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 cancelDeletion operation.
14 */
15 public class CertificateCancelDeletionOptions {
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 * Get the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.
47 *
48 * @return the timeout value
49 */
50 public Integer timeout() {
51 return this.timeout;
52 }
53
54 /**
55 * Set the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.
56 *
57 * @param timeout the timeout value to set
58 * @return the CertificateCancelDeletionOptions object itself.
59 */
60 public CertificateCancelDeletionOptions withTimeout(Integer timeout) {
61 this.timeout = timeout;
62 return this;
63 }
64
65 /**
66 * 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.
67 *
68 * @return the clientRequestId value
69 */
70 public UUID clientRequestId() {
71 return this.clientRequestId;
72 }
73
74 /**
75 * 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.
76 *
77 * @param clientRequestId the clientRequestId value to set
78 * @return the CertificateCancelDeletionOptions object itself.
79 */
80 public CertificateCancelDeletionOptions withClientRequestId(UUID clientRequestId) {
81 this.clientRequestId = clientRequestId;
82 return this;
83 }
84
85 /**
86 * Get whether the server should return the client-request-id in the response.
87 *
88 * @return the returnClientRequestId value
89 */
90 public Boolean returnClientRequestId() {
91 return this.returnClientRequestId;
92 }
93
94 /**
95 * Set whether the server should return the client-request-id in the response.
96 *
97 * @param returnClientRequestId the returnClientRequestId value to set
98 * @return the CertificateCancelDeletionOptions object itself.
99 */
100 public CertificateCancelDeletionOptions withReturnClientRequestId(Boolean returnClientRequestId) {
101 this.returnClientRequestId = returnClientRequestId;
102 return this;
103 }
104
105 /**
106 * 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.
107 *
108 * @return the ocpDate value
109 */
110 public DateTime ocpDate() {
111 if (this.ocpDate == null) {
112 return null;
113 }
114 return this.ocpDate.dateTime();
115 }
116
117 /**
118 * 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.
119 *
120 * @param ocpDate the ocpDate value to set
121 * @return the CertificateCancelDeletionOptions object itself.
122 */
123 public CertificateCancelDeletionOptions withOcpDate(DateTime ocpDate) {
124 if (ocpDate == null) {
125 this.ocpDate = null;
126 } else {
127 this.ocpDate = new DateTimeRfc1123(ocpDate);
128 }
129 return this;
130 }
131
132 }