This repository was archived by the owner on Jul 20, 2024. It is now read-only.
forked from splunk/splunk-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJobEventsArgs.java
More file actions
210 lines (185 loc) · 6.19 KB
/
JobEventsArgs.java
File metadata and controls
210 lines (185 loc) · 6.19 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/*
* Copyright 2012 Splunk, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"): you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.splunk;
/**
* The {@code JobEventsArgs} class contains arguments for getting events using
* the {@link Job#getEvents} method.
*/
public class JobEventsArgs extends Args {
/**
* Specifies the format for the returned output.
*/
public static enum OutputMode {
/** Returns output in Atom format. */
ATOM("atom"),
/** Returns output in CSV format. */
CSV("csv"),
/** Returns output in JSON format. */
JSON("json"),
/** Returns output in JSON_COLS format. */
JSON_COLS("json_cols"),
/** Returns output in JSON_ROWS format. */
JSON_ROWS("json_rows"),
/** Returns output in raw format. */
RAW("raw"),
/** Returns output in XML format. */
XML("xml");
private String value;
private OutputMode(String value) {
this.value = value;
}
/**
* @return The REST API value for this enumerated constant.
*/
public String toString() {
return this.value;
}
}
/**
* Specifies how to truncate lines to achieve the value in
* {@link #setMaximumLines}.
*/
public static enum TruncationMode {
/** Use the "abstract" truncation mode.*/
ABSTRACT("abstract"),
/** Use the "truncate" truncation mode.*/
TRUNCATE("truncate");
private String value;
private TruncationMode(String value) {
this.value = value;
}
/**
* @return The REST API value for this enumerated constant.
*/
public String toString() {
return this.value;
}
}
/**
* Class constructor.
*/
public JobEventsArgs() { super(); }
/* BEGIN AUTOGENERATED CODE */
/**
* Sets the maximum number of results to return. To return all available results, specify 0. The default value is 100.
*
* @param count
* The maximum number of results.
*/
public void setCount(int count) {
this.put("count", count);
}
/**
* Specifies the earliest time in the time range to search. The time string can be a UTC time (with fractional seconds), a relative time specifier (to now), or a formatted time string.
*
* @param earliestTime
* The earliest time.
*/
public void setEarliestTime(String earliestTime) {
this.put("earliest_time", earliestTime);
}
/**
* Sets a list of fields to return for the event set.
*
* @param fieldList
* A list of fields.
*/
public void setFieldList(String[] fieldList) {
this.put("f", fieldList);
}
/**
* Specifies the latest time in the time range to search. The time string can be a UTC time (with fractional seconds), a relative time specifier (to now), or a formatted time string.
*
* @param latestTime
* The latest time.
*/
public void setLatestTime(String latestTime) {
this.put("latest_time", latestTime);
}
/**
* Sets the maximum number of lines that any single event's <b>_raw</b> field should contain.
*
* @param maximumLines
* The maximum number of lines. For no limit, specify 0.
*/
public void setMaximumLines(int maximumLines) {
this.put("max_lines", maximumLines);
}
/**
* Specifies the index of the first result (inclusive) from which to begin returning data. This value is 0-indexed.<p>In Splunk 4.1+, negative offsets are allowed and are added to the count to compute the absolute offset (for example, offset=-1 is the last available offset). Offsets in the results are always absolute and never negative. The default value is 0.
*
* @param offset
* The index of the first result to return.
*/
public void setOffset(int offset) {
this.put("offset", offset);
}
/**
* Sets the format of the output.
*
* @param outputMode
* The output format.
*/
public void setOutputMode(OutputMode outputMode) {
this.put("output_mode", outputMode);
}
/**
* Sets a UTC time format.
*
* @param outputTimeFormat
* A UTC time format.
*/
public void setOutputTimeFormat(String outputTimeFormat) {
this.put("output_time_format", outputTimeFormat);
}
/**
* Sets the post-processing search to apply to results.
*
* @param search
* The post-processing search query.
*/
public void setSearch(String search) {
this.put("search", search);
}
/**
* Sets the type of segmentation to perform on the data, including an option to perform k/v segmentation.
*
* @param segmentation
* The segmentation type.
*/
public void setSegmentation(String segmentation) {
this.put("segmentation", segmentation);
}
/**
* Specifies an expression to convert a formatted time string from {start,end}_time into UTC seconds. The default format is "%m/%d/%Y:%H:%M:%S".
*
* @param timeFormat
* The time format.
*/
public void setTimeFormat(String timeFormat) {
this.put("time_format", timeFormat);
}
/**
* Specifies how to truncate lines to achieve the value in {@link #setMaximumLines}.
*
* @param truncationMode
* The truncation mode.
*/
public void setTruncationMode(TruncationMode truncationMode) {
this.put("truncation_mode", truncationMode);
}
/* END AUTOGENERATED CODE */
}