// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1

#pragma once
#ifndef WINRT_Microsoft_Windows_AppNotifications_Builder_H
#define WINRT_Microsoft_Windows_AppNotifications_Builder_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.250303.1"
#include "winrt/Microsoft.Windows.AppNotifications.h"
#include "winrt/impl/Microsoft.Windows.AppNotifications.2.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Microsoft.Windows.AppNotifications.Builder.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddArgument(param::hstring const& key, param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddArgument(*(void**)(&key), *(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddArgument(*(void**)(&key), *(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetTimeStamp(winrt::Windows::Foundation::DateTime const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTimeStamp(impl::bind_in(value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetTimeStamp(impl::bind_in(value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetDuration(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationDuration const& duration) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDuration(static_cast<int32_t>(duration), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetDuration(static_cast<int32_t>(duration), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetScenario(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationScenario const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetScenario(static_cast<int32_t>(value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetScenario(static_cast<int32_t>(value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddText(param::hstring const& text) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddText(*(void**)(&text), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddText(*(void**)(&text), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddText(param::hstring const& text, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties const& properties) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddText2(*(void**)(&text), *(void**)(&properties), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddText2(*(void**)(&text), *(void**)(&properties), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAttributionText(param::hstring const& text) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAttributionText(*(void**)(&text), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAttributionText(*(void**)(&text), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAttributionText(param::hstring const& text, param::hstring const& language) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAttributionText2(*(void**)(&text), *(void**)(&language), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAttributionText2(*(void**)(&text), *(void**)(&language), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetInlineImage(winrt::Windows::Foundation::Uri const& imageUri) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInlineImage(*(void**)(&imageUri), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetInlineImage(*(void**)(&imageUri), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetInlineImage(winrt::Windows::Foundation::Uri const& imageUri, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const& imageCrop) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInlineImage2(*(void**)(&imageUri), static_cast<int32_t>(imageCrop), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetInlineImage2(*(void**)(&imageUri), static_cast<int32_t>(imageCrop), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetInlineImage(winrt::Windows::Foundation::Uri const& imageUri, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const& imagecrop, param::hstring const& alternateText) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInlineImage3(*(void**)(&imageUri), static_cast<int32_t>(imagecrop), *(void**)(&alternateText), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetInlineImage3(*(void**)(&imageUri), static_cast<int32_t>(imagecrop), *(void**)(&alternateText), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAppLogoOverride(winrt::Windows::Foundation::Uri const& imageUri) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAppLogoOverride(*(void**)(&imageUri), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAppLogoOverride(*(void**)(&imageUri), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAppLogoOverride(winrt::Windows::Foundation::Uri const& imageUri, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const& imageCrop) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAppLogoOverride2(*(void**)(&imageUri), static_cast<int32_t>(imageCrop), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAppLogoOverride2(*(void**)(&imageUri), static_cast<int32_t>(imageCrop), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAppLogoOverride(winrt::Windows::Foundation::Uri const& imageUri, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const& imageCrop, param::hstring const& alternateText) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAppLogoOverride3(*(void**)(&imageUri), static_cast<int32_t>(imageCrop), *(void**)(&alternateText), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAppLogoOverride3(*(void**)(&imageUri), static_cast<int32_t>(imageCrop), *(void**)(&alternateText), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetHeroImage(winrt::Windows::Foundation::Uri const& imageUri) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHeroImage(*(void**)(&imageUri), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetHeroImage(*(void**)(&imageUri), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetHeroImage(winrt::Windows::Foundation::Uri const& imageUri, param::hstring const& alternateText) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHeroImage2(*(void**)(&imageUri), *(void**)(&alternateText), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetHeroImage2(*(void**)(&imageUri), *(void**)(&alternateText), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAudioUri(winrt::Windows::Foundation::Uri const& audioUri) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAudioUri(*(void**)(&audioUri), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAudioUri(*(void**)(&audioUri), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAudioUri(winrt::Windows::Foundation::Uri const& audioUri, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationAudioLooping const& loop) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAudioUri2(*(void**)(&audioUri), static_cast<int32_t>(loop), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAudioUri2(*(void**)(&audioUri), static_cast<int32_t>(loop), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAudioEvent(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationSoundEvent const& appNotificationSoundEvent) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAudioEvent(static_cast<int32_t>(appNotificationSoundEvent), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAudioEvent(static_cast<int32_t>(appNotificationSoundEvent), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetAudioEvent(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationSoundEvent const& appNotificationSoundEvent, winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationAudioLooping const& loop) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAudioEvent2(static_cast<int32_t>(appNotificationSoundEvent), static_cast<int32_t>(loop), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetAudioEvent2(static_cast<int32_t>(appNotificationSoundEvent), static_cast<int32_t>(loop), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::MuteAudio() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MuteAudio(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->MuteAudio(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddTextBox(param::hstring const& id) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddTextBox(*(void**)(&id), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddTextBox(*(void**)(&id), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddTextBox(param::hstring const& id, param::hstring const& placeHolderText, param::hstring const& title) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddTextBox2(*(void**)(&id), *(void**)(&placeHolderText), *(void**)(&title), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddTextBox2(*(void**)(&id), *(void**)(&placeHolderText), *(void**)(&title), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddButton(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddButton(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddButton(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddComboBox(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddComboBox(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddComboBox(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::AddProgressBar(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddProgressBar(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->AddProgressBar(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::BuildNotification() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->BuildNotification(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->BuildNotification(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::AppNotification{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetTag(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTag(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetTag(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilder<D>::SetGroup(param::hstring const& group) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetGroup(*(void**)(&group), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>**)this;
            check_hresult(_winrt_abi_type->SetGroup(*(void**)(&group), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationBuilderStatics<D>::IsUrgentScenarioSupported() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IsUrgentScenarioSupported(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics>**)this;
            check_hresult(_winrt_abi_type->IsUrgentScenarioSupported(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::Content(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::Arguments() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Arguments(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_Arguments(&value));
        }
        return winrt::Windows::Foundation::Collections::IMap<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::Arguments(param::map<hstring, hstring> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Arguments(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_Arguments(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::Icon(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::ToolTip() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ToolTip(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_ToolTip(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::ToolTip(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ToolTip(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_ToolTip(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::ContextMenuPlacement() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContextMenuPlacement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_ContextMenuPlacement(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::ContextMenuPlacement(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContextMenuPlacement(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_ContextMenuPlacement(value));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::ButtonStyle() const
    {
        winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButtonStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ButtonStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_ButtonStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::ButtonStyle(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButtonStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ButtonStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_ButtonStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::InputId() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_InputId(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::InputId(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InputId(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_InputId(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::InvokeUri() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InvokeUri(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_InvokeUri(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::InvokeUri(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InvokeUri(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_InvokeUri(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::TargetAppId() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TargetAppId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->get_TargetAppId(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::TargetAppId(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TargetAppId(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->put_TargetAppId(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::AddArgument(param::hstring const& key, param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddArgument(*(void**)(&key), *(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->AddArgument(*(void**)(&key), *(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetIcon(winrt::Windows::Foundation::Uri const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIcon(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetIcon(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetToolTip(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetToolTip(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetToolTip(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetContextMenuPlacement() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetContextMenuPlacement(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetContextMenuPlacement(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetButtonStyle(winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButtonStyle const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetButtonStyle(static_cast<int32_t>(value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetButtonStyle(static_cast<int32_t>(value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetInputId(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInputId(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetInputId(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetInvokeUri(winrt::Windows::Foundation::Uri const& protocolUri) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInvokeUri(*(void**)(&protocolUri), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetInvokeUri(*(void**)(&protocolUri), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButton<D>::SetInvokeUri(winrt::Windows::Foundation::Uri const& protocolUri, param::hstring const& targetAppId) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetInvokeUri2(*(void**)(&protocolUri), *(void**)(&targetAppId), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>**)this;
            check_hresult(_winrt_abi_type->SetInvokeUri2(*(void**)(&protocolUri), *(void**)(&targetAppId), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButtonFactory<D>::CreateInstance(param::hstring const& content) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&content), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&content), &value));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButtonStatics<D>::IsToolTipSupported() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IsToolTipSupported(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>**)this;
            check_hresult(_winrt_abi_type->IsToolTipSupported(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationButtonStatics<D>::IsButtonStyleSupported() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IsButtonStyleSupported(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>**)this;
            check_hresult(_winrt_abi_type->IsButtonStyleSupported(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IMap<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::Items(param::map<hstring, hstring> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Items(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->put_Items(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::Title(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::SelectedItem(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::AddItem(param::hstring const& id, param::hstring const& content) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddItem(*(void**)(&id), *(void**)(&content), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->AddItem(*(void**)(&id), *(void**)(&content), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::SetTitle(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTitle(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->SetTitle(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBox<D>::SetSelectedItem(param::hstring const& id) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetSelectedItem(*(void**)(&id), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>**)this;
            check_hresult(_winrt_abi_type->SetSelectedItem(*(void**)(&id), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationComboBoxFactory<D>::CreateInstance(param::hstring const& id) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&id), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&id), &value));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::Title(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::Status() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Status(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_Status(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::Status(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Status(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_Status(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::Value(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::ValueStringOverride() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValueStringOverride(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_ValueStringOverride(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::ValueStringOverride(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ValueStringOverride(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_ValueStringOverride(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::SetTitle(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTitle(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->SetTitle(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::BindTitle() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->BindTitle(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->BindTitle(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::SetStatus(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetStatus(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->SetStatus(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::BindStatus() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->BindStatus(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->BindStatus(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::SetValue(double value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetValue(value, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->SetValue(value, &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::BindValue() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->BindValue(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->BindValue(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::SetValueStringOverride(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetValueStringOverride(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->SetValueStringOverride(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationProgressBar<D>::BindValueStringOverride() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->BindValueStringOverride(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>**)this;
            check_hresult(_winrt_abi_type->BindValueStringOverride(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::Language() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Language(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->get_Language(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::Language(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Language(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->put_Language(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::IncomingCallAlignment() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncomingCallAlignment(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->get_IncomingCallAlignment(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::IncomingCallAlignment(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IncomingCallAlignment(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->put_IncomingCallAlignment(value));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::MaxLines() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::MaxLines(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::SetLanguage(param::hstring const& value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetLanguage(*(void**)(&value), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->SetLanguage(*(void**)(&value), &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::SetIncomingCallAlignment() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIncomingCallAlignment(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->SetIncomingCallAlignment(&result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Windows_AppNotifications_Builder_IAppNotificationTextProperties<D>::SetMaxLines(int32_t value) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetMaxLines(value, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>**)this;
            check_hresult(_winrt_abi_type->SetMaxLines(value, &result));
        }
        return winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties{ result, take_ownership_from_abi };
    }
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder>
    {
        int32_t __stdcall AddArgument(void* key, void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddArgument(*reinterpret_cast<hstring const*>(&key), *reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTimeStamp(int64_t value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetTimeStamp(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetDuration(int32_t duration, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetDuration(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationDuration const*>(&duration)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetScenario(int32_t value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetScenario(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationScenario const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddText(void* text, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddText(*reinterpret_cast<hstring const*>(&text)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddText2(void* text, void* properties, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddText(*reinterpret_cast<hstring const*>(&text), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties const*>(&properties)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAttributionText(void* text, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAttributionText(*reinterpret_cast<hstring const*>(&text)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAttributionText2(void* text, void* language, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAttributionText(*reinterpret_cast<hstring const*>(&text), *reinterpret_cast<hstring const*>(&language)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInlineImage(void* imageUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetInlineImage(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInlineImage2(void* imageUri, int32_t imageCrop, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetInlineImage(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const*>(&imageCrop)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInlineImage3(void* imageUri, int32_t imagecrop, void* alternateText, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetInlineImage(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const*>(&imagecrop), *reinterpret_cast<hstring const*>(&alternateText)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAppLogoOverride(void* imageUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAppLogoOverride(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAppLogoOverride2(void* imageUri, int32_t imageCrop, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAppLogoOverride(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const*>(&imageCrop)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAppLogoOverride3(void* imageUri, int32_t imageCrop, void* alternateText, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAppLogoOverride(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationImageCrop const*>(&imageCrop), *reinterpret_cast<hstring const*>(&alternateText)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetHeroImage(void* imageUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetHeroImage(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetHeroImage2(void* imageUri, void* alternateText, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetHeroImage(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&imageUri), *reinterpret_cast<hstring const*>(&alternateText)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAudioUri(void* audioUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAudioUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&audioUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAudioUri2(void* audioUri, int32_t loop, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAudioUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&audioUri), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationAudioLooping const*>(&loop)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAudioEvent(int32_t appNotificationSoundEvent, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAudioEvent(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationSoundEvent const*>(&appNotificationSoundEvent)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAudioEvent2(int32_t appNotificationSoundEvent, int32_t loop, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetAudioEvent(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationSoundEvent const*>(&appNotificationSoundEvent), *reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationAudioLooping const*>(&loop)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MuteAudio(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().MuteAudio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddTextBox(void* id, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddTextBox(*reinterpret_cast<hstring const*>(&id)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddTextBox2(void* id, void* placeHolderText, void* title, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddTextBox(*reinterpret_cast<hstring const*>(&id), *reinterpret_cast<hstring const*>(&placeHolderText), *reinterpret_cast<hstring const*>(&title)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddButton(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddButton(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddComboBox(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddComboBox(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddProgressBar(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().AddProgressBar(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall BuildNotification(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::AppNotification>(this->shim().BuildNotification());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTag(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetTag(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetGroup(void* group, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder>(this->shim().SetGroup(*reinterpret_cast<hstring const*>(&group)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics>
    {
        int32_t __stdcall IsUrgentScenarioSupported(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().IsUrgentScenarioSupported());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Arguments(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMap<hstring, hstring>>(this->shim().Arguments());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Arguments(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Arguments(*reinterpret_cast<winrt::Windows::Foundation::Collections::IMap<hstring, hstring> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ToolTip(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ToolTip());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ToolTip(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ToolTip(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContextMenuPlacement(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ContextMenuPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContextMenuPlacement(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContextMenuPlacement(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ButtonStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButtonStyle>(this->shim().ButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ButtonStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ButtonStyle(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButtonStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputId(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().InputId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InputId(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InputId(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InvokeUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().InvokeUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InvokeUri(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InvokeUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TargetAppId(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().TargetAppId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TargetAppId(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TargetAppId(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddArgument(void* key, void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().AddArgument(*reinterpret_cast<hstring const*>(&key), *reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIcon(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetIcon(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetToolTip(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetToolTip(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetContextMenuPlacement(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetContextMenuPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetButtonStyle(int32_t value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetButtonStyle(*reinterpret_cast<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButtonStyle const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInputId(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetInputId(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInvokeUri(void* protocolUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetInvokeUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&protocolUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetInvokeUri2(void* protocolUri, void* targetAppId, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().SetInvokeUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&protocolUri), *reinterpret_cast<hstring const*>(&targetAppId)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* content, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton>(this->shim().CreateInstance(*reinterpret_cast<hstring const*>(&content)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics>
    {
        int32_t __stdcall IsToolTipSupported(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().IsToolTipSupported());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IsButtonStyleSupported(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().IsButtonStyleSupported());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox>
    {
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMap<hstring, hstring>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Items(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Items(*reinterpret_cast<winrt::Windows::Foundation::Collections::IMap<hstring, hstring> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddItem(void* id, void* content, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox>(this->shim().AddItem(*reinterpret_cast<hstring const*>(&id), *reinterpret_cast<hstring const*>(&content)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTitle(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox>(this->shim().SetTitle(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetSelectedItem(void* id, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox>(this->shim().SetSelectedItem(*reinterpret_cast<hstring const*>(&id)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* id, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox>(this->shim().CreateInstance(*reinterpret_cast<hstring const*>(&id)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar>
    {
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Status(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Status(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Status(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Value(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Value(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Value(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ValueStringOverride(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ValueStringOverride());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ValueStringOverride(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ValueStringOverride(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTitle(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().SetTitle(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall BindTitle(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().BindTitle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetStatus(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().SetStatus(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall BindStatus(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().BindStatus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetValue(double value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().SetValue(value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall BindValue(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().BindValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetValueStringOverride(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().SetValueStringOverride(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall BindValueStringOverride(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar>(this->shim().BindValueStringOverride());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties> : produce_base<D, winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties>
    {
        int32_t __stdcall get_Language(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Language());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Language(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Language(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncomingCallAlignment(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IncomingCallAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IncomingCallAlignment(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IncomingCallAlignment(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLines(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLines());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLines(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLines(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetLanguage(void* value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties>(this->shim().SetLanguage(*reinterpret_cast<hstring const*>(&value)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIncomingCallAlignment(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties>(this->shim().SetIncomingCallAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetMaxLines(int32_t value, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties>(this->shim().SetMaxLines(value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
}
WINRT_EXPORT namespace winrt::Microsoft::Windows::AppNotifications::Builder
{
    inline AppNotificationBuilder::AppNotificationBuilder() :
        AppNotificationBuilder(impl::call_factory_cast<AppNotificationBuilder(*)(winrt::Windows::Foundation::IActivationFactory const&), AppNotificationBuilder>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AppNotificationBuilder>(); }))
    {
    }
    inline auto AppNotificationBuilder::IsUrgentScenarioSupported()
    {
        return impl::call_factory_cast<bool(*)(IAppNotificationBuilderStatics const&), AppNotificationBuilder, IAppNotificationBuilderStatics>([](IAppNotificationBuilderStatics const& f) { return f.IsUrgentScenarioSupported(); });
    }
    inline AppNotificationButton::AppNotificationButton() :
        AppNotificationButton(impl::call_factory_cast<AppNotificationButton(*)(winrt::Windows::Foundation::IActivationFactory const&), AppNotificationButton>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AppNotificationButton>(); }))
    {
    }
    inline AppNotificationButton::AppNotificationButton(param::hstring const& content) :
        AppNotificationButton(impl::call_factory<AppNotificationButton, IAppNotificationButtonFactory>([&](IAppNotificationButtonFactory const& f) { return f.CreateInstance(content); }))
    {
    }
    inline auto AppNotificationButton::IsToolTipSupported()
    {
        return impl::call_factory_cast<bool(*)(IAppNotificationButtonStatics const&), AppNotificationButton, IAppNotificationButtonStatics>([](IAppNotificationButtonStatics const& f) { return f.IsToolTipSupported(); });
    }
    inline auto AppNotificationButton::IsButtonStyleSupported()
    {
        return impl::call_factory_cast<bool(*)(IAppNotificationButtonStatics const&), AppNotificationButton, IAppNotificationButtonStatics>([](IAppNotificationButtonStatics const& f) { return f.IsButtonStyleSupported(); });
    }
    inline AppNotificationComboBox::AppNotificationComboBox(param::hstring const& id) :
        AppNotificationComboBox(impl::call_factory<AppNotificationComboBox, IAppNotificationComboBoxFactory>([&](IAppNotificationComboBoxFactory const& f) { return f.CreateInstance(id); }))
    {
    }
    inline AppNotificationProgressBar::AppNotificationProgressBar() :
        AppNotificationProgressBar(impl::call_factory_cast<AppNotificationProgressBar(*)(winrt::Windows::Foundation::IActivationFactory const&), AppNotificationProgressBar>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AppNotificationProgressBar>(); }))
    {
    }
    inline AppNotificationTextProperties::AppNotificationTextProperties() :
        AppNotificationTextProperties(impl::call_factory_cast<AppNotificationTextProperties(*)(winrt::Windows::Foundation::IActivationFactory const&), AppNotificationTextProperties>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AppNotificationTextProperties>(); }))
    {
    }
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilder> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationBuilderStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationComboBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationProgressBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::IAppNotificationTextProperties> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationComboBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationProgressBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationTextProperties> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif
