// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_Windows_AI_ContentSafety_H #define WINRT_Microsoft_Windows_AI_ContentSafety_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Microsoft.Windows.AI.h" #include "winrt/impl/Microsoft.Windows.AI.ContentSafety.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_AI_ContentSafety_IContentFilterOptions< D>::PromptMaxAllowedSeverityLevel() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PromptMaxAllowedSeverityLevel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PromptMaxAllowedSeverityLevel(&value)); } return winrt::Microsoft::Windows::AI::ContentSafety:: TextContentFilterSeverity{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_ContentSafety_IContentFilterOptions:: PromptMaxAllowedSeverityLevel( winrt::Microsoft::Windows::AI::ContentSafety:: TextContentFilterSeverity const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_PromptMaxAllowedSeverityLevel(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PromptMaxAllowedSeverityLevel(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IContentFilterOptions< D>::ResponseMaxAllowedSeverityLevel() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ResponseMaxAllowedSeverityLevel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ResponseMaxAllowedSeverityLevel(&value)); } return winrt::Microsoft::Windows::AI::ContentSafety:: TextContentFilterSeverity{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_ContentSafety_IContentFilterOptions:: ResponseMaxAllowedSeverityLevel( winrt::Microsoft::Windows::AI::ContentSafety:: TextContentFilterSeverity const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ResponseMaxAllowedSeverityLevel( *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ResponseMaxAllowedSeverityLevel( *(void**)(&value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IContentFilterOptions< D>::ImageMaxAllowedSeverityLevel() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ImageMaxAllowedSeverityLevel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImageMaxAllowedSeverityLevel(&value)); } return winrt::Microsoft::Windows::AI::ContentSafety:: ImageContentFilterSeverity{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_ContentSafety_IContentFilterOptions:: ImageMaxAllowedSeverityLevel( winrt::Microsoft::Windows::AI::ContentSafety:: ImageContentFilterSeverity const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_ImageMaxAllowedSeverityLevel(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ImageMaxAllowedSeverityLevel(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity< D>::AdultContentLevel() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AdultContentLevel( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AdultContentLevel( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity:: AdultContentLevel( winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_AdultContentLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_AdultContentLevel(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity< D>::RacyContentLevel() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RacyContentLevel( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RacyContentLevel( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity:: RacyContentLevel( winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_RacyContentLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_RacyContentLevel(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity< D>::GoryContentLevel() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_GoryContentLevel( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GoryContentLevel( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity:: GoryContentLevel( winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_GoryContentLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_GoryContentLevel(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity< D>::ViolentContentLevel() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ViolentContentLevel( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ViolentContentLevel( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverity:: ViolentContentLevel( winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_ViolentContentLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ViolentContentLevel(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_IImageContentFilterSeverityFactory< D>::CreateInstance(winrt::Microsoft::Windows::AI::ContentSafety:: SeverityLevel const& severityForALlCategories) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance( static_cast(severityForALlCategories), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance( static_cast(severityForALlCategories), &value)); } return winrt::Microsoft::Windows::AI::ContentSafety:: ImageContentFilterSeverity{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity< D>::Hate() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_Hate(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Hate(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity< D>::Hate(winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Hate(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Hate(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity< D>::Sexual() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_Sexual(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Sexual(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity:: Sexual(winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Sexual(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Sexual(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity< D>::Violent() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_Violent(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Violent(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity:: Violent(winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Violent(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Violent(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity< D>::SelfHarm() const { winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_SelfHarm(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_SelfHarm(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverity:: SelfHarm(winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_SelfHarm(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SelfHarm(static_cast(value))); } } template auto consume_Microsoft_Windows_AI_ContentSafety_ITextContentFilterSeverityFactory< D>::CreateInstance(winrt::Microsoft::Windows::AI::ContentSafety:: SeverityLevel const& severityForAllCategories) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance( static_cast(severityForAllCategories), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance( static_cast(severityForAllCategories), &value)); } return winrt::Microsoft::Windows::AI::ContentSafety:: TextContentFilterSeverity{value, take_ownership_from_abi}; } #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions> : produce_base< D, winrt::Microsoft::Windows::AI::ContentSafety::IContentFilterOptions> { int32_t __stdcall get_PromptMaxAllowedSeverityLevel( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().PromptMaxAllowedSeverityLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PromptMaxAllowedSeverityLevel( void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PromptMaxAllowedSeverityLevel( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ResponseMaxAllowedSeverityLevel( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().ResponseMaxAllowedSeverityLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ResponseMaxAllowedSeverityLevel( void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ResponseMaxAllowedSeverityLevel( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImageMaxAllowedSeverityLevel( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().ImageMaxAllowedSeverityLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ImageMaxAllowedSeverityLevel(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ImageMaxAllowedSeverityLevel( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::ContentSafety::IImageContentFilterSeverity> : produce_base { int32_t __stdcall get_AdultContentLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().AdultContentLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AdultContentLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AdultContentLevel( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RacyContentLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().RacyContentLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RacyContentLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RacyContentLevel( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GoryContentLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().GoryContentLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_GoryContentLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().GoryContentLevel( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ViolentContentLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().ViolentContentLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ViolentContentLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ViolentContentLevel( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(int32_t severityForALlCategories, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety:: ImageContentFilterSeverity>(this->shim().CreateInstance( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &severityForALlCategories))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::ContentSafety::ITextContentFilterSeverity> : produce_base { int32_t __stdcall get_Hate(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().Hate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Hate(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Hate( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Sexual(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().Sexual()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Sexual(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Sexual( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Violent(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().Violent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Violent(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Violent( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelfHarm(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel>( this->shim().SelfHarm()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SelfHarm(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelfHarm( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(int32_t severityForAllCategories, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::ContentSafety:: TextContentFilterSeverity>(this->shim().CreateInstance( *reinterpret_cast< winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const*>( &severityForAllCategories))); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::Windows::AI::ContentSafety { inline ContentFilterOptions::ContentFilterOptions() : ContentFilterOptions( impl::call_factory_cast< ContentFilterOptions (*)( winrt::Windows::Foundation::IActivationFactory const&), ContentFilterOptions>( [](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) {} inline ImageContentFilterSeverity::ImageContentFilterSeverity() : ImageContentFilterSeverity( impl::call_factory_cast< ImageContentFilterSeverity (*)( winrt::Windows::Foundation::IActivationFactory const&), ImageContentFilterSeverity>( [](winrt::Windows::Foundation::IActivationFactory const& f) { return f .template ActivateInstance(); })) {} inline ImageContentFilterSeverity::ImageContentFilterSeverity( winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& severityForALlCategories) : ImageContentFilterSeverity( impl::call_factory( [&](IImageContentFilterSeverityFactory const& f) { return f.CreateInstance(severityForALlCategories); })) {} inline TextContentFilterSeverity::TextContentFilterSeverity() : TextContentFilterSeverity( impl::call_factory_cast< TextContentFilterSeverity (*)( winrt::Windows::Foundation::IActivationFactory const&), TextContentFilterSeverity>( [](winrt::Windows::Foundation::IActivationFactory const& f) { return f .template ActivateInstance(); })) {} inline TextContentFilterSeverity::TextContentFilterSeverity( winrt::Microsoft::Windows::AI::ContentSafety::SeverityLevel const& severityForAllCategories) : TextContentFilterSeverity( impl::call_factory( [&](ITextContentFilterSeverityFactory const& f) { return f.CreateInstance(severityForAllCategories); })) {} } namespace std { #ifndef WINRT_LEAN_AND_MEAN template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::ContentSafety::IImageContentFilterSeverity> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::ContentSafety::ITextContentFilterSeverity> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::ContentSafety::ImageContentFilterSeverity> : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::ContentSafety::TextContentFilterSeverity> : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif