-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implement
Exists
property (#8102)
- Loading branch information
1 parent
e0f6ce4
commit 2ba57e5
Showing
6 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsSourceResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsAliasResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsTemplateResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |