<commit_before>using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using XOMNI.SDK.Public.Clients;
using XOMNI.SDK.Public.Models;
using XOMNI.SDK.Public.Models.Catalog;

namespace XOMNI.SDK.Public.Clients.Catalog
{
	public class CategoryClient : BaseClient
	{
		public CategoryClient(HttpClient httpClient)
			: base(httpClient)
		{

		}

        public async Task<ApiResponse<CategoryTree<CategoryTreeItem>>> GetAsync(bool includeMetadata, AssetDetailType imageAssetDetail, AssetDetailType videoAssetDetail, AssetDetailType documentAssetDetail)
		{
            string path = string.Format("/catalog/categories?includeMetadata={0}&imageAssetDetail={1}&videoAssetDetail={2}&documentAssetDetail={3}", includeMetadata, (int)imageAssetDetail, (int)videoAssetDetail, (int)documentAssetDetail);

			using (var response = await Client.GetAsync(path).ConfigureAwait(false))
			{
                return await response.Content.ReadAsAsync<ApiResponse<CategoryTree<CategoryTreeItem>>>().ConfigureAwait(false);
			}
		}

        public async Task<ApiResponse<List<Category>>> GetAsync(int parentCategoryId, bool includeMetadata, AssetDetailType imageAssetDetail, AssetDetailType videoAssetDetail, AssetDetailType documentAssetDetail)
		{
            if(parentCategoryId<=0)
            {
                throw new ArgumentException("parentCategoryId");
            }

            string path = string.Format("/catalog/categories?parentCategoryId={0}&includeMetadata={1}&imageAssetDetail={2}&videoAssetDetail={3}&documentAssetDetail={4}", parentCategoryId, includeMetadata, (int)imageAssetDetail, (int)videoAssetDetail, (int)documentAssetDetail);

			using (var response = await Client.GetAsync(path).ConfigureAwait(false))
			{
                return await response.Content.ReadAsAsync<ApiResponse<List<Category>>>().ConfigureAwait(false);
			}
		}
	}
}<commit_msg>Validator added.<commit_after>using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using XOMNI.SDK.Public.Clients;
using XOMNI.SDK.Public.Models;
using XOMNI.SDK.Public.Models.Catalog;
using XOMNI.SDK.Public.Extensions;

namespace XOMNI.SDK.Public.Clients.Catalog
{
	public class CategoryClient : BaseClient
	{
		public CategoryClient(HttpClient httpClient)
			: base(httpClient)
		{

		}

        public async Task<ApiResponse<CategoryTree<CategoryTreeItem>>> GetAsync(bool includeMetadata, AssetDetailType imageAssetDetail, AssetDetailType videoAssetDetail, AssetDetailType documentAssetDetail)
		{
            string path = string.Format("/catalog/categories?includeMetadata={0}&imageAssetDetail={1}&videoAssetDetail={2}&documentAssetDetail={3}", includeMetadata, (int)imageAssetDetail, (int)videoAssetDetail, (int)documentAssetDetail);

			using (var response = await Client.GetAsync(path).ConfigureAwait(false))
			{
                return await response.Content.ReadAsAsync<ApiResponse<CategoryTree<CategoryTreeItem>>>().ConfigureAwait(false);
			}
		}

        public async Task<ApiResponse<List<Category>>> GetAsync(int parentCategoryId, bool includeMetadata, AssetDetailType imageAssetDetail, AssetDetailType videoAssetDetail, AssetDetailType documentAssetDetail)
		{
            Validator.For(parentCategoryId, "parentCategoryId").IsGreaterThanOrEqual(1);
            string path = string.Format("/catalog/categories?parentCategoryId={0}&includeMetadata={1}&imageAssetDetail={2}&videoAssetDetail={3}&documentAssetDetail={4}", parentCategoryId, includeMetadata, (int)imageAssetDetail, (int)videoAssetDetail, (int)documentAssetDetail);

			using (var response = await Client.GetAsync(path).ConfigureAwait(false))
			{
                return await response.Content.ReadAsAsync<ApiResponse<List<Category>>>().ConfigureAwait(false);
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.10891870560378848, 'fraction_numerical': 0.005261773217574322, 'mean_word_length': 5.521440823327616, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2650886', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1016, 'n_words': 167}