diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsResponse.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsResponse.cs new file mode 100644 index 00000000000..2f92cd51777 --- /dev/null +++ b/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 + }; +} diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsSourceResponse.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsSourceResponse.cs new file mode 100644 index 00000000000..6e537053a64 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Shared/Api/ExistsSourceResponse.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 ExistsSourceResponse : ElasticsearchResponse +{ + public bool Exists => ApiCallDetails is + { + HasSuccessfulStatusCode: true, HttpStatusCode: 200 + }; +} diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsAliasResponse.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsAliasResponse.cs new file mode 100644 index 00000000000..e55df48a596 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsAliasResponse.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.IndexManagement.Serverless; +#else +namespace Elastic.Clients.Elasticsearch.IndexManagement; +#endif + +public sealed partial class ExistsAliasResponse : ElasticsearchResponse +{ + public bool Exists => ApiCallDetails is + { + HasSuccessfulStatusCode: true, HttpStatusCode: 200 + }; +} diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs new file mode 100644 index 00000000000..90167ab564e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsIndexTemplateResponse.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.IndexManagement.Serverless; +#else +namespace Elastic.Clients.Elasticsearch.IndexManagement; +#endif + +public sealed partial class ExistsIndexTemplateResponse : ElasticsearchResponse +{ + public bool Exists => ApiCallDetails is + { + HasSuccessfulStatusCode: true, HttpStatusCode: 200 + }; +} diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsResponse.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsResponse.cs new file mode 100644 index 00000000000..26cd81fcce8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/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.IndexManagement; +#else +namespace Elastic.Clients.Elasticsearch.IndexManagement; +#endif + +public sealed partial class ExistsResponse : ElasticsearchResponse +{ + public bool Exists => ApiCallDetails is + { + HasSuccessfulStatusCode: true, HttpStatusCode: 200 + }; +} diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsTemplateResponse.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsTemplateResponse.cs new file mode 100644 index 00000000000..fd93d348d2f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Shared/Api/IndexManagement/ExistsTemplateResponse.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.IndexManagement.Serverless; +#else +namespace Elastic.Clients.Elasticsearch.IndexManagement; +#endif + +public sealed partial class ExistsTemplateResponse : ElasticsearchResponse +{ + public bool Exists => ApiCallDetails is + { + HasSuccessfulStatusCode: true, HttpStatusCode: 200 + }; +}