<commit_before>﻿using System.Net;

namespace Ds3.Models
{
    public class GetBucketRequest : Ds3Request
    {
        private string _bucketName;

        public string BucketName
        {
            get { return _bucketName; }
        }

        private string _marker;
        public string Marker
        {
            get { return _marker; }
            set { WithMarker(value); }
        }

        public GetBucketRequest WithMarker(string marker)
        {
            this._marker = marker;
            this.QueryParams.Add("marker", marker);
            return this;
        }

        private int _maxKeys;
        public int MaxKeys
        {
            get { return _maxKeys; }
            set { WithMaxKeys(value); }
        }

        public GetBucketRequest WithMaxKeys(int maxKeys)
        {
            this._maxKeys = maxKeys;
            this.QueryParams.Add("max-keys", maxKeys.ToString());
            return this;
        }

        private string _prefix;
        public string Prefix
        {
            get { return _prefix; }
            set { WithPrefix(value); }
        }

        public GetBucketRequest WithPrefix(string prefix)
        {
            this._prefix = prefix;
            this.QueryParams.Add("prefix", prefix);
            return this;
        }

        public override HttpVerb Verb
        {
            get
            {
                return HttpVerb.GET;
            }
        }
<commit_msg>Updated the get bucket request to only set query string parameters if the optional properties are set to non-null values.<commit_after>﻿using System.Net;

namespace Ds3.Models
{
    public class GetBucketRequest : Ds3Request
    {
        private string _bucketName;

        public string BucketName
        {
            get { return _bucketName; }
        }

        private string _marker;
        public string Marker
        {
            get { return _marker; }
            set { WithMarker(value); }
        }

        public GetBucketRequest WithMarker(string marker)
        {
            this._marker = marker;
            if (marker == null)
            {
                this.QueryParams.Remove("marker");
            }
            else
            {
                this.QueryParams.Add("marker", marker);
            }
            return this;
        }

        private int? _maxKeys;
        public int? MaxKeys
        {
            get { return _maxKeys; }
            set { WithMaxKeys(value); }
        }

        public GetBucketRequest WithMaxKeys(int? maxKeys)
        {
            this._maxKeys = maxKeys;
            if (maxKeys == null)
            {
                this.QueryParams.Add("max-keys", maxKeys.ToString());
            }
            else
            {
                this.QueryParams.Remove("max-keys");
            }
            return this;
        }

        private string _prefix;
        public string Prefix
        {
            get { return _prefix; }
            set { WithPrefix(value); }
        }

        public GetBucketRequest WithPrefix(string prefix)
        {
            this._prefix = prefix;
            if (prefix == null)
            {
                this.QueryParams.Add("prefix", prefix);
            }
            else
            {
                this.QueryParams.Remove("prefix");
            }
            return this;
        }

        public override HttpVerb Verb
        {
            get
            {
                return HttpVerb.GET;
            }
        }

{'fraction_non_alphanumeric': 0.07584430452203778, 'fraction_numerical': 0.0011448196908986834, 'mean_word_length': 1.2078332280480102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2949943', 'n_tokens_mistral': 878, 'n_tokens_neox': 853, 'n_words': 208}