Skip to content

Commit

Permalink
Re-implement Exists property (#8102) (#8104)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Bernd <[email protected]>
  • Loading branch information
github-actions[bot] and flobernd authored Apr 9, 2024
1 parent e0f6ce4 commit c9b4cdf
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using Elastic.Transport.Products.Elasticsearch;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.Serverless;
#else
namespace Elastic.Clients.Elasticsearch;
#endif

public sealed partial class ExistsResponse : ElasticsearchResponse
{
public bool Exists => ApiCallDetails is
{
HasSuccessfulStatusCode: true, HttpStatusCode: 200
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using Elastic.Transport.Products.Elasticsearch;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.Serverless;
#else
namespace Elastic.Clients.Elasticsearch;
#endif

public sealed partial class ExistsSourceResponse : ElasticsearchResponse
{
public bool Exists => ApiCallDetails is
{
HasSuccessfulStatusCode: true, HttpStatusCode: 200
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using Elastic.Transport.Products.Elasticsearch;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.IndexManagement.Serverless;
#else
namespace Elastic.Clients.Elasticsearch.IndexManagement;
#endif

public sealed partial class ExistsAliasResponse : ElasticsearchResponse
{
public bool Exists => ApiCallDetails is
{
HasSuccessfulStatusCode: true, HttpStatusCode: 200
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using Elastic.Transport.Products.Elasticsearch;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.IndexManagement.Serverless;
#else
namespace Elastic.Clients.Elasticsearch.IndexManagement;
#endif

public sealed partial class ExistsIndexTemplateResponse : ElasticsearchResponse
{
public bool Exists => ApiCallDetails is
{
HasSuccessfulStatusCode: true, HttpStatusCode: 200
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using Elastic.Transport.Products.Elasticsearch;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
#else
namespace Elastic.Clients.Elasticsearch.IndexManagement;
#endif

public sealed partial class ExistsResponse : ElasticsearchResponse
{
public bool Exists => ApiCallDetails is
{
HasSuccessfulStatusCode: true, HttpStatusCode: 200
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using Elastic.Transport.Products.Elasticsearch;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.IndexManagement.Serverless;
#else
namespace Elastic.Clients.Elasticsearch.IndexManagement;
#endif

public sealed partial class ExistsTemplateResponse : ElasticsearchResponse
{
public bool Exists => ApiCallDetails is
{
HasSuccessfulStatusCode: true, HttpStatusCode: 200
};
}

0 comments on commit c9b4cdf

Please sign in to comment.