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

#pragma once
#ifndef WINRT_Microsoft_Security_Authentication_OAuth_H
#define WINRT_Microsoft_Security_Authentication_OAuth_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.240405.15"
#include "winrt/impl/Microsoft.UI.2.h"
#include "winrt/impl/Windows.Data.Json.2.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.Web.Http.2.h"
#include "winrt/impl/Windows.Web.Http.Headers.2.h"
#include "winrt/impl/Microsoft.Security.Authentication.OAuth.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure<D>::Error() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_Error(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure<D>::ErrorDescription() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_ErrorDescription(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure<D>::ErrorUri() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_ErrorUri(&value));
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure<D>::State() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_State(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure<D>::AdditionalParams() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_AdditionalParams(&value));
        return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::ResponseType() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_ResponseType(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::ResponseType(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_ResponseType(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::ClientId() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_ClientId(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::ClientId(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_ClientId(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::RedirectUri() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_RedirectUri(&value));
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::RedirectUri(winrt::Windows::Foundation::Uri const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_RedirectUri(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::State() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_State(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::State(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_State(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::Scope() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_Scope(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::Scope(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_Scope(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::CodeChallenge() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_CodeChallenge(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::CodeChallenge(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_CodeChallenge(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::CodeChallengeMethod() const
    {
        winrt::Microsoft::Security::Authentication::OAuth::CodeChallengeMethodKind value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_CodeChallengeMethod(reinterpret_cast<int32_t*>(&value)));
        return value;
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::CodeChallengeMethod(winrt::Microsoft::Security::Authentication::OAuth::CodeChallengeMethodKind const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_CodeChallengeMethod(static_cast<int32_t>(value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams<D>::AdditionalParams() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_AdditionalParams(&value));
        return winrt::Windows::Foundation::Collections::IMap<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsFactory<D>::CreateInstance(param::hstring const& responseType, param::hstring const& clientId) const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory)->CreateInstance(*(void**)(&responseType), *(void**)(&clientId), &value));
        return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsFactory<D>::CreateInstance2(param::hstring const& responseType, param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory)->CreateInstance2(*(void**)(&responseType), *(void**)(&clientId), *(void**)(&redirectUri), &value));
        return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsStatics<D>::CreateForAuthorizationCodeRequest(param::hstring const& clientId) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics)->CreateForAuthorizationCodeRequest(*(void**)(&clientId), &result));
        return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsStatics<D>::CreateForAuthorizationCodeRequest(param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics)->CreateForAuthorizationCodeRequest2(*(void**)(&clientId), *(void**)(&redirectUri), &result));
        return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestResult<D>::ResponseUri() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult)->get_ResponseUri(&value));
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestResult<D>::Response() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult)->get_Response(&value));
        return winrt::Microsoft::Security::Authentication::OAuth::AuthResponse{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestResult<D>::Failure() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult)->get_Failure(&value));
        return winrt::Microsoft::Security::Authentication::OAuth::AuthFailure{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::State() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_State(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::Code() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_Code(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::AccessToken() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_AccessToken(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::TokenType() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_TokenType(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::ExpiresIn() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_ExpiresIn(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::Scope() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_Scope(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse<D>::AdditionalParams() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_AdditionalParams(&value));
        return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication<D>::Authorization() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->get_Authorization(&value));
        return winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication<D>::Authorization(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->put_Authorization(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication<D>::ProxyAuthorization() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->get_ProxyAuthorization(&value));
        return winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication<D>::ProxyAuthorization(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->put_ProxyAuthorization(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication<D>::AdditionalHeaders() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->get_AdditionalHeaders(&value));
        return winrt::Windows::Foundation::Collections::IMap<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthenticationFactory<D>::CreateInstance(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& authorization) const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationFactory)->CreateInstance(*(void**)(&authorization), &value));
        return winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthenticationStatics<D>::CreateForBasicAuthorization(param::hstring const& clientId, param::hstring const& clientSecret) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationStatics)->CreateForBasicAuthorization(*(void**)(&clientId), *(void**)(&clientSecret), &result));
        return winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics<D>::RequestAuthWithParamsAsync(winrt::Microsoft::UI::WindowId const& parentWindowId, winrt::Windows::Foundation::Uri const& authEndpoint, winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams const& params) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->RequestAuthWithParamsAsync(impl::bind_in(parentWindowId), *(void**)(&authEndpoint), *(void**)(&params), &operation));
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics<D>::CompleteAuthRequest(winrt::Windows::Foundation::Uri const& responseUri) const
    {
        bool result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->CompleteAuthRequest(*(void**)(&responseUri), &result));
        return result;
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics<D>::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->RequestTokenAsync(*(void**)(&tokenEndpoint), *(void**)(&params), &operation));
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics<D>::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params, winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication const& clientAuth) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->RequestTokenAsync2(*(void**)(&tokenEndpoint), *(void**)(&params), *(void**)(&clientAuth), &operation));
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure<D>::Kind() const
    {
        winrt::Microsoft::Security::Authentication::OAuth::TokenFailureKind value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_Kind(reinterpret_cast<int32_t*>(&value)));
        return value;
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure<D>::ErrorCode() const
    {
        winrt::hresult value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_ErrorCode(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure<D>::Error() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_Error(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure<D>::ErrorDescription() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_ErrorDescription(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure<D>::ErrorUri() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_ErrorUri(&value));
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure<D>::AdditionalParams() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_AdditionalParams(&value));
        return winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Data::Json::IJsonValue>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::GrantType() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_GrantType(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::GrantType(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_GrantType(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Code() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Code(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Code(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Code(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::RedirectUri() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_RedirectUri(&value));
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::RedirectUri(winrt::Windows::Foundation::Uri const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_RedirectUri(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::CodeVerifier() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_CodeVerifier(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::CodeVerifier(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_CodeVerifier(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::ClientId() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_ClientId(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::ClientId(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_ClientId(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Username() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Username(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Username(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Username(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Password() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Password(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Password(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Password(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Scope() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Scope(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::Scope(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Scope(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::RefreshToken() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_RefreshToken(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::RefreshToken(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_RefreshToken(*(void**)(&value)));
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams<D>::AdditionalParams() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_AdditionalParams(&value));
        return winrt::Windows::Foundation::Collections::IMap<hstring, hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsFactory<D>::CreateInstance(param::hstring const& grantType) const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsFactory)->CreateInstance(*(void**)(&grantType), &value));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics<D>::CreateForAuthorizationCodeRequest(winrt::Microsoft::Security::Authentication::OAuth::AuthResponse const& authResponse) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForAuthorizationCodeRequest(*(void**)(&authResponse), &result));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics<D>::CreateForClientCredentials() const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForClientCredentials(&result));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics<D>::CreateForExtension(winrt::Windows::Foundation::Uri const& extensionUri) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForExtension(*(void**)(&extensionUri), &result));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics<D>::CreateForRefreshToken(param::hstring const& refreshToken) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForRefreshToken(*(void**)(&refreshToken), &result));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestResult<D>::ResponseMessage() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult)->get_ResponseMessage(&value));
        return winrt::Windows::Web::Http::HttpResponseMessage{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestResult<D>::Response() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult)->get_Response(&value));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenResponse{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestResult<D>::Failure() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult)->get_Failure(&value));
        return winrt::Microsoft::Security::Authentication::OAuth::TokenFailure{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse<D>::AccessToken() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_AccessToken(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse<D>::TokenType() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_TokenType(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse<D>::ExpiresIn() const
    {
        double value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_ExpiresIn(&value));
        return value;
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse<D>::RefreshToken() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_RefreshToken(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse<D>::Scope() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_Scope(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse<D>::AdditionalParams() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_AdditionalParams(&value));
        return winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Data::Json::IJsonValue>{ value, take_ownership_from_abi };
    }
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure>
    {
        int32_t __stdcall get_Error(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Error());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ErrorDescription(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ErrorDescription());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ErrorUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().ErrorUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_State(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().State());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalParams(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().AdditionalParams());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams>
    {
        int32_t __stdcall get_ResponseType(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ResponseType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ResponseType(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ResponseType(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClientId(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ClientId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClientId(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClientId(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RedirectUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().RedirectUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RedirectUri(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RedirectUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_State(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().State());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_State(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().State(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Scope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Scope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Scope(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Scope(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CodeChallenge(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CodeChallenge());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CodeChallenge(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CodeChallenge(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CodeChallengeMethod(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::CodeChallengeMethodKind>(this->shim().CodeChallengeMethod());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CodeChallengeMethod(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CodeChallengeMethod(*reinterpret_cast<winrt::Microsoft::Security::Authentication::OAuth::CodeChallengeMethodKind const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalParams(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().AdditionalParams());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory>
    {
        int32_t __stdcall CreateInstance(void* responseType, void* clientId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams>(this->shim().CreateInstance(*reinterpret_cast<hstring const*>(&responseType), *reinterpret_cast<hstring const*>(&clientId)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateInstance2(void* responseType, void* clientId, void* redirectUri, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams>(this->shim().CreateInstance2(*reinterpret_cast<hstring const*>(&responseType), *reinterpret_cast<hstring const*>(&clientId), *reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&redirectUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics>
    {
        int32_t __stdcall CreateForAuthorizationCodeRequest(void* clientId, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams>(this->shim().CreateForAuthorizationCodeRequest(*reinterpret_cast<hstring const*>(&clientId)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateForAuthorizationCodeRequest2(void* clientId, void* redirectUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams>(this->shim().CreateForAuthorizationCodeRequest(*reinterpret_cast<hstring const*>(&clientId), *reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&redirectUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult>
    {
        int32_t __stdcall get_ResponseUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().ResponseUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Response(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::AuthResponse>(this->shim().Response());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Failure(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::AuthFailure>(this->shim().Failure());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse>
    {
        int32_t __stdcall get_State(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().State());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Code(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Code());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AccessToken(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().AccessToken());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TokenType(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().TokenType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpiresIn(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ExpiresIn());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Scope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Scope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalParams(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>>(this->shim().AdditionalParams());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication>
    {
        int32_t __stdcall get_Authorization(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue>(this->shim().Authorization());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Authorization(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Authorization(*reinterpret_cast<winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProxyAuthorization(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue>(this->shim().ProxyAuthorization());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ProxyAuthorization(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ProxyAuthorization(*reinterpret_cast<winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalHeaders(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().AdditionalHeaders());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationFactory> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationFactory>
    {
        int32_t __stdcall CreateInstance(void* authorization, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const*>(&authorization)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationStatics> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationStatics>
    {
        int32_t __stdcall CreateForBasicAuthorization(void* clientId, void* clientSecret, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication>(this->shim().CreateForBasicAuthorization(*reinterpret_cast<hstring const*>(&clientId), *reinterpret_cast<hstring const*>(&clientSecret)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics>
    {
        int32_t __stdcall RequestAuthWithParamsAsync(struct struct_Microsoft_UI_WindowId parentWindowId, void* authEndpoint, void* params, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestResult>>(this->shim().RequestAuthWithParamsAsync(*reinterpret_cast<winrt::Microsoft::UI::WindowId const*>(&parentWindowId), *reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&authEndpoint), *reinterpret_cast<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams const*>(&params)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CompleteAuthRequest(void* responseUri, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().CompleteAuthRequest(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&responseUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RequestTokenAsync(void* tokenEndpoint, void* params, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestResult>>(this->shim().RequestTokenAsync(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&tokenEndpoint), *reinterpret_cast<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const*>(&params)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RequestTokenAsync2(void* tokenEndpoint, void* params, void* clientAuth, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestResult>>(this->shim().RequestTokenAsync(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&tokenEndpoint), *reinterpret_cast<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const*>(&params), *reinterpret_cast<winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication const*>(&clientAuth)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure>
    {
        int32_t __stdcall get_Kind(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenFailureKind>(this->shim().Kind());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ErrorCode(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(this->shim().ErrorCode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Error(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Error());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ErrorDescription(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ErrorDescription());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ErrorUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().ErrorUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalParams(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Data::Json::IJsonValue>>(this->shim().AdditionalParams());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams>
    {
        int32_t __stdcall get_GrantType(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().GrantType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GrantType(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GrantType(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Code(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Code());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Code(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Code(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RedirectUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().RedirectUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RedirectUri(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RedirectUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CodeVerifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CodeVerifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CodeVerifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CodeVerifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClientId(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ClientId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClientId(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClientId(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Username(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Username());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Username(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Username(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Password(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Password());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Password(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Password(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Scope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Scope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Scope(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Scope(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RefreshToken(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().RefreshToken());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RefreshToken(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RefreshToken(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalParams(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().AdditionalParams());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsFactory> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsFactory>
    {
        int32_t __stdcall CreateInstance(void* grantType, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams>(this->shim().CreateInstance(*reinterpret_cast<hstring const*>(&grantType)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics>
    {
        int32_t __stdcall CreateForAuthorizationCodeRequest(void* authResponse, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams>(this->shim().CreateForAuthorizationCodeRequest(*reinterpret_cast<winrt::Microsoft::Security::Authentication::OAuth::AuthResponse const*>(&authResponse)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateForClientCredentials(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams>(this->shim().CreateForClientCredentials());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateForExtension(void* extensionUri, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams>(this->shim().CreateForExtension(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&extensionUri)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateForRefreshToken(void* refreshToken, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams>(this->shim().CreateForRefreshToken(*reinterpret_cast<hstring const*>(&refreshToken)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult>
    {
        int32_t __stdcall get_ResponseMessage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Web::Http::HttpResponseMessage>(this->shim().ResponseMessage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Response(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenResponse>(this->shim().Response());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Failure(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Security::Authentication::OAuth::TokenFailure>(this->shim().Failure());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse> : produce_base<D, winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse>
    {
        int32_t __stdcall get_AccessToken(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().AccessToken());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TokenType(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().TokenType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpiresIn(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpiresIn());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RefreshToken(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().RefreshToken());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Scope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Scope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AdditionalParams(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Data::Json::IJsonValue>>(this->shim().AdditionalParams());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
}
WINRT_EXPORT namespace winrt::Microsoft::Security::Authentication::OAuth
{
    inline AuthRequestParams::AuthRequestParams(param::hstring const& responseType, param::hstring const& clientId) :
        AuthRequestParams(impl::call_factory<AuthRequestParams, IAuthRequestParamsFactory>([&](IAuthRequestParamsFactory const& f) { return f.CreateInstance(responseType, clientId); }))
    {
    }
    inline AuthRequestParams::AuthRequestParams(param::hstring const& responseType, param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) :
        AuthRequestParams(impl::call_factory<AuthRequestParams, IAuthRequestParamsFactory>([&](IAuthRequestParamsFactory const& f) { return f.CreateInstance2(responseType, clientId, redirectUri); }))
    {
    }
    inline auto AuthRequestParams::CreateForAuthorizationCodeRequest(param::hstring const& clientId)
    {
        return impl::call_factory<AuthRequestParams, IAuthRequestParamsStatics>([&](IAuthRequestParamsStatics const& f) { return f.CreateForAuthorizationCodeRequest(clientId); });
    }
    inline auto AuthRequestParams::CreateForAuthorizationCodeRequest(param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri)
    {
        return impl::call_factory<AuthRequestParams, IAuthRequestParamsStatics>([&](IAuthRequestParamsStatics const& f) { return f.CreateForAuthorizationCodeRequest(clientId, redirectUri); });
    }
    inline ClientAuthentication::ClientAuthentication() :
        ClientAuthentication(impl::call_factory_cast<ClientAuthentication(*)(winrt::Windows::Foundation::IActivationFactory const&), ClientAuthentication>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ClientAuthentication>(); }))
    {
    }
    inline ClientAuthentication::ClientAuthentication(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& authorization) :
        ClientAuthentication(impl::call_factory<ClientAuthentication, IClientAuthenticationFactory>([&](IClientAuthenticationFactory const& f) { return f.CreateInstance(authorization); }))
    {
    }
    inline auto ClientAuthentication::CreateForBasicAuthorization(param::hstring const& clientId, param::hstring const& clientSecret)
    {
        return impl::call_factory<ClientAuthentication, IClientAuthenticationStatics>([&](IClientAuthenticationStatics const& f) { return f.CreateForBasicAuthorization(clientId, clientSecret); });
    }
    inline auto OAuth2Manager::RequestAuthWithParamsAsync(winrt::Microsoft::UI::WindowId const& parentWindowId, winrt::Windows::Foundation::Uri const& authEndpoint, winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams const& params)
    {
        return impl::call_factory<OAuth2Manager, IOAuth2ManagerStatics>([&](IOAuth2ManagerStatics const& f) { return f.RequestAuthWithParamsAsync(parentWindowId, authEndpoint, params); });
    }
    inline auto OAuth2Manager::CompleteAuthRequest(winrt::Windows::Foundation::Uri const& responseUri)
    {
        return impl::call_factory<OAuth2Manager, IOAuth2ManagerStatics>([&](IOAuth2ManagerStatics const& f) { return f.CompleteAuthRequest(responseUri); });
    }
    inline auto OAuth2Manager::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params)
    {
        return impl::call_factory<OAuth2Manager, IOAuth2ManagerStatics>([&](IOAuth2ManagerStatics const& f) { return f.RequestTokenAsync(tokenEndpoint, params); });
    }
    inline auto OAuth2Manager::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params, winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication const& clientAuth)
    {
        return impl::call_factory<OAuth2Manager, IOAuth2ManagerStatics>([&](IOAuth2ManagerStatics const& f) { return f.RequestTokenAsync(tokenEndpoint, params, clientAuth); });
    }
    inline TokenRequestParams::TokenRequestParams(param::hstring const& grantType) :
        TokenRequestParams(impl::call_factory<TokenRequestParams, ITokenRequestParamsFactory>([&](ITokenRequestParamsFactory const& f) { return f.CreateInstance(grantType); }))
    {
    }
    inline auto TokenRequestParams::CreateForAuthorizationCodeRequest(winrt::Microsoft::Security::Authentication::OAuth::AuthResponse const& authResponse)
    {
        return impl::call_factory<TokenRequestParams, ITokenRequestParamsStatics>([&](ITokenRequestParamsStatics const& f) { return f.CreateForAuthorizationCodeRequest(authResponse); });
    }
    inline auto TokenRequestParams::CreateForClientCredentials()
    {
        return impl::call_factory_cast<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams(*)(ITokenRequestParamsStatics const&), TokenRequestParams, ITokenRequestParamsStatics>([](ITokenRequestParamsStatics const& f) { return f.CreateForClientCredentials(); });
    }
    inline auto TokenRequestParams::CreateForExtension(winrt::Windows::Foundation::Uri const& extensionUri)
    {
        return impl::call_factory<TokenRequestParams, ITokenRequestParamsStatics>([&](ITokenRequestParamsStatics const& f) { return f.CreateForExtension(extensionUri); });
    }
    inline auto TokenRequestParams::CreateForRefreshToken(param::hstring const& refreshToken)
    {
        return impl::call_factory<TokenRequestParams, ITokenRequestParamsStatics>([&](ITokenRequestParamsStatics const& f) { return f.CreateForRefreshToken(refreshToken); });
    }
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::AuthFailure> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::AuthRequestResult> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::AuthResponse> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::OAuth2Manager> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::TokenFailure> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::TokenRequestResult> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::Security::Authentication::OAuth::TokenResponse> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif
