Skip to content

Commit eaea711

Browse files
Mpdreamzrusscam
authored andcommitted
Generate bytes since they've gone out already (#4281)
1 parent 3c9de5c commit eaea711

File tree

4 files changed

+113
-2
lines changed

4 files changed

+113
-2
lines changed

src/CodeGeneration/ApiGenerator/Configuration/Overrides/GlobalOverrides.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ public class GlobalOverrides : EndpointOverridesBase
4343
"copy_settings", //this still needs a PR?
4444
"source", // allows the body to be specified as a request param, we do not want to advertise this with a strongly typed method
4545
"timestamp",
46-
"time",
47-
"bytes"
46+
"time"
4847
};
4948
}
5049
}

src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cat.cs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ public bool? Verbose
8686
public class CatAllocationRequestParameters : RequestParameters<CatAllocationRequestParameters>
8787
{
8888
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
89+
///<summary>The unit in which to display byte values</summary>
90+
public Bytes? Bytes
91+
{
92+
get => Q<Bytes? >("bytes");
93+
set => Q("bytes", value);
94+
}
95+
8996
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
9097
public string Format
9198
{
@@ -202,6 +209,13 @@ public bool? Verbose
202209
public class CatFielddataRequestParameters : RequestParameters<CatFielddataRequestParameters>
203210
{
204211
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
212+
///<summary>The unit in which to display byte values</summary>
213+
public Bytes? Bytes
214+
{
215+
get => Q<Bytes? >("bytes");
216+
set => Q("bytes", value);
217+
}
218+
205219
///<summary>A comma-separated list of fields to return in the output</summary>
206220
public string[] Fields
207221
{
@@ -351,6 +365,13 @@ public string[] SortByColumns
351365
public class CatIndicesRequestParameters : RequestParameters<CatIndicesRequestParameters>
352366
{
353367
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
368+
///<summary>The unit in which to display byte values</summary>
369+
public Bytes? Bytes
370+
{
371+
get => Q<Bytes? >("bytes");
372+
set => Q("bytes", value);
373+
}
374+
354375
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
355376
public string Format
356377
{
@@ -546,6 +567,13 @@ public bool? Verbose
546567
public class CatNodesRequestParameters : RequestParameters<CatNodesRequestParameters>
547568
{
548569
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
570+
///<summary>The unit in which to display byte values</summary>
571+
public Bytes? Bytes
572+
{
573+
get => Q<Bytes? >("bytes");
574+
set => Q("bytes", value);
575+
}
576+
549577
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
550578
public string Format
551579
{
@@ -734,6 +762,13 @@ public bool? ActiveOnly
734762
set => Q("active_only", value);
735763
}
736764

765+
///<summary>The unit in which to display byte values</summary>
766+
public Bytes? Bytes
767+
{
768+
get => Q<Bytes? >("bytes");
769+
set => Q("bytes", value);
770+
}
771+
737772
///<summary>If `true`, the response includes detailed information about shard recoveries</summary>
738773
public bool? Detailed
739774
{
@@ -857,6 +892,13 @@ public bool? Verbose
857892
public class CatSegmentsRequestParameters : RequestParameters<CatSegmentsRequestParameters>
858893
{
859894
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
895+
///<summary>The unit in which to display byte values</summary>
896+
public Bytes? Bytes
897+
{
898+
get => Q<Bytes? >("bytes");
899+
set => Q("bytes", value);
900+
}
901+
860902
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
861903
public string Format
862904
{
@@ -901,6 +943,13 @@ public bool? Verbose
901943
public class CatShardsRequestParameters : RequestParameters<CatShardsRequestParameters>
902944
{
903945
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
946+
///<summary>The unit in which to display byte values</summary>
947+
public Bytes? Bytes
948+
{
949+
get => Q<Bytes? >("bytes");
950+
set => Q("bytes", value);
951+
}
952+
904953
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
905954
public string Format
906955
{

src/Nest/Descriptors.Cat.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public CatAllocationDescriptor(NodeIds nodeId): base(r => r.Optional("node_id",
8686
///<summary>A comma-separated list of node IDs or names to limit the returned information</summary>
8787
public CatAllocationDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v));
8888
// Request parameters
89+
///<summary>The unit in which to display byte values</summary>
90+
public CatAllocationDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
8991
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
9092
public CatAllocationDescriptor Format(string format) => Qs("format", format);
9193
///<summary>Comma-separated list of column names to display</summary>
@@ -165,6 +167,8 @@ public CatFielddataDescriptor(Fields fields): base(r => r.Optional("fields", fie
165167
///<summary>A comma-separated list of fields to return the fielddata size</summary>
166168
public CatFielddataDescriptor Fields<T>(params Expression<Func<T, object>>[] fields) => Assign(fields, (a, v) => a.RouteValues.Optional("fields", (Fields)v));
167169
// Request parameters
170+
///<summary>The unit in which to display byte values</summary>
171+
public CatFielddataDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
168172
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
169173
public CatFielddataDescriptor Format(string format) => Qs("format", format);
170174
///<summary>Comma-separated list of column names to display</summary>
@@ -242,6 +246,8 @@ public CatIndicesDescriptor Index<TOther>()
242246
///<summary>A shortcut into calling Index(Indices.All)</summary>
243247
public CatIndicesDescriptor AllIndices() => Index(Indices.All);
244248
// Request parameters
249+
///<summary>The unit in which to display byte values</summary>
250+
public CatIndicesDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
245251
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
246252
public CatIndicesDescriptor Format(string format) => Qs("format", format);
247253
///<summary>Comma-separated list of column names to display</summary>
@@ -314,6 +320,8 @@ public partial class CatNodesDescriptor : RequestDescriptorBase<CatNodesDescript
314320
internal override ApiUrls ApiUrls => ApiUrlsLookups.CatNodes;
315321
// values part of the url path
316322
// Request parameters
323+
///<summary>The unit in which to display byte values</summary>
324+
public CatNodesDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
317325
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
318326
public CatNodesDescriptor Format(string format) => Qs("format", format);
319327
///<summary>Return the full node ID instead of the shortened version (default: false)</summary>
@@ -403,6 +411,8 @@ public CatRecoveryDescriptor Index<TOther>()
403411
// Request parameters
404412
///<summary>If `true`, the response only includes ongoing shard recoveries</summary>
405413
public CatRecoveryDescriptor ActiveOnly(bool? activeonly = true) => Qs("active_only", activeonly);
414+
///<summary>The unit in which to display byte values</summary>
415+
public CatRecoveryDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
406416
///<summary>If `true`, the response includes detailed information about shard recoveries</summary>
407417
public CatRecoveryDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed);
408418
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
@@ -466,6 +476,8 @@ public CatSegmentsDescriptor Index<TOther>()
466476
///<summary>A shortcut into calling Index(Indices.All)</summary>
467477
public CatSegmentsDescriptor AllIndices() => Index(Indices.All);
468478
// Request parameters
479+
///<summary>The unit in which to display byte values</summary>
480+
public CatSegmentsDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
469481
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
470482
public CatSegmentsDescriptor Format(string format) => Qs("format", format);
471483
///<summary>Comma-separated list of column names to display</summary>
@@ -503,6 +515,8 @@ public CatShardsDescriptor Index<TOther>()
503515
///<summary>A shortcut into calling Index(Indices.All)</summary>
504516
public CatShardsDescriptor AllIndices() => Index(Indices.All);
505517
// Request parameters
518+
///<summary>The unit in which to display byte values</summary>
519+
public CatShardsDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes);
506520
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
507521
public CatShardsDescriptor Format(string format) => Qs("format", format);
508522
///<summary>Comma-separated list of column names to display</summary>

src/Nest/Requests.Cat.cs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ public CatAllocationRequest(NodeIds nodeId): base(r => r.Optional("node_id", nod
145145
[IgnoreDataMember]
146146
NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");
147147
// Request parameters
148+
///<summary>The unit in which to display byte values</summary>
149+
public Bytes? Bytes
150+
{
151+
get => Q<Bytes? >("bytes");
152+
set => Q("bytes", value);
153+
}
154+
148155
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
149156
public string Format
150157
{
@@ -313,6 +320,13 @@ public CatFielddataRequest(Fields fields): base(r => r.Optional("fields", fields
313320
[IgnoreDataMember]
314321
Fields ICatFielddataRequest.Fields => Self.RouteValues.Get<Fields>("fields");
315322
// Request parameters
323+
///<summary>The unit in which to display byte values</summary>
324+
public Bytes? Bytes
325+
{
326+
get => Q<Bytes? >("bytes");
327+
set => Q("bytes", value);
328+
}
329+
316330
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
317331
public string Format
318332
{
@@ -497,6 +511,13 @@ public CatIndicesRequest(Indices index): base(r => r.Optional("index", index))
497511
[IgnoreDataMember]
498512
Indices ICatIndicesRequest.Index => Self.RouteValues.Get<Indices>("index");
499513
// Request parameters
514+
///<summary>The unit in which to display byte values</summary>
515+
public Bytes? Bytes
516+
{
517+
get => Q<Bytes? >("bytes");
518+
set => Q("bytes", value);
519+
}
520+
500521
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
501522
public string Format
502523
{
@@ -716,6 +737,13 @@ public partial class CatNodesRequest : PlainRequestBase<CatNodesRequestParameter
716737
internal override ApiUrls ApiUrls => ApiUrlsLookups.CatNodes;
717738
// values part of the url path
718739
// Request parameters
740+
///<summary>The unit in which to display byte values</summary>
741+
public Bytes? Bytes
742+
{
743+
get => Q<Bytes? >("bytes");
744+
set => Q("bytes", value);
745+
}
746+
719747
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
720748
public string Format
721749
{
@@ -946,6 +974,13 @@ public bool? ActiveOnly
946974
set => Q("active_only", value);
947975
}
948976

977+
///<summary>The unit in which to display byte values</summary>
978+
public Bytes? Bytes
979+
{
980+
get => Q<Bytes? >("bytes");
981+
set => Q("bytes", value);
982+
}
983+
949984
///<summary>If `true`, the response includes detailed information about shard recoveries</summary>
950985
public bool? Detailed
951986
{
@@ -1096,6 +1131,13 @@ public CatSegmentsRequest(Indices index): base(r => r.Optional("index", index))
10961131
[IgnoreDataMember]
10971132
Indices ICatSegmentsRequest.Index => Self.RouteValues.Get<Indices>("index");
10981133
// Request parameters
1134+
///<summary>The unit in which to display byte values</summary>
1135+
public Bytes? Bytes
1136+
{
1137+
get => Q<Bytes? >("bytes");
1138+
set => Q("bytes", value);
1139+
}
1140+
10991141
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
11001142
public string Format
11011143
{
@@ -1166,6 +1208,13 @@ public CatShardsRequest(Indices index): base(r => r.Optional("index", index))
11661208
[IgnoreDataMember]
11671209
Indices ICatShardsRequest.Index => Self.RouteValues.Get<Indices>("index");
11681210
// Request parameters
1211+
///<summary>The unit in which to display byte values</summary>
1212+
public Bytes? Bytes
1213+
{
1214+
get => Q<Bytes? >("bytes");
1215+
set => Q("bytes", value);
1216+
}
1217+
11691218
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
11701219
public string Format
11711220
{

0 commit comments

Comments
 (0)