// C++/WinRT v3.0.260818.1

// SPDX-License-Identifier: MIT OR Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) Microsoft Corporation
//
// Generated using .winmd files from https://github.com/microsoft/windows-rs
//

#pragma once
#ifndef WINRT_Windows_AI_Agents_H
#define WINRT_Windows_AI_Agents_H
#ifndef WINRT_IMPORT_MODULE

#ifndef WINRT_IMPL_BUILD_MODULE
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "3.0.260818.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "3.0.260818.1"
#include "winrt/impl/Windows.ApplicationModel.2.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.AI.Agents.2.h"
#endif // WINRT_IMPL_BUILD_MODULE
WINRT_EXPORT namespace winrt::impl
{
    template <typename D> auto consume_Windows_AI_Agents_IAgentContext<D>::AppUserModelId() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentContext, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentContext>::get_AppUserModelId, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentContext<D>::RequestResourceAccess(winrt::Windows::Foundation::Uri const& resource, param::hstring const& description, param::hstring const& reasonForAsking) const
    {
        winrt::Windows::AI::Agents::AgentAuthorizationResponse result{};
        consume_general<winrt::Windows::AI::Agents::IAgentContext, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentContext>::RequestResourceAccess, *(void**)(&resource), *(void**)(&description), *(void**)(&reasonForAsking), reinterpret_cast<std::int32_t*>(&result));
        return result;
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentContextStatics<D>::GetContextForCaller() const
    {
        void* result{};
        consume_general<winrt::Windows::AI::Agents::IAgentContextStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentContextStatics>::GetContextForCaller, &result);
        return winrt::Windows::AI::Agents::AgentContext{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentInfo<D>::Id() const
    {
        winrt::guid value{};
        consume_general<winrt::Windows::AI::Agents::IAgentInfo, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentInfo>::get_Id, put_abi(value));
        return value;
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentInfo<D>::Name() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentInfo, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentInfo>::get_Name, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentInfo<D>::Description() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentInfo, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentInfo>::get_Description, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentInfo<D>::GetPackage() const
    {
        void* result{};
        consume_general<winrt::Windows::AI::Agents::IAgentInfo, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentInfo>::GetPackage, &result);
        return winrt::Windows::ApplicationModel::Package{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::FileSystemRead() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_FileSystemRead, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::FileSystemWrite() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_FileSystemWrite, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::FileSystemDelete() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_FileSystemDelete, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::FileSystemCreate() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_FileSystemCreate, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::HttpGet() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_HttpGet, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::HttpPost() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_HttpPost, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::HttpPut() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_HttpPut, &value);
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_AI_Agents_IAgentResourcesStatics<D>::HttpDelete() const
    {
        void* value{};
        consume_general<winrt::Windows::AI::Agents::IAgentResourcesStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::AI::Agents::IAgentResourcesStatics>::get_HttpDelete, &value);
        return hstring{ value, take_ownership_from_abi };
    }
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::AI::Agents::IAgentContext> : produce_base<D, winrt::Windows::AI::Agents::IAgentContext>
    {
        std::int32_t __stdcall get_AppUserModelId(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().AppUserModelId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall RequestResourceAccess(void* resource, void* description, void* reasonForAsking, std::int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::AI::Agents::AgentAuthorizationResponse>(this->shim().RequestResourceAccess(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&resource), *reinterpret_cast<hstring const*>(&description), *reinterpret_cast<hstring const*>(&reasonForAsking)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::AI::Agents::IAgentContextStatics> : produce_base<D, winrt::Windows::AI::Agents::IAgentContextStatics>
    {
        std::int32_t __stdcall GetContextForCaller(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::AI::Agents::AgentContext>(this->shim().GetContextForCaller());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::AI::Agents::IAgentInfo> : produce_base<D, winrt::Windows::AI::Agents::IAgentInfo>
    {
        std::int32_t __stdcall get_Id(winrt::guid* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::guid>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Name(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Name());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetPackage(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::ApplicationModel::Package>(this->shim().GetPackage());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::AI::Agents::IAgentResourcesStatics> : produce_base<D, winrt::Windows::AI::Agents::IAgentResourcesStatics>
    {
        std::int32_t __stdcall get_FileSystemRead(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().FileSystemRead());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_FileSystemWrite(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().FileSystemWrite());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_FileSystemDelete(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().FileSystemDelete());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_FileSystemCreate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().FileSystemCreate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_HttpGet(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().HttpGet());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_HttpPost(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().HttpPost());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_HttpPut(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().HttpPut());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_HttpDelete(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().HttpDelete());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
}
WINRT_EXPORT namespace winrt::Windows::AI::Agents
{
    inline auto AgentContext::GetContextForCaller()
    {
        return impl::call_factory_cast<winrt::Windows::AI::Agents::AgentContext(*)(IAgentContextStatics const&), AgentContext, IAgentContextStatics>([](IAgentContextStatics const& f) { return f.GetContextForCaller(); });
    }
    inline auto AgentResources::FileSystemRead()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.FileSystemRead(); });
    }
    inline auto AgentResources::FileSystemWrite()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.FileSystemWrite(); });
    }
    inline auto AgentResources::FileSystemDelete()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.FileSystemDelete(); });
    }
    inline auto AgentResources::FileSystemCreate()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.FileSystemCreate(); });
    }
    inline auto AgentResources::HttpGet()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.HttpGet(); });
    }
    inline auto AgentResources::HttpPost()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.HttpPost(); });
    }
    inline auto AgentResources::HttpPut()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.HttpPut(); });
    }
    inline auto AgentResources::HttpDelete()
    {
        return impl::call_factory_cast<hstring(*)(IAgentResourcesStatics const&), AgentResources, IAgentResourcesStatics>([](IAgentResourcesStatics const& f) { return f.HttpDelete(); });
    }
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Windows::AI::Agents::IAgentContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::AI::Agents::IAgentContextStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::AI::Agents::IAgentInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::AI::Agents::IAgentResourcesStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::AI::Agents::AgentContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::AI::Agents::AgentInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::AI::Agents::AgentResources> : winrt::impl::hash_base {};
#endif // WINRT_LEAN_AND_MEAN
#ifdef __cpp_lib_format
#endif // __cpp_lib_format
}
#endif
#endif // WINRT_IMPORT_MODULE
