<commit_before>﻿namespace TraktApiSharp.Requests.Params
{
    using System;
    using System.Collections.Generic;
    using Utils;

    public abstract class TraktCommonMovieAndShowFilter : TraktCommonFilter
    {
        protected TraktCommonMovieAndShowFilter() : base() { }

        protected TraktCommonMovieAndShowFilter(string query, int years, string[] genres = null, string[] languages = null,
                                                string[] countries = null, Range<int>? runtimes = null, Range<int>? ratings = null,
                                                string[] certifications = null)
            : base(years, genres, languages, countries, runtimes, ratings)
        {
            WithQuery(query);
            WithCertifications(null, certifications);
        }

        /// <summary>Returns the query string parameter value.</summary>
        public string Query { get; protected set; }

        /// <summary>Returns, whether the query string parameter is set.</summary>
        public bool HasQuerySet => !string.IsNullOrEmpty(Query);

        /// <summary>Returns the content certifications parameter value.</summary>
        public string[] Certifications { get; private set; }

        /// <summary>Returns, whether the content certifications parameter is set.</summary>
        public bool HasCertificationsSet => Certifications != null && Certifications.Length > 0;

        /// <summary>Returns, whether any parameters are set.</summary>
        public override bool HasValues => base.HasValues || HasQuerySet || HasCertificationsSet;

        public TraktCommonMovieAndShowFilter WithQuery(string query)
        {
            if (string.IsNullOrEmpty(query))
                throw new ArgumentException("query not valid", nameof(query));

            Query = query;
            return this;
        }

        public TraktCommonMovieAndShowFilter ClearQuery()
        {
            Query = null;
            return this;
        }

        public new TraktCommonMovieAndShowFilter WithYears(int years)
        {
            base.WithYears(years);
            return this;
        }

        public new TraktCommonMovieAndShowFilter AddGenres(string genre, params string[] genres)
        {
            base.AddGenres(genre, genres);
            return this;
        }

        public new TraktCommonMovieAndShowFilter WithGenres(string genre, params string[] genres)
        {
            base.WithGenres(genre, genres);
            return this;
        }

        public new TraktCommonMovieAndShowFilter AddLanguages(string language, params string[] languages)
        {
            base.AddLanguages(language, languages);
            return this;
        }

        public new TraktCommonMovieAndShowFilter WithLanguages(string language, params string[] languages)
        {<commit_msg>Add overload for ClearYears() in TraktCommonMovieAndShowFilter<commit_after>﻿namespace TraktApiSharp.Requests.Params
{
    using System;
    using System.Collections.Generic;
    using Utils;

    public abstract class TraktCommonMovieAndShowFilter : TraktCommonFilter
    {
        protected TraktCommonMovieAndShowFilter() : base() { }

        protected TraktCommonMovieAndShowFilter(string query, int years, string[] genres = null, string[] languages = null,
                                                string[] countries = null, Range<int>? runtimes = null, Range<int>? ratings = null,
                                                string[] certifications = null)
            : base(years, genres, languages, countries, runtimes, ratings)
        {
            WithQuery(query);
            WithCertifications(null, certifications);
        }

        /// <summary>Returns the query string parameter value.</summary>
        public string Query { get; protected set; }

        /// <summary>Returns, whether the query string parameter is set.</summary>
        public bool HasQuerySet => !string.IsNullOrEmpty(Query);

        /// <summary>Returns the content certifications parameter value.</summary>
        public string[] Certifications { get; private set; }

        /// <summary>Returns, whether the content certifications parameter is set.</summary>
        public bool HasCertificationsSet => Certifications != null && Certifications.Length > 0;

        /// <summary>Returns, whether any parameters are set.</summary>
        public override bool HasValues => base.HasValues || HasQuerySet || HasCertificationsSet;

        public TraktCommonMovieAndShowFilter WithQuery(string query)
        {
            if (string.IsNullOrEmpty(query))
                throw new ArgumentException("query not valid", nameof(query));

            Query = query;
            return this;
        }

        public TraktCommonMovieAndShowFilter ClearQuery()
        {
            Query = null;
            return this;
        }

        public new TraktCommonMovieAndShowFilter WithYears(int years)
        {
            base.WithYears(years);
            return this;
        }

        public new TraktCommonMovieAndShowFilter ClearYears()
        {
            base.ClearYears();
            return this;
        }

        public new TraktCommonMovieAndShowFilter AddGenres(string genre, params string[] genres)
        {
            base.AddGenres(genre, genres);
            return this;
        }

        public new TraktCommonMovieAndShowFilter WithGenres(string genre, params string[] genres)
        {
            base.WithGenres(genre, genres);
            return this;
        }

        public new TraktCommonMovieAndShowFilter AddLanguages(string language, params string[] languages)
        {
            base.AddLanguages(language, languages);
            return this;
        }

        public new TraktCommonMovieAndShowFilter WithLanguages(string language, params string[] languages)
        {
{'fraction_non_alphanumeric': 0.08056790968183374, 'fraction_numerical': 0.00034211426616489907, 'mean_word_length': 2.200328407224959, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2406481', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1348, 'n_words': 386}