Skip to content

Commit

Permalink
Re-implement Exists property (#8102)
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Apr 9, 2024
1 parent 881aff2 commit 69f07c4
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
@@ -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
};
}
@@ -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
};
}
@@ -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
};
}
@@ -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
};
}
@@ -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
};
}
@@ -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 69f07c4

Please sign in to comment.