Skip to content

Commit bdb359f

Browse files
committed
Refactor QueryRulesetListItem into a types.ts file
1 parent 4958d8e commit bdb359f

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

output/schema/schema.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/query_ruleset/list/QueryRulesetListResponse.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,12 @@
1717
* under the License.
1818
*/
1919

20-
import { integer, long } from '@_types/Numeric'
21-
import { Id } from '@_types/common'
20+
import { long } from '@_types/Numeric'
21+
import { QueryRulesetListItem } from './types'
2222

2323
export class Response {
2424
body: {
2525
count: long
2626
results: QueryRulesetListItem[]
2727
}
2828
}
29-
30-
export class QueryRulesetListItem {
31-
/**
32-
* Ruleset unique identifier
33-
*/
34-
ruleset_id: Id
35-
/**
36-
* The number of rules associated with this ruleset
37-
*/
38-
rules_count: integer
39-
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { integer } from '@_types/Numeric'
20+
import { Id } from '@_types/common'
21+
22+
export class QueryRulesetListItem {
23+
/**
24+
* Ruleset unique identifier
25+
*/
26+
ruleset_id: Id
27+
/**
28+
* The number of rules associated with this ruleset
29+
*/
30+
rules_count: integer
31+
}

0 commit comments

Comments
 (0)