Split out paged response types into its own header and re-enable KeyLabel Entity field. (#6277)
* Split out paged response types into its own header and re-enable KeyLabel Entity field. * Add new line at eof * Forward declare ConfigurationClient.
This commit is contained in:
parent
632728efb0
commit
cdb6bc0a0f
@ -43,6 +43,7 @@ set(
|
||||
inc/azure/data/appconfiguration/configuration_client.hpp
|
||||
inc/azure/data/appconfiguration/configuration_client_models.hpp
|
||||
inc/azure/data/appconfiguration/configuration_client_options.hpp
|
||||
inc/azure/data/appconfiguration/configuration_client_paged_responses.hpp
|
||||
inc/azure/data/appconfiguration/dll_import_export.hpp
|
||||
inc/azure/data/appconfiguration/rtti.hpp
|
||||
)
|
||||
|
||||
@ -11,5 +11,6 @@
|
||||
#include "azure/data/appconfiguration/configuration_client.hpp"
|
||||
#include "azure/data/appconfiguration/configuration_client_models.hpp"
|
||||
#include "azure/data/appconfiguration/configuration_client_options.hpp"
|
||||
#include "azure/data/appconfiguration/configuration_client_paged_responses.hpp"
|
||||
#include "azure/data/appconfiguration/dll_import_export.hpp"
|
||||
#include "azure/data/appconfiguration/rtti.hpp"
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
#include "configuration_client_models.hpp"
|
||||
#include "configuration_client_options.hpp"
|
||||
#include "configuration_client_paged_responses.hpp"
|
||||
|
||||
#include <azure/core/context.hpp>
|
||||
#include <azure/core/credentials/credentials.hpp>
|
||||
|
||||
@ -5,13 +5,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "configuration_client_options.hpp"
|
||||
#include "dll_import_export.hpp"
|
||||
|
||||
#include <azure/core/context.hpp>
|
||||
#include <azure/core/internal/extendable_enumeration.hpp>
|
||||
#include <azure/core/nullable.hpp>
|
||||
#include <azure/core/paged_response.hpp>
|
||||
#include <azure/core/url.hpp>
|
||||
#include <azure/core/uuid.hpp>
|
||||
|
||||
@ -23,12 +21,6 @@
|
||||
#include <vector>
|
||||
|
||||
namespace Azure { namespace Data { namespace AppConfiguration {
|
||||
class ConfigurationClient;
|
||||
struct GetKeysOptions;
|
||||
struct GetKeyValuesOptions;
|
||||
struct GetSnapshotsOptions;
|
||||
struct GetLabelsOptions;
|
||||
struct GetRevisionsOptions;
|
||||
|
||||
class GetKeysResponseContentType final
|
||||
: public Core::_internal::ExtendableEnumeration<GetKeysResponseContentType> {
|
||||
@ -522,93 +514,4 @@ namespace Azure { namespace Data { namespace AppConfiguration {
|
||||
std::string SyncToken;
|
||||
std::string ETag;
|
||||
};
|
||||
|
||||
class GetKeysPagedResponse final : public Core::PagedResponse<GetKeysPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetKeysPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetKeysOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<Key>> Items;
|
||||
std::string SyncToken;
|
||||
GetKeysResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetKeyValuesPagedResponse final : public Core::PagedResponse<GetKeyValuesPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetKeyValuesPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetKeyValuesOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<KeyValue>> Items;
|
||||
Nullable<std::string> Etag;
|
||||
std::string SyncToken;
|
||||
std::string ETag;
|
||||
GetKeyValuesResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetSnapshotsPagedResponse final : public Core::PagedResponse<GetSnapshotsPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetSnapshotsPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetSnapshotsOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<Snapshot>> Items;
|
||||
std::string SyncToken;
|
||||
GetSnapshotsResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetLabelsPagedResponse final : public Core::PagedResponse<GetLabelsPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetLabelsPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetLabelsOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<Label>> Items;
|
||||
std::string SyncToken;
|
||||
GetLabelsResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetRevisionsPagedResponse final : public Core::PagedResponse<GetRevisionsPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetRevisionsPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetRevisionsOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<KeyValue>> Items;
|
||||
Nullable<std::string> Etag;
|
||||
std::string SyncToken;
|
||||
std::string ETag;
|
||||
GetRevisionsResponseContentType ContentType;
|
||||
};
|
||||
}}} // namespace Azure::Data::AppConfiguration
|
||||
|
||||
@ -22,11 +22,6 @@
|
||||
#include <vector>
|
||||
|
||||
namespace Azure { namespace Data { namespace AppConfiguration {
|
||||
class KeyValueFields;
|
||||
struct KeyValue;
|
||||
class SnapshotFields;
|
||||
class SnapshotStatus;
|
||||
class LabelFields;
|
||||
|
||||
struct ConfigurationClientOptions final : public Azure::Core::_internal::ClientOptions
|
||||
{
|
||||
@ -99,7 +94,7 @@ namespace Azure { namespace Data { namespace AppConfiguration {
|
||||
std::string IfMatch;
|
||||
std::string IfNoneMatch;
|
||||
Core::Uuid XMsClientRequestId{};
|
||||
// KeyValue Entity; TODO: Implement KeyValue entity
|
||||
KeyValue Entity;
|
||||
};
|
||||
|
||||
struct DeleteKeyValueOptions final
|
||||
|
||||
@ -0,0 +1,110 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Code generated by Microsoft (R) TypeSpec Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "configuration_client_models.hpp"
|
||||
#include "configuration_client_options.hpp"
|
||||
|
||||
#include <azure/core/context.hpp>
|
||||
#include <azure/core/nullable.hpp>
|
||||
#include <azure/core/paged_response.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Azure { namespace Data { namespace AppConfiguration {
|
||||
class ConfigurationClient;
|
||||
|
||||
class GetKeysPagedResponse final : public Core::PagedResponse<GetKeysPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetKeysPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetKeysOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<Key>> Items;
|
||||
std::string SyncToken;
|
||||
GetKeysResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetKeyValuesPagedResponse final : public Core::PagedResponse<GetKeyValuesPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetKeyValuesPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetKeyValuesOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<KeyValue>> Items;
|
||||
Nullable<std::string> Etag;
|
||||
std::string SyncToken;
|
||||
std::string ETag;
|
||||
GetKeyValuesResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetSnapshotsPagedResponse final : public Core::PagedResponse<GetSnapshotsPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetSnapshotsPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetSnapshotsOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<Snapshot>> Items;
|
||||
std::string SyncToken;
|
||||
GetSnapshotsResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetLabelsPagedResponse final : public Core::PagedResponse<GetLabelsPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetLabelsPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetLabelsOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<Label>> Items;
|
||||
std::string SyncToken;
|
||||
GetLabelsResponseContentType ContentType;
|
||||
};
|
||||
|
||||
class GetRevisionsPagedResponse final : public Core::PagedResponse<GetRevisionsPagedResponse> {
|
||||
friend class ConfigurationClient;
|
||||
friend class Core::PagedResponse<GetRevisionsPagedResponse>;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ConfigurationClient> m_client;
|
||||
std::string m_accept;
|
||||
GetRevisionsOptions m_options;
|
||||
|
||||
void OnNextPage(Core::Context const& context);
|
||||
|
||||
public:
|
||||
Nullable<std::vector<KeyValue>> Items;
|
||||
Nullable<std::string> Etag;
|
||||
std::string SyncToken;
|
||||
std::string ETag;
|
||||
GetRevisionsResponseContentType ContentType;
|
||||
};
|
||||
}}} // namespace Azure::Data::AppConfiguration
|
||||
@ -643,8 +643,6 @@ Azure::Response<PutKeyValueResult> ConfigurationClient::PutKeyValue(
|
||||
{
|
||||
auto jsonRoot = Core::Json::_internal::json::object();
|
||||
|
||||
// TODO: Add support for KeyValue Entity
|
||||
#if 0
|
||||
jsonRoot["key"] = options.Entity.Key;
|
||||
|
||||
if (options.Entity.Label.HasValue())
|
||||
@ -685,7 +683,6 @@ Azure::Response<PutKeyValueResult> ConfigurationClient::PutKeyValue(
|
||||
{
|
||||
jsonRoot["etag"] = options.Entity.Etag.Value();
|
||||
}
|
||||
#endif
|
||||
|
||||
jsonBody = jsonRoot.dump();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user