// C++/WinRT v2.0.190620.2

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#ifndef WINRT_Windows_UI_Core_AnimationMetrics_H
#define WINRT_Windows_UI_Core_AnimationMetrics_H
#include "base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers.");
#include "Windows.UI.Core.h"
#include "impl/Windows.Foundation.2.h"
#include "impl/Windows.Foundation.Collections.2.h"
#include "impl/Windows.UI.Core.AnimationMetrics.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IAnimationDescription<D>::Animations() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IAnimationDescription)->get_Animations(&value));
        return Windows::Foundation::Collections::IVectorView<Windows::UI::Core::AnimationMetrics::IPropertyAnimation>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IAnimationDescription<D>::StaggerDelay() const
    {
        Windows::Foundation::TimeSpan value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IAnimationDescription)->get_StaggerDelay(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IAnimationDescription<D>::StaggerDelayFactor() const
    {
        float value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IAnimationDescription)->get_StaggerDelayFactor(&value));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IAnimationDescription<D>::DelayLimit() const
    {
        Windows::Foundation::TimeSpan value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IAnimationDescription)->get_DelayLimit(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IAnimationDescription<D>::ZOrder() const
    {
        int32_t value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IAnimationDescription)->get_ZOrder(&value));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IAnimationDescriptionFactory<D>::CreateInstance(Windows::UI::Core::AnimationMetrics::AnimationEffect const& effect, Windows::UI::Core::AnimationMetrics::AnimationEffectTarget const& target) const
    {
        void* animation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory)->CreateInstance(static_cast<int32_t>(effect), static_cast<int32_t>(target), &animation));
        return Windows::UI::Core::AnimationMetrics::AnimationDescription{ animation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IOpacityAnimation<D>::InitialOpacity() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IOpacityAnimation)->get_InitialOpacity(&value));
        return Windows::Foundation::IReference<float>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IOpacityAnimation<D>::FinalOpacity() const
    {
        float value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IOpacityAnimation)->get_FinalOpacity(&value));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IPropertyAnimation<D>::Type() const
    {
        Windows::UI::Core::AnimationMetrics::PropertyAnimationType value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IPropertyAnimation)->get_Type(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IPropertyAnimation<D>::Delay() const
    {
        Windows::Foundation::TimeSpan value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IPropertyAnimation)->get_Delay(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IPropertyAnimation<D>::Duration() const
    {
        Windows::Foundation::TimeSpan value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IPropertyAnimation)->get_Duration(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IPropertyAnimation<D>::Control1() const
    {
        Windows::Foundation::Point value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IPropertyAnimation)->get_Control1(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IPropertyAnimation<D>::Control2() const
    {
        Windows::Foundation::Point value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IPropertyAnimation)->get_Control2(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IScaleAnimation<D>::InitialScaleX() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IScaleAnimation)->get_InitialScaleX(&value));
        return Windows::Foundation::IReference<float>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IScaleAnimation<D>::InitialScaleY() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IScaleAnimation)->get_InitialScaleY(&value));
        return Windows::Foundation::IReference<float>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IScaleAnimation<D>::FinalScaleX() const
    {
        float value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IScaleAnimation)->get_FinalScaleX(&value));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IScaleAnimation<D>::FinalScaleY() const
    {
        float value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IScaleAnimation)->get_FinalScaleY(&value));
        return value;
    }
    template <typename D> auto consume_Windows_UI_Core_AnimationMetrics_IScaleAnimation<D>::NormalizedOrigin() const
    {
        Windows::Foundation::Point value;
        check_hresult(WINRT_IMPL_SHIM(Windows::UI::Core::AnimationMetrics::IScaleAnimation)->get_NormalizedOrigin(put_abi(value)));
        return value;
    }
    template <typename D>
    struct produce<D, Windows::UI::Core::AnimationMetrics::IAnimationDescription> : produce_base<D, Windows::UI::Core::AnimationMetrics::IAnimationDescription>
    {
        int32_t __stdcall get_Animations(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::Collections::IVectorView<Windows::UI::Core::AnimationMetrics::IPropertyAnimation>>(this->shim().Animations());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StaggerDelay(int64_t* value) noexcept final try
        {
            zero_abi<Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::TimeSpan>(this->shim().StaggerDelay());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StaggerDelayFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().StaggerDelayFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DelayLimit(int64_t* value) noexcept final try
        {
            zero_abi<Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::TimeSpan>(this->shim().DelayLimit());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ZOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory> : produce_base<D, Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory>
    {
        int32_t __stdcall CreateInstance(int32_t effect, int32_t target, void** animation) noexcept final try
        {
            clear_abi(animation);
            typename D::abi_guard guard(this->shim());
            *animation = detach_from<Windows::UI::Core::AnimationMetrics::AnimationDescription>(this->shim().CreateInstance(*reinterpret_cast<Windows::UI::Core::AnimationMetrics::AnimationEffect const*>(&effect), *reinterpret_cast<Windows::UI::Core::AnimationMetrics::AnimationEffectTarget const*>(&target)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::UI::Core::AnimationMetrics::IOpacityAnimation> : produce_base<D, Windows::UI::Core::AnimationMetrics::IOpacityAnimation>
    {
        int32_t __stdcall get_InitialOpacity(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::IReference<float>>(this->shim().InitialOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FinalOpacity(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().FinalOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::UI::Core::AnimationMetrics::IPropertyAnimation> : produce_base<D, Windows::UI::Core::AnimationMetrics::IPropertyAnimation>
    {
        int32_t __stdcall get_Type(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::UI::Core::AnimationMetrics::PropertyAnimationType>(this->shim().Type());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Delay(int64_t* value) noexcept final try
        {
            zero_abi<Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::TimeSpan>(this->shim().Delay());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Duration(int64_t* value) noexcept final try
        {
            zero_abi<Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::TimeSpan>(this->shim().Duration());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Control1(Windows::Foundation::Point* value) noexcept final try
        {
            zero_abi<Windows::Foundation::Point>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::Point>(this->shim().Control1());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Control2(Windows::Foundation::Point* value) noexcept final try
        {
            zero_abi<Windows::Foundation::Point>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::Point>(this->shim().Control2());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::UI::Core::AnimationMetrics::IScaleAnimation> : produce_base<D, Windows::UI::Core::AnimationMetrics::IScaleAnimation>
    {
        int32_t __stdcall get_InitialScaleX(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::IReference<float>>(this->shim().InitialScaleX());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InitialScaleY(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::IReference<float>>(this->shim().InitialScaleY());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FinalScaleX(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().FinalScaleX());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FinalScaleY(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().FinalScaleY());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NormalizedOrigin(Windows::Foundation::Point* value) noexcept final try
        {
            zero_abi<Windows::Foundation::Point>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::Point>(this->shim().NormalizedOrigin());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
}
namespace winrt::Windows::UI::Core::AnimationMetrics
{
    inline AnimationDescription::AnimationDescription(Windows::UI::Core::AnimationMetrics::AnimationEffect const& effect, Windows::UI::Core::AnimationMetrics::AnimationEffectTarget const& target) :
        AnimationDescription(impl::call_factory<AnimationDescription, Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory>([&](auto&& f) { return f.CreateInstance(effect, target); }))
    {
    }
}
namespace std
{
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::IAnimationDescription> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::IAnimationDescription> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::IOpacityAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::IOpacityAnimation> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::IPropertyAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::IPropertyAnimation> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::IScaleAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::IScaleAnimation> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::AnimationDescription> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::AnimationDescription> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::OpacityAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::OpacityAnimation> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimation> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::ScaleAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::ScaleAnimation> {};
    template<> struct hash<winrt::Windows::UI::Core::AnimationMetrics::TranslationAnimation> : winrt::impl::hash_base<winrt::Windows::UI::Core::AnimationMetrics::TranslationAnimation> {};
}
#endif
