public static async System.Threading.Tasks.Task <R> MatchAsync <R>(this IInviteTenantAdminResult self, System.Func <TenantAdminInvited, System.Threading.Tasks.Task <R> > whenTenantAdminInvited, System.Func <TenantAdminNotInvited, System.Threading.Tasks.Task <R> > whenTenantAdminNotInvited, System.Func <InvalidRequest, System.Threading.Tasks.Task <R> > whenInvalidRequest)
        {
            switch ((self))
            {
            case TenantAdminInvited tenantadmininvited:
                return(await whenTenantAdminInvited(tenantadmininvited));

            case TenantAdminNotInvited tenantadminnotinvited:
                return(await whenTenantAdminNotInvited(tenantadminnotinvited));

            case InvalidRequest invalidrequest:
                return(await whenInvalidRequest(invalidrequest));

            default:
                throw new System.NotSupportedException("This switch statement should be exhaustive");
            }
        }
        public static IInviteTenantAdminResult Match(this IInviteTenantAdminResult self, System.Func <TenantAdminInvited, IInviteTenantAdminResult> whenTenantAdminInvited, System.Func <TenantAdminNotInvited, IInviteTenantAdminResult> whenTenantAdminNotInvited, System.Func <InvalidRequest, IInviteTenantAdminResult> whenInvalidRequest)
        {
            switch ((self))
            {
            case TenantAdminInvited tenantadmininvited:
                return(whenTenantAdminInvited(tenantadmininvited));

            case TenantAdminNotInvited tenantadminnotinvited:
                return(whenTenantAdminNotInvited(tenantadminnotinvited));

            case InvalidRequest invalidrequest:
                return(whenInvalidRequest(invalidrequest));

            default:
                throw new System.NotSupportedException("This switch statement should be exhaustive");
            }
        }