text: // WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.220531.1
  
  #pragma once
  #ifndef WINRT_Windows_ApplicationModel_Contacts_DataProvider_H
  #define WINRT_Windows_ApplicationModel_Contacts_DataProvider_H
  #include "winrt/base.h"
  static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.220531.1"), "Mismatched C++/WinRT headers.");
  #define CPPWINRT_VERSION "2.0.220531.1"
  #include "winrt/Windows.ApplicationModel.Contacts.h"
  #include "winrt/impl/Windows.ApplicationModel.Contacts.2.h"
  #include "winrt/impl/Windows.Foundation.2.h"
  #include "winrt/impl/Windows.ApplicationModel.Contacts.DataProvider.2.h"
  namespace winrt::impl
  {
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::SyncRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequestEventArgs> const& handler) const
      {
          winrt::event_token token{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection)->add_SyncRequested(*(void**)(&handler), put_abi(token)));
          return token;
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::SyncRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequestEventArgs> const& handler) const
      {
          return impl::make_event_revoker<D, SyncRequested_revoker>(this, SyncRequested(handler));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::SyncRequested(winrt::event_token const& token) const noexcept
      {
          WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection)->remove_SyncRequested(impl::bind_in(token));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::ServerSearchReadBatchRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequestEventArgs> const& handler) const
      {
          winrt::event_token token{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection)->add_ServerSearchReadBatchRequested(*(void**)(&handler), put_abi(token)));
          return token;
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::ServerSearchReadBatchRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequestEventArgs> const& handler) const
      {
          return impl::make_event_revoker<D, ServerSearchReadBatchRequested_revoker>(this, ServerSearchReadBatchRequested(handler));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::ServerSearchReadBatchRequested(winrt::event_token const& token) const noexcept
      {
          WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection)->remove_ServerSearchReadBatchRequested(impl::bind_in(token));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection<D>::Start() const
      {
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection)->Start());
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection2<D>::CreateOrUpdateContactRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequestEventArgs> const& handler) const
      {
          winrt::event_token token{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2)->add_CreateOrUpdateContactRequested(*(void**)(&handler), put_abi(token)));
          return token;
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection2<D>::CreateOrUpdateContactRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequestEventArgs> const& handler) const
      {
          return impl::make_event_revoker<D, CreateOrUpdateContactRequested_revoker>(this, CreateOrUpdateContactRequested(handler));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection2<D>::CreateOrUpdateContactRequested(winrt::event_token const& token) const noexcept
      {
          WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2)->remove_CreateOrUpdateContactRequested(impl::bind_in(token));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection2<D>::DeleteContactRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequestEventArgs> const& handler) const
      {
          winrt::event_token token{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2)->add_DeleteContactRequested(*(void**)(&handler), put_abi(token)));
          return token;
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection2<D>::DeleteContactRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequestEventArgs> const& handler) const
      {
          return impl::make_event_revoker<D, DeleteContactRequested_revoker>(this, DeleteContactRequested(handler));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderConnection2<D>::DeleteContactRequested(winrt::event_token const& token) const noexcept
      {
          WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2)->remove_DeleteContactRequested(impl::bind_in(token));
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactDataProviderTriggerDetails<D>::Connection() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderTriggerDetails)->get_Connection(&value));
          return winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListCreateOrUpdateContactRequest<D>::ContactListId() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest)->get_ContactListId(&value));
          return hstring{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListCreateOrUpdateContactRequest<D>::Contact() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest)->get_Contact(&value));
          return winrt::Windows::ApplicationModel::Contacts::Contact{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListCreateOrUpdateContactRequest<D>::ReportCompletedAsync(winrt::Windows::ApplicationModel::Contacts::Contact const& createdOrUpdatedContact) const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest)->ReportCompletedAsync(*(void**)(&createdOrUpdatedContact), &result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListCreateOrUpdateContactRequest<D>::ReportFailedAsync() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest)->ReportFailedAsync(&result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListCreateOrUpdateContactRequestEventArgs<D>::Request() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequestEventArgs)->get_Request(&value));
          return winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequest{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListCreateOrUpdateContactRequestEventArgs<D>::GetDeferral() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequestEventArgs)->GetDeferral(&result));
          return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListDeleteContactRequest<D>::ContactListId() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest)->get_ContactListId(&value));
          return hstring{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListDeleteContactRequest<D>::ContactId() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest)->get_ContactId(&value));
          return hstring{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListDeleteContactRequest<D>::ReportCompletedAsync() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest)->ReportCompletedAsync(&result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListDeleteContactRequest<D>::ReportFailedAsync() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest)->ReportFailedAsync(&result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListDeleteContactRequestEventArgs<D>::Request() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequestEventArgs)->get_Request(&value));
          return winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequest{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListDeleteContactRequestEventArgs<D>::GetDeferral() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequestEventArgs)->GetDeferral(&result));
          return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::SessionId() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->get_SessionId(&value));
          return hstring{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::ContactListId() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->get_ContactListId(&value));
          return hstring{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::Options() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->get_Options(&value));
          return winrt::Windows::ApplicationModel::Contacts::ContactQueryOptions{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::SuggestedBatchSize() const
      {
          uint32_t value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->get_SuggestedBatchSize(&value));
          return value;
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::SaveContactAsync(winrt::Windows::ApplicationModel::Contacts::Contact const& contact) const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->SaveContactAsync(*(void**)(&contact), &result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::ReportCompletedAsync() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->ReportCompletedAsync(&result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequest<D>::ReportFailedAsync(winrt::Windows::ApplicationModel::Contacts::ContactBatchStatus const& batchStatus) const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest)->ReportFailedAsync(static_cast<int32_t>(batchStatus), &result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequestEventArgs<D>::Request() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequestEventArgs)->get_Request(&value));
          return winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequest{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListServerSearchReadBatchRequestEventArgs<D>::GetDeferral() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequestEventArgs)->GetDeferral(&value));
          return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListSyncManagerSyncRequest<D>::ContactListId() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest)->get_ContactListId(&value));
          return hstring{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListSyncManagerSyncRequest<D>::ReportCompletedAsync() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest)->ReportCompletedAsync(&result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListSyncManagerSyncRequest<D>::ReportFailedAsync() const
      {
          void* result{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest)->ReportFailedAsync(&result));
          return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListSyncManagerSyncRequestEventArgs<D>::Request() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequestEventArgs)->get_Request(&value));
          return winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequest{ value, take_ownership_from_abi };
      }
      template <typename D> auto consume_Windows_ApplicationModel_Contacts_DataProvider_IContactListSyncManagerSyncRequestEventArgs<D>::GetDeferral() const
      {
          void* value{};
          check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequestEventArgs)->GetDeferral(&value));
          return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi };
      }
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection>
      {
          int32_t __stdcall add_SyncRequested(void* handler, winrt::event_token* token) noexcept final try
          {
              zero_abi<winrt::event_token>(token);
              typename D::abi_guard guard(this->shim());
              *token = detach_from<winrt::event_token>(this->shim().SyncRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequestEventArgs> const*>(&handler)));
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall remove_SyncRequested(winrt::event_token token) noexcept final
          {
              typename D::abi_guard guard(this->shim());
              this->shim().SyncRequested(*reinterpret_cast<winrt::event_token const*>(&token));
              return 0;
          }
          int32_t __stdcall add_ServerSearchReadBatchRequested(void* handler, winrt::event_token* token) noexcept final try
          {
              zero_abi<winrt::event_token>(token);
              typename D::abi_guard guard(this->shim());
              *token = detach_from<winrt::event_token>(this->shim().ServerSearchReadBatchRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequestEventArgs> const*>(&handler)));
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall remove_ServerSearchReadBatchRequested(winrt::event_token token) noexcept final
          {
              typename D::abi_guard guard(this->shim());
              this->shim().ServerSearchReadBatchRequested(*reinterpret_cast<winrt::event_token const*>(&token));
              return 0;
          }
          int32_t __stdcall Start() noexcept final try
          {
              typename D::abi_guard guard(this->shim());
              this->shim().Start();
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2>
      {
          int32_t __stdcall add_CreateOrUpdateContactRequested(void* handler, winrt::event_token* token) noexcept final try
          {
              zero_abi<winrt::event_token>(token);
              typename D::abi_guard guard(this->shim());
              *token = detach_from<winrt::event_token>(this->shim().CreateOrUpdateContactRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequestEventArgs> const*>(&handler)));
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall remove_CreateOrUpdateContactRequested(winrt::event_token token) noexcept final
          {
              typename D::abi_guard guard(this->shim());
              this->shim().CreateOrUpdateContactRequested(*reinterpret_cast<winrt::event_token const*>(&token));
              return 0;
          }
          int32_t __stdcall add_DeleteContactRequested(void* handler, winrt::event_token* token) noexcept final try
          {
              zero_abi<winrt::event_token>(token);
              typename D::abi_guard guard(this->shim());
              *token = detach_from<winrt::event_token>(this->shim().DeleteContactRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection, winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequestEventArgs> const*>(&handler)));
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall remove_DeleteContactRequested(winrt::event_token token) noexcept final
          {
              typename D::abi_guard guard(this->shim());
              this->shim().DeleteContactRequested(*reinterpret_cast<winrt::event_token const*>(&token));
              return 0;
          }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderTriggerDetails> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderTriggerDetails>
      {
          int32_t __stdcall get_Connection(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection>(this->shim().Connection());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest>
      {
          int32_t __stdcall get_ContactListId(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<hstring>(this->shim().ContactListId());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall get_Contact(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::Contact>(this->shim().Contact());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportCompletedAsync(void* createdOrUpdatedContact, void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportCompletedAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Contacts::Contact const*>(&createdOrUpdatedContact)));
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportFailedAsync(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportFailedAsync());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequestEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequestEventArgs>
      {
          int32_t __stdcall get_Request(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequest>(this->shim().Request());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall GetDeferral(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::Deferral>(this->shim().GetDeferral());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest>
      {
          int32_t __stdcall get_ContactListId(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<hstring>(this->shim().ContactListId());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall get_ContactId(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<hstring>(this->shim().ContactId());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportCompletedAsync(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportCompletedAsync());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportFailedAsync(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportFailedAsync());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequestEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequestEventArgs>
      {
          int32_t __stdcall get_Request(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequest>(this->shim().Request());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall GetDeferral(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::Deferral>(this->shim().GetDeferral());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest>
      {
          int32_t __stdcall get_SessionId(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<hstring>(this->shim().SessionId());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall get_ContactListId(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<hstring>(this->shim().ContactListId());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall get_Options(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::ContactQueryOptions>(this->shim().Options());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall get_SuggestedBatchSize(uint32_t* value) noexcept final try
          {
              typename D::abi_guard guard(this->shim());
              *value = detach_from<uint32_t>(this->shim().SuggestedBatchSize());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall SaveContactAsync(void* contact, void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().SaveContactAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Contacts::Contact const*>(&contact)));
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportCompletedAsync(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportCompletedAsync());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportFailedAsync(int32_t batchStatus, void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportFailedAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Contacts::ContactBatchStatus const*>(&batchStatus)));
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequestEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequestEventArgs>
      {
          int32_t __stdcall get_Request(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequest>(this->shim().Request());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall GetDeferral(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::Foundation::Deferral>(this->shim().GetDeferral());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest>
      {
          int32_t __stdcall get_ContactListId(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<hstring>(this->shim().ContactListId());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportCompletedAsync(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportCompletedAsync());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall ReportFailedAsync(void** result) noexcept final try
          {
              clear_abi(result);
              typename D::abi_guard guard(this->shim());
              *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().ReportFailedAsync());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  #ifndef WINRT_LEAN_AND_MEAN
      template <typename D>
      struct produce<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequestEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequestEventArgs>
      {
          int32_t __stdcall get_Request(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequest>(this->shim().Request());
              return 0;
          }
          catch (...) { return to_hresult(); }
          int32_t __stdcall GetDeferral(void** value) noexcept final try
          {
              clear_abi(value);
              typename D::abi_guard guard(this->shim());
              *value = detach_from<winrt::Windows::Foundation::Deferral>(this->shim().GetDeferral());
              return 0;
          }
          catch (...) { return to_hresult(); }
      };
  #endif
  }
  WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Contacts::DataProvider
  {
  }
  namespace std
  {
  #ifndef WINRT_LEAN_AND_MEAN
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection2> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderTriggerDetails> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListCreateOrUpdateContactRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListDeleteContactRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderTriggerDetails> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListCreateOrUpdateContactRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListDeleteContactRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequestEventArgs> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequest> : winrt::impl::hash_base {};
      template<> struct hash<winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequestEventArgs> : winrt::impl::hash_base {};
  #endif
  #ifdef __cpp_lib_format
  #endif
  }
  #endif
  