Skip to content

Commit c9b4cdf

Browse files
Re-implement Exists property (#8102) (#8104)
Co-authored-by: Florian Bernd <[email protected]>
1 parent e0f6ce4 commit c9b4cdf

File tree

6 files changed

+114
-0
lines changed

6 files changed

+114
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Elastic.Transport.Products.Elasticsearch;
6+
7+
#if ELASTICSEARCH_SERVERLESS
8+
namespace Elastic.Clients.Elasticsearch.Serverless;
9+
#else
10+
namespace Elastic.Clients.Elasticsearch;
11+
#endif
12+
13+
public sealed partial class ExistsResponse : ElasticsearchResponse
14+
{
15+
public bool Exists => ApiCallDetails is
16+
{
17+
HasSuccessfulStatusCode: true, HttpStatusCode: 200
18+
};
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Elastic.Transport.Products.Elasticsearch;
6+
7+
#if ELASTICSEARCH_SERVERLESS
8+
namespace Elastic.Clients.Elasticsearch.Serverless;
9+
#else
10+
namespace Elastic.Clients.Elasticsearch;
11+
#endif
12+
13+
public sealed partial class ExistsSourceResponse : ElasticsearchResponse
14+
{
15+
public bool Exists => ApiCallDetails is
16+
{
17+
HasSuccessfulStatusCode: true, HttpStatusCode: 200
18+
};
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Elastic.Transport.Products.Elasticsearch;
6+
7+
#if ELASTICSEARCH_SERVERLESS
8+
namespace Elastic.Clients.Elasticsearch.IndexManagement.Serverless;
9+
#else
10+
namespace Elastic.Clients.Elasticsearch.IndexManagement;
11+
#endif
12+
13+
public sealed partial class ExistsAliasResponse : ElasticsearchResponse
14+
{
15+
public bool Exists => ApiCallDetails is
16+
{
17+
HasSuccessfulStatusCode: true, HttpStatusCode: 200
18+
};
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Elastic.Transport.Products.Elasticsearch;
6+
7+
#if ELASTICSEARCH_SERVERLESS
8+
namespace Elastic.Clients.Elasticsearch.IndexManagement.Serverless;
9+
#else
10+
namespace Elastic.Clients.Elasticsearch.IndexManagement;
11+
#endif
12+
13+
public sealed partial class ExistsIndexTemplateResponse : ElasticsearchResponse
14+
{
15+
public bool Exists => ApiCallDetails is
16+
{
17+
HasSuccessfulStatusCode: true, HttpStatusCode: 200
18+
};
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Elastic.Transport.Products.Elasticsearch;
6+
7+
#if ELASTICSEARCH_SERVERLESS
8+
namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
9+
#else
10+
namespace Elastic.Clients.Elasticsearch.IndexManagement;
11+
#endif
12+
13+
public sealed partial class ExistsResponse : ElasticsearchResponse
14+
{
15+
public bool Exists => ApiCallDetails is
16+
{
17+
HasSuccessfulStatusCode: true, HttpStatusCode: 200
18+
};
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Elastic.Transport.Products.Elasticsearch;
6+
7+
#if ELASTICSEARCH_SERVERLESS
8+
namespace Elastic.Clients.Elasticsearch.IndexManagement.Serverless;
9+
#else
10+
namespace Elastic.Clients.Elasticsearch.IndexManagement;
11+
#endif
12+
13+
public sealed partial class ExistsTemplateResponse : ElasticsearchResponse
14+
{
15+
public bool Exists => ApiCallDetails is
16+
{
17+
HasSuccessfulStatusCode: true, HttpStatusCode: 200
18+
};
19+
}

0 commit comments

Comments
 (0)