File tree Expand file tree Collapse file tree 6 files changed +72
-48
lines changed
specification/search_application Expand file tree Collapse file tree 6 files changed +72
-48
lines changed Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
- import { IndexName , Name } from '@_types/common'
21
- import { Script } from '@_types/Scripting'
20
+ import { Name } from '@_types/common'
22
21
import { EpochTime , UnitMillis } from '@_types/Time'
22
+ import { SearchApplicationParameters } from './SearchApplicationParameters'
23
23
24
- export class SearchApplication {
24
+ export class SearchApplication extends SearchApplicationParameters {
25
25
/**
26
- * Search Application name.
26
+ * Search Application name
27
27
*/
28
28
name : Name
29
- /**
30
- * Indices that are part of the Search Application.
31
- */
32
- indices : IndexName [ ]
33
29
/**
34
30
* Last time the Search Application was updated.
35
31
*/
36
32
updated_at_millis : EpochTime < UnitMillis >
37
- /**
38
- * Analytics collection associated to the Search Application.
39
- */
40
- analytics_collection_name ?: Name
41
- /**
42
- * Search template to use on search operations.
43
- */
44
- template ?: SearchApplicationTemplate
45
- }
46
-
47
- export class SearchApplicationTemplate {
48
- /**
49
- * The associated mustache template.
50
- */
51
- script : Script
52
33
}
Original file line number Diff line number Diff line change
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
+
20
+ import { IndexName , Name } from '@_types/common'
21
+ import { SearchApplicationTemplate } from './SearchApplicationTemplate'
22
+
23
+ export class SearchApplicationParameters {
24
+ /**
25
+ * Indices that are part of the Search Application.
26
+ */
27
+ indices : IndexName [ ]
28
+ /**
29
+ * Analytics collection associated to the Search Application.
30
+ */
31
+ analytics_collection_name ?: Name
32
+ /**
33
+ * Search template to use on search operations.
34
+ */
35
+ template ?: SearchApplicationTemplate
36
+ }
Original file line number Diff line number Diff line change
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
+
20
+ import { Script } from '@_types/Scripting'
21
+
22
+ export class SearchApplicationTemplate {
23
+ /**
24
+ * The associated mustache template.
25
+ */
26
+ script : Script
27
+ }
Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
- import { SearchApplication } from '.. /_types/SearchApplication'
20
+ import { SearchApplication } from '@search_application /_types/SearchApplication'
21
21
22
22
export class Response {
23
23
body : SearchApplication
Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
- import { IndexName , Name } from '@_types/common '
20
+ import { SearchApplication } from '@search_application/ _types/SearchApplication '
21
21
import { long } from '@_types/Numeric'
22
- import { EpochTime , UnitMillis } from '@_types/Time'
23
22
24
23
export class Response {
25
24
body : {
26
25
count : long
27
- results : SearchApplicationListItem [ ]
26
+ results : SearchApplication [ ]
28
27
}
29
28
}
30
-
31
- export class SearchApplicationListItem {
32
- /**
33
- * Search Application name
34
- */
35
- name : Name
36
- /**
37
- * Indices that are part of the Search Application
38
- */
39
- indices : IndexName [ ]
40
- /**
41
- * Last time the Search Application was updated
42
- */
43
- updated_at_millis : EpochTime < UnitMillis >
44
- /**
45
- * Analytics collection associated to the Search Application
46
- */
47
- analytics_collection_name ?: Name
48
- }
Original file line number Diff line number Diff line change 18
18
*/
19
19
import { RequestBase } from '@_types/Base'
20
20
import { Name } from '@_types/common'
21
- import { SearchApplication } from '../_types/SearchApplication '
21
+ import { SearchApplicationParameters } from '../_types/SearchApplicationParameters '
22
22
23
23
/**
24
24
* Create or update a search application.
@@ -44,5 +44,5 @@ export interface Request extends RequestBase {
44
44
* Contains parameters for a search application.
45
45
*/
46
46
/** @codegen_name search_application */
47
- body : SearchApplication
47
+ body : SearchApplicationParameters
48
48
}
You can’t perform that action at this time.
0 commit comments