text:
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.10.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   AdSense Host API Version v4.1
 *
 * \section ApiInfo API Version Information
 *

 *
API
 *          AdSense Host API
 *
API Versionv4.1
 *
API Rev20160313 (437)
 *
API Docs
 *
 *              https://developers.google.com/adsense/host/
 *
Discovery Nameadsensehost
 *

 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using AdSense Host API can be found at
 * https://developers.google.com/adsense/host/.
 *
 * For more information about the Google APIs Client Library for .NET, see
 *
 * https://developers.google.com/api-client-library/dotnet/get_started
 */

namespace Google.Apis.AdSenseHost.v4_1
{
    /// The AdSenseHost Service.
    public class AdSenseHostService : Google.Apis.Services.BaseClientService
    {
        /// The API version.
        public const string Version = "v4.1";

        /// The discovery version used to generate this service.
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// Constructs a new service.
        public AdSenseHostService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// Constructs a new service.
        /// <param name="initializer">The service initializer.</param>
        public AdSenseHostService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            accounts = new AccountsResource(this);
            adclients = new AdclientsResource(this);
            associationsessions = new AssociationsessionsResource(this);
            customchannels = new CustomchannelsResource(this);
            reports = new ReportsResource(this);
            urlchannels = new UrlchannelsResource(this);
        }

        /// Gets the service supported features.
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// Gets the service name.
        public override string Name
        {
            get { return "adsensehost"; }
        }

        /// Gets the service base URI.
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/adsensehost/v4.1/"; }
        }

        /// Gets the service base path.
        public override string BasePath
        {
            get { return "adsensehost/v4.1/"; }
        }

        /// Available OAuth 2.0 scopes for use with the AdSense Host API.
        public class Scope
        {
            /// View and manage your AdSense host data and associated accounts
            public static string Adsensehost = "https://www.googleapis.com/auth/adsensehost";

        }

        private readonly AccountsResource accounts;

        /// Gets the Accounts resource.
        public virtual AccountsResource Accounts
        {
            get { return accounts; }
        }

        private readonly AdclientsResource adclients;

        /// Gets the Adclients resource.
        public virtual AdclientsResource Adclients
        {
            get { return adclients; }
        }

        private readonly AssociationsessionsResource associationsessions;

        /// Gets the Associationsessions resource.
        public virtual AssociationsessionsResource Associationsessions
        {
            get { return associationsessions; }
        }

        private readonly CustomchannelsResource customchannels;

        /// Gets the Customchannels resource.
        public virtual CustomchannelsResource Customchannels
        {
            get { return customchannels; }
        }

        private readonly ReportsResource reports;

        /// Gets the Reports resource.
        public virtual ReportsResource Reports
        {
            get { return reports; }
        }

        private readonly UrlchannelsResource urlchannels;

        /// Gets the Urlchannels resource.
        public virtual UrlchannelsResource Urlchannels
        {
            get { return urlchannels; }
        }
    }

    ///A base abstract class for AdSenseHost requests.
    public abstract class AdSenseHostBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///Constructs a new AdSenseHostBaseServiceRequest instance.
        protected AdSenseHostBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// Data format for the response.
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// Data format for the response.
        public enum AltEnum
        {
            /// Responses with Content-Type of text/csv
            [Google.Apis.Util.StringValueAttribute("csv")]
            Csv,
            /// Responses with Content-Type of application/json
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// Selector specifying which fields to include in a partial response.
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// OAuth 2.0 token for the current user.
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// Returns response with indentations and line breaks.
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// Initializes AdSenseHost parameter list.
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// The "accounts" collection of methods.
    public class AccountsResource
    {
        private const string Resource = "accounts";

        /// The service which this resource belongs to.
        private readonly Google.Apis.Services.IClientService service;

        /// Constructs a new resource.
        public AccountsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            adclients = new AdclientsResource(service);
            adunits = new AdunitsResource(service);
            reports = new ReportsResource(service);

        }

        private readonly AdclientsResource adclients;

        /// Gets the Adclients resource.
        public virtual AdclientsResource Adclients
        {
            get { return adclients; }
        }

        /// The "adclients" collection of methods.
        public class AdclientsResource
        {
            private const string Resource = "adclients";

            /// The service which this resource belongs to.
            private readonly Google.Apis.Services.IClientService service;

            /// Constructs a new resource.
            public AdclientsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }

            /// Get information about one of the ad clients in the specified publisher's AdSense
            /// account.
            /// <param name="accountId">Account which contains the ad client.</param>
            /// <param name="adClientId">Ad client to
            /// get.</param>
            public virtual GetRequest Get(string accountId, string adClientId)
            {
                return new GetRequest(service, accountId, adClientId);
            }

            /// Get information about one of the ad clients in the specified publisher's AdSense
            /// account.
            public class GetRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdClient>
            {
                /// Constructs a new Get request.
                public GetRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    InitParameters();
                }

                /// Account which contains the ad client.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client to get.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}"; }
                }

                /// Initializes Get parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// List all hosted ad clients in the specified hosted account.
            /// <param name="accountId">Account for which to list ad clients.</param>
            public virtual ListRequest List(string accountId)
            {
                return new ListRequest(service, accountId);
            }

            /// List all hosted ad clients in the specified hosted account.
            public class ListRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdClients>
            {
                /// Constructs a new List request.
                public ListRequest(Google.Apis.Services.IClientService service, string accountId)
                    : base(service)
                {
                    AccountId = accountId;
                    InitParameters();
                }

                /// Account for which to list ad clients.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// The maximum number of ad clients to include in the response, used for paging.
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<long> MaxResults { get; set; }

                /// A continuation token, used to page through ad clients. To retrieve the next page, set this
                /// parameter to the value of "nextPageToken" from the previous response.
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients"; }
                }

                /// Initializes List parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly AdunitsResource adunits;

        /// Gets the Adunits resource.
        public virtual AdunitsResource Adunits
        {
            get { return adunits; }
        }

        /// The "adunits" collection of methods.
        public class AdunitsResource
        {
            private const string Resource = "adunits";

            /// The service which this resource belongs to.
            private readonly Google.Apis.Services.IClientService service;

            /// Constructs a new resource.
            public AdunitsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }

            /// Delete the specified ad unit from the specified publisher AdSense account.
            /// <param name="accountId">Account which contains the ad unit.</param>
            /// <param name="adClientId">Ad client for
            /// which to get ad unit.</param>
            /// <param name="adUnitId">Ad unit to delete.</param>
            public virtual DeleteRequest Delete(string accountId, string adClientId, string adUnitId)
            {
                return new DeleteRequest(service, accountId, adClientId, adUnitId);
            }

            /// Delete the specified ad unit from the specified publisher AdSense account.
            public class DeleteRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdUnit>
            {
                /// Constructs a new Delete request.
                public DeleteRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string adUnitId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    InitParameters();
                }

                /// Account which contains the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client for which to get ad unit.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Ad unit to delete.
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdUnitId { get; private set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}"; }
                }

                /// Initializes Delete parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// Get the specified host ad unit in this AdSense account.
            /// <param name="accountId">Account which contains the ad unit.</param>
            /// <param name="adClientId">Ad client for
            /// which to get ad unit.</param>
            /// <param name="adUnitId">Ad unit to get.</param>
            public virtual GetRequest Get(string accountId, string adClientId, string adUnitId)
            {
                return new GetRequest(service, accountId, adClientId, adUnitId);
            }

            /// Get the specified host ad unit in this AdSense account.
            public class GetRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdUnit>
            {
                /// Constructs a new Get request.
                public GetRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string adUnitId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    InitParameters();
                }

                /// Account which contains the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client for which to get ad unit.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Ad unit to get.
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdUnitId { get; private set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}"; }
                }

                /// Initializes Get parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// Get ad code for the specified ad unit, attaching the specified host custom channels.
            /// <param name="accountId">Account which contains the ad client.</param>
            /// <param name="adClientId">Ad client
            /// with contains the ad unit.</param>
            /// <param name="adUnitId">Ad unit to get the code for.</param>
            public virtual GetAdCodeRequest GetAdCode(string accountId, string adClientId, string adUnitId)
            {
                return new GetAdCodeRequest(service, accountId, adClientId, adUnitId);
            }

            /// Get ad code for the specified ad unit, attaching the specified host custom channels.
            public class GetAdCodeRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdCode>
            {
                /// Constructs a new GetAdCode request.
                public GetAdCodeRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string adUnitId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    InitParameters();
                }

                /// Account which contains the ad client.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client with contains the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Ad unit to get the code for.
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdUnitId { get; private set; }

                /// Host custom channel to attach to the ad code.
                [Google.Apis.Util.RequestParameterAttribute("hostCustomChannelId", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> HostCustomChannelId { get; set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "getAdCode"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode"; }
                }

                /// Initializes GetAdCode parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "hostCustomChannelId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "hostCustomChannelId",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// Insert the supplied ad unit into the specified publisher AdSense account.
            /// <param name="body">The body of the request.</param>
            /// <param name="accountId">Account which will contain the ad unit.</param>
            /// <param name="adClientId">Ad client
            /// into which to insert the ad unit.</param>
            public virtual InsertRequest Insert(Google.Apis.AdSenseHost.v4_1.Data.AdUnit body, string accountId, string adClientId)
            {
                return new InsertRequest(service, body, accountId, adClientId);
            }

            /// Insert the supplied ad unit into the specified publisher AdSense account.
            public class InsertRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdUnit>
            {
                /// Constructs a new Insert request.
                public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.AdUnit body, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    Body = body;
                    InitParameters();
                }

                /// Account which will contain the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client into which to insert the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Gets or sets the body of this request.
                Google.Apis.AdSenseHost.v4_1.Data.AdUnit Body { get; set; }

                ///Returns the body of the request.
                protected override object GetBody() { return Body; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "insert"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits"; }
                }

                /// Initializes Insert parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// List all ad units in the specified publisher's AdSense account.
            /// <param name="accountId">Account which contains the ad client.</param>
            /// <param name="adClientId">Ad client for
            /// which to list ad units.</param>
            public virtual ListRequest List(string accountId, string adClientId)
            {
                return new ListRequest(service, accountId, adClientId);
            }

            /// List all ad units in the specified publisher's AdSense account.
            public class ListRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdUnits>
            {
                /// Constructs a new List request.
                public ListRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    InitParameters();
                }

                /// Account which contains the ad client.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client for which to list ad units.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Whether to include inactive ad units. Default: true.
                [Google.Apis.Util.RequestParameterAttribute("includeInactive", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<bool> IncludeInactive { get; set; }

                /// The maximum number of ad units to include in the response, used for paging.
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<long> MaxResults { get; set; }

                /// A continuation token, used to page through ad units. To retrieve the next page, set this
                /// parameter to the value of "nextPageToken" from the previous response.
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits"; }
                }

                /// Initializes List parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "includeInactive", new Google.Apis.Discovery.Parameter
                        {
                            Name = "includeInactive",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// Update the supplied ad unit in the specified publisher AdSense account. This method supports
            /// patch semantics.
            /// <param name="body">The body of the request.</param>
            /// <param name="accountId">Account which contains the ad client.</param>
            /// <param name="adClientId">Ad client
            /// which contains the ad unit.</param>
            /// <param name="adUnitId">Ad unit to get.</param>
            public virtual PatchRequest Patch(Google.Apis.AdSenseHost.v4_1.Data.AdUnit body, string accountId, string adClientId, string adUnitId)
            {
                return new PatchRequest(service, body, accountId, adClientId, adUnitId);
            }

            /// Update the supplied ad unit in the specified publisher AdSense account. This method supports
            /// patch semantics.
            public class PatchRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdUnit>
            {
                /// Constructs a new Patch request.
                public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.AdUnit body, string accountId, string adClientId, string adUnitId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    Body = body;
                    InitParameters();
                }

                /// Account which contains the ad client.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client which contains the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Ad unit to get.
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string AdUnitId { get; private set; }

                /// Gets or sets the body of this request.
                Google.Apis.AdSenseHost.v4_1.Data.AdUnit Body { get; set; }

                ///Returns the body of the request.
                protected override object GetBody() { return Body; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "patch"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "PATCH"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits"; }
                }

                /// Initializes Patch parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// Update the supplied ad unit in the specified publisher AdSense account.
            /// <param name="body">The body of the request.</param>
            /// <param name="accountId">Account which contains the ad client.</param>
            /// <param name="adClientId">Ad client
            /// which contains the ad unit.</param>
            public virtual UpdateRequest Update(Google.Apis.AdSenseHost.v4_1.Data.AdUnit body, string accountId, string adClientId)
            {
                return new UpdateRequest(service, body, accountId, adClientId);
            }

            /// Update the supplied ad unit in the specified publisher AdSense account.
            public class UpdateRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdUnit>
            {
                /// Constructs a new Update request.
                public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.AdUnit body, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    Body = body;
                    InitParameters();
                }

                /// Account which contains the ad client.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Ad client which contains the ad unit.
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// Gets or sets the body of this request.
                Google.Apis.AdSenseHost.v4_1.Data.AdUnit Body { get; set; }

                ///Returns the body of the request.
                protected override object GetBody() { return Body; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "update"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "PUT"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits"; }
                }

                /// Initializes Update parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly ReportsResource reports;

        /// Gets the Reports resource.
        public virtual ReportsResource Reports
        {
            get { return reports; }
        }

        /// The "reports" collection of methods.
        public class ReportsResource
        {
            private const string Resource = "reports";

            /// The service which this resource belongs to.
            private readonly Google.Apis.Services.IClientService service;

            /// Constructs a new resource.
            public ReportsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }

            /// Generate an AdSense report based on the report request sent in the query parameters. Returns
            /// the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
            /// <param name="accountId">Hosted account upon which to report.</param>
            /// <param name="startDate">Start of the
            /// date range to report on in "YYYY-MM-DD" format, inclusive.</param>
            /// <param name="endDate">End of the date
            /// range to report on in "YYYY-MM-DD" format, inclusive.</param>
            public virtual GenerateRequest Generate(string accountId, string startDate, string endDate)
            {
                return new GenerateRequest(service, accountId, startDate, endDate);
            }

            /// Generate an AdSense report based on the report request sent in the query parameters. Returns
            /// the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
            public class GenerateRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.Report>
            {
                /// Constructs a new Generate request.
                public GenerateRequest(Google.Apis.Services.IClientService service, string accountId, string startDate, string endDate)
                    : base(service)
                {
                    AccountId = accountId;
                    StartDate = startDate;
                    EndDate = endDate;
                    InitParameters();
                }

                /// Hosted account upon which to report.
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
                [Google.Apis.Util.RequestParameterAttribute("startDate", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string StartDate { get; private set; }

                /// End of the date range to report on in "YYYY-MM-DD" format, inclusive.
                [Google.Apis.Util.RequestParameterAttribute("endDate", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string EndDate { get; private set; }

                /// Dimensions to base the report on.
                [Google.Apis.Util.RequestParameterAttribute("dimension", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Dimension { get; set; }

                /// Filters to be run on the report.
                [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Filter { get; set; }

                /// Optional locale to use for translating report output to a local language. Defaults to
                /// "en_US" if not specified.
                [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Locale { get; set; }

                /// The maximum number of rows of report data to return.
                /// [minimum: 0]
                /// [maximum: 50000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<long> MaxResults { get; set; }

                /// Numeric columns to include in the report.
                [Google.Apis.Util.RequestParameterAttribute("metric", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Metric { get; set; }

                /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with
                /// "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted
                /// ascending.
                [Google.Apis.Util.RequestParameterAttribute("sort", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Sort { get; set; }

                /// Index of the first row of report data to return.
                /// [minimum: 0]
                /// [maximum: 5000]
                [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<long> StartIndex { get; set; }

                ///Gets the method name.
                public override string MethodName
                {
                    get { return "generate"; }
                }

                ///Gets the HTTP method.
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///Gets the REST path.
                public override string RestPath
                {
                    get { return "accounts/{accountId}/reports"; }
                }

                /// Initializes Generate parameter list.
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "startDate", new Google.Apis.Discovery.Parameter
                        {
                            Name = "startDate",
                            IsRequired = true,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                        });
                    RequestParameters.Add(
                        "endDate", new Google.Apis.Discovery.Parameter
                        {
                            Name = "endDate",
                            IsRequired = true,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                        });
                    RequestParameters.Add(
                        "dimension", new Google.Apis.Discovery.Parameter
                        {
                            Name = "dimension",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "filter", new Google.Apis.Discovery.Parameter
                        {
                            Name = "filter",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+(==|=@).+",
                        });
                    RequestParameters.Add(
                        "locale", new Google.Apis.Discovery.Parameter
                        {
                            Name = "locale",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "metric", new Google.Apis.Discovery.Parameter
                        {
                            Name = "metric",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "sort", new Google.Apis.Discovery.Parameter
                        {
                            Name = "sort",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"(\+|-)?[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "startIndex", new Google.Apis.Discovery.Parameter
                        {
                            Name = "startIndex",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// Get information about the selected associated AdSense account.
        /// <param name="accountId">Account to get information about.</param>
        public virtual GetRequest Get(string accountId)
        {
            return new GetRequest(service, accountId);
        }

        /// Get information about the selected associated AdSense account.
        public class GetRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.Account>
        {
            /// Constructs a new Get request.
            public GetRequest(Google.Apis.Services.IClientService service, string accountId)
                : base(service)
            {
                AccountId = accountId;
                InitParameters();
            }

            /// Account to get information about.
            [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AccountId { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "get"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "accounts/{accountId}"; }
            }

            /// Initializes Get parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "accountId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "accountId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// List hosted accounts associated with this AdSense account by ad client id.
        /// <param name="filterAdClientId">Ad clients to list accounts for.</param>
        public virtual ListRequest List(Google.Apis.Util.Repeatable<string> filterAdClientId)
        {
            return new ListRequest(service, filterAdClientId);
        }

        /// List hosted accounts associated with this AdSense account by ad client id.
        public class ListRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.Accounts>
        {
            /// Constructs a new List request.
            public ListRequest(Google.Apis.Services.IClientService service, Google.Apis.Util.Repeatable<string> filterAdClientId)
                : base(service)
            {
                FilterAdClientId = filterAdClientId;
                InitParameters();
            }

            /// Ad clients to list accounts for.
            [Google.Apis.Util.RequestParameterAttribute("filterAdClientId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> FilterAdClientId { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "list"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "accounts"; }
            }

            /// Initializes List parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "filterAdClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filterAdClientId",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// The "adclients" collection of methods.
    public class AdclientsResource
    {
        private const string Resource = "adclients";

        /// The service which this resource belongs to.
        private readonly Google.Apis.Services.IClientService service;

        /// Constructs a new resource.
        public AdclientsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }

        /// Get information about one of the ad clients in the Host AdSense account.
        /// <param name="adClientId">Ad client to get.</param>
        public virtual GetRequest Get(string adClientId)
        {
            return new GetRequest(service, adClientId);
        }

        /// Get information about one of the ad clients in the Host AdSense account.
        public class GetRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdClient>
        {
            /// Constructs a new Get request.
            public GetRequest(Google.Apis.Services.IClientService service, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                InitParameters();
            }

            /// Ad client to get.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "get"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}"; }
            }

            /// Initializes Get parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// List all host ad clients in this AdSense account.
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// List all host ad clients in this AdSense account.
        public class ListRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AdClients>
        {
            /// Constructs a new List request.
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }

            /// The maximum number of ad clients to include in the response, used for paging.
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// A continuation token, used to page through ad clients. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "list"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients"; }
            }

            /// Initializes List parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// The "associationsessions" collection of methods.
    public class AssociationsessionsResource
    {
        private const string Resource = "associationsessions";

        /// The service which this resource belongs to.
        private readonly Google.Apis.Services.IClientService service;

        /// Constructs a new resource.
        public AssociationsessionsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }

        /// Create an association session for initiating an association with an AdSense user.
        /// <param name="productCode">Products to associate with the user.</param>
        /// <param name="websiteUrl">The URL of
        /// the user's hosted website.</param>
        public virtual StartRequest Start(StartRequest.ProductCodeEnum productCode, string websiteUrl)
        {
            return new StartRequest(service, productCode, websiteUrl);
        }

        /// Create an association session for initiating an association with an AdSense user.
        public class StartRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AssociationSession>
        {
            /// Constructs a new Start request.
            public StartRequest(Google.Apis.Services.IClientService service, StartRequest.ProductCodeEnum productCode, string websiteUrl)
                : base(service)
            {
                ProductCode = productCode;
                WebsiteUrl = websiteUrl;
                InitParameters();
            }

            /// Products to associate with the user.
            [Google.Apis.Util.RequestParameterAttribute("productCode", Google.Apis.Util.RequestParameterType.Query)]
            public virtual ProductCodeEnum ProductCode { get; private set; }

            /// Products to associate with the user.
            public enum ProductCodeEnum
            {
                /// AdSense For Content
                [Google.Apis.Util.StringValueAttribute("AFC")]
                AFC,
                /// AdSense For Games
                [Google.Apis.Util.StringValueAttribute("AFG")]
                AFG,
                /// AdSense For Mobile Content - deprecated
                [Google.Apis.Util.StringValueAttribute("AFMC")]
                AFMC,
                /// AdSense For Search - deprecated
                [Google.Apis.Util.StringValueAttribute("AFS")]
                AFS,
                /// AdSense For Video
                [Google.Apis.Util.StringValueAttribute("AFV")]
                AFV,
            }

            /// The URL of the user's hosted website.
            [Google.Apis.Util.RequestParameterAttribute("websiteUrl", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string WebsiteUrl { get; private set; }

            /// The preferred locale of the user.
            [Google.Apis.Util.RequestParameterAttribute("userLocale", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserLocale { get; set; }

            /// The locale of the user's hosted website.
            [Google.Apis.Util.RequestParameterAttribute("websiteLocale", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string WebsiteLocale { get; set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "start"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "associationsessions/start"; }
            }

            /// Initializes Start parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "productCode", new Google.Apis.Discovery.Parameter
                    {
                        Name = "productCode",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "websiteUrl", new Google.Apis.Discovery.Parameter
                    {
                        Name = "websiteUrl",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "userLocale", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userLocale",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "websiteLocale", new Google.Apis.Discovery.Parameter
                    {
                        Name = "websiteLocale",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// Verify an association session after the association callback returns from AdSense signup.
        /// <param name="token">The token returned to the association callback URL.</param>
        public virtual VerifyRequest Verify(string token)
        {
            return new VerifyRequest(service, token);
        }

        /// Verify an association session after the association callback returns from AdSense signup.
        public class VerifyRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.AssociationSession>
        {
            /// Constructs a new Verify request.
            public VerifyRequest(Google.Apis.Services.IClientService service, string token)
                : base(service)
            {
                Token = token;
                InitParameters();
            }

            /// The token returned to the association callback URL.
            [Google.Apis.Util.RequestParameterAttribute("token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Token { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "verify"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "associationsessions/verify"; }
            }

            /// Initializes Verify parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "token", new Google.Apis.Discovery.Parameter
                    {
                        Name = "token",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// The "customchannels" collection of methods.
    public class CustomchannelsResource
    {
        private const string Resource = "customchannels";

        /// The service which this resource belongs to.
        private readonly Google.Apis.Services.IClientService service;

        /// Constructs a new resource.
        public CustomchannelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }

        /// Delete a specific custom channel from the host AdSense account.
        /// <param name="adClientId">Ad client from which to delete the custom channel.</param>
        /// <param
        /// name="customChannelId">Custom channel to delete.</param>
        public virtual DeleteRequest Delete(string adClientId, string customChannelId)
        {
            return new DeleteRequest(service, adClientId, customChannelId);
        }

        /// Delete a specific custom channel from the host AdSense account.
        public class DeleteRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.CustomChannel>
        {
            /// Constructs a new Delete request.
            public DeleteRequest(Google.Apis.Services.IClientService service, string adClientId, string customChannelId)
                : base(service)
            {
                AdClientId = adClientId;
                CustomChannelId = customChannelId;
                InitParameters();
            }

            /// Ad client from which to delete the custom channel.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// Custom channel to delete.
            [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomChannelId { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels/{customChannelId}"; }
            }

            /// Initializes Delete parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customChannelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customChannelId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// Get a specific custom channel from the host AdSense account.
        /// <param name="adClientId">Ad client from which to get the custom channel.</param>
        /// <param
        /// name="customChannelId">Custom channel to get.</param>
        public virtual GetRequest Get(string adClientId, string customChannelId)
        {
            return new GetRequest(service, adClientId, customChannelId);
        }

        /// Get a specific custom channel from the host AdSense account.
        public class GetRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.CustomChannel>
        {
            /// Constructs a new Get request.
            public GetRequest(Google.Apis.Services.IClientService service, string adClientId, string customChannelId)
                : base(service)
            {
                AdClientId = adClientId;
                CustomChannelId = customChannelId;
                InitParameters();
            }

            /// Ad client from which to get the custom channel.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// Custom channel to get.
            [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomChannelId { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "get"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels/{customChannelId}"; }
            }

            /// Initializes Get parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customChannelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customChannelId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// Add a new custom channel to the host AdSense account.
        /// <param name="body">The body of the request.</param>
        /// <param name="adClientId">Ad client to which the new custom channel will be added.</param>
        public virtual InsertRequest Insert(Google.Apis.AdSenseHost.v4_1.Data.CustomChannel body, string adClientId)
        {
            return new InsertRequest(service, body, adClientId);
        }

        /// Add a new custom channel to the host AdSense account.
        public class InsertRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.CustomChannel>
        {
            /// Constructs a new Insert request.
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.CustomChannel body, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                Body = body;
                InitParameters();
            }

            /// Ad client to which the new custom channel will be added.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// Gets or sets the body of this request.
            Google.Apis.AdSenseHost.v4_1.Data.CustomChannel Body { get; set; }

            ///Returns the body of the request.
            protected override object GetBody() { return Body; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels"; }
            }

            /// Initializes Insert parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// List all host custom channels in this AdSense account.
        /// <param name="adClientId">Ad client for which to list custom channels.</param>
        public virtual ListRequest List(string adClientId)
        {
            return new ListRequest(service, adClientId);
        }

        /// List all host custom channels in this AdSense account.
        public class ListRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.CustomChannels>
        {
            /// Constructs a new List request.
            public ListRequest(Google.Apis.Services.IClientService service, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                InitParameters();
            }

            /// Ad client for which to list custom channels.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// The maximum number of custom channels to include in the response, used for paging.
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// A continuation token, used to page through custom channels. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "list"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels"; }
            }

            /// Initializes List parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// Update a custom channel in the host AdSense account. This method supports patch
        /// semantics.
        /// <param name="body">The body of the request.</param>
        /// <param name="adClientId">Ad client in which the custom channel will be updated.</param>
        /// <param
        /// name="customChannelId">Custom channel to get.</param>
        public virtual PatchRequest Patch(Google.Apis.AdSenseHost.v4_1.Data.CustomChannel body, string adClientId, string customChannelId)
        {
            return new PatchRequest(service, body, adClientId, customChannelId);
        }

        /// Update a custom channel in the host AdSense account. This method supports patch
        /// semantics.
        public class PatchRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.CustomChannel>
        {
            /// Constructs a new Patch request.
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.CustomChannel body, string adClientId, string customChannelId)
                : base(service)
            {
                AdClientId = adClientId;
                CustomChannelId = customChannelId;
                Body = body;
                InitParameters();
            }

            /// Ad client in which the custom channel will be updated.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// Custom channel to get.
            [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string CustomChannelId { get; private set; }

            /// Gets or sets the body of this request.
            Google.Apis.AdSenseHost.v4_1.Data.CustomChannel Body { get; set; }

            ///Returns the body of the request.
            protected override object GetBody() { return Body; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels"; }
            }

            /// Initializes Patch parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customChannelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customChannelId",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// Update a custom channel in the host AdSense account.
        /// <param name="body">The body of the request.</param>
        /// <param name="adClientId">Ad client in which the custom channel will be updated.</param>
        public virtual UpdateRequest Update(Google.Apis.AdSenseHost.v4_1.Data.CustomChannel body, string adClientId)
        {
            return new UpdateRequest(service, body, adClientId);
        }

        /// Update a custom channel in the host AdSense account.
        public class UpdateRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.CustomChannel>
        {
            /// Constructs a new Update request.
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.CustomChannel body, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                Body = body;
                InitParameters();
            }

            /// Ad client in which the custom channel will be updated.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// Gets or sets the body of this request.
            Google.Apis.AdSenseHost.v4_1.Data.CustomChannel Body { get; set; }

            ///Returns the body of the request.
            protected override object GetBody() { return Body; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "update"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels"; }
            }

            /// Initializes Update parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// The "reports" collection of methods.
    public class ReportsResource
    {
        private const string Resource = "reports";

        /// The service which this resource belongs to.
        private readonly Google.Apis.Services.IClientService service;

        /// Constructs a new resource.
        public ReportsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }

        /// Generate an AdSense report based on the report request sent in the query parameters. Returns the
        /// result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
        /// <param name="startDate">Start of the date range to report on in "YYYY-MM-DD" format, inclusive.</param>
        ///
        /// <param name="endDate">End of the date range to report on in "YYYY-MM-DD" format, inclusive.</param>
        public virtual GenerateRequest Generate(string startDate, string endDate)
        {
            return new GenerateRequest(service, startDate, endDate);
        }

        /// Generate an AdSense report based on the report request sent in the query parameters. Returns the
        /// result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
        public class GenerateRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.Report>
        {
            /// Constructs a new Generate request.
            public GenerateRequest(Google.Apis.Services.IClientService service, string startDate, string endDate)
                : base(service)
            {
                StartDate = startDate;
                EndDate = endDate;
                InitParameters();
            }

            /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
            [Google.Apis.Util.RequestParameterAttribute("startDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string StartDate { get; private set; }

            /// End of the date range to report on in "YYYY-MM-DD" format, inclusive.
            [Google.Apis.Util.RequestParameterAttribute("endDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string EndDate { get; private set; }

            /// Dimensions to base the report on.
            [Google.Apis.Util.RequestParameterAttribute("dimension", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Dimension { get; set; }

            /// Filters to be run on the report.
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Filter { get; set; }

            /// Optional locale to use for translating report output to a local language. Defaults to "en_US"
            /// if not specified.
            [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Locale { get; set; }

            /// The maximum number of rows of report data to return.
            /// [minimum: 0]
            /// [maximum: 50000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// Numeric columns to include in the report.
            [Google.Apis.Util.RequestParameterAttribute("metric", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Metric { get; set; }

            /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+"
            /// to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted
            /// ascending.
            [Google.Apis.Util.RequestParameterAttribute("sort", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Sort { get; set; }

            /// Index of the first row of report data to return.
            /// [minimum: 0]
            /// [maximum: 5000]
            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartIndex { get; set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "generate"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "reports"; }
            }

            /// Initializes Generate parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "startDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startDate",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                    });
                RequestParameters.Add(
                    "endDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "endDate",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                    });
                RequestParameters.Add(
                    "dimension", new Google.Apis.Discovery.Parameter
                    {
                        Name = "dimension",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+(==|=@).+",
                    });
                RequestParameters.Add(
                    "locale", new Google.Apis.Discovery.Parameter
                    {
                        Name = "locale",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "metric", new Google.Apis.Discovery.Parameter
                    {
                        Name = "metric",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "sort", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sort",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"(\+|-)?[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// The "urlchannels" collection of methods.
    public class UrlchannelsResource
    {
        private const string Resource = "urlchannels";

        /// The service which this resource belongs to.
        private readonly Google.Apis.Services.IClientService service;

        /// Constructs a new resource.
        public UrlchannelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }

        /// Delete a URL channel from the host AdSense account.
        /// <param name="adClientId">Ad client from which to delete the URL channel.</param>
        /// <param
        /// name="urlChannelId">URL channel to delete.</param>
        public virtual DeleteRequest Delete(string adClientId, string urlChannelId)
        {
            return new DeleteRequest(service, adClientId, urlChannelId);
        }

        /// Delete a URL channel from the host AdSense account.
        public class DeleteRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.UrlChannel>
        {
            /// Constructs a new Delete request.
            public DeleteRequest(Google.Apis.Services.IClientService service, string adClientId, string urlChannelId)
                : base(service)
            {
                AdClientId = adClientId;
                UrlChannelId = urlChannelId;
                InitParameters();
            }

            /// Ad client from which to delete the URL channel.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// URL channel to delete.
            [Google.Apis.Util.RequestParameterAttribute("urlChannelId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UrlChannelId { get; private set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/urlchannels/{urlChannelId}"; }
            }

            /// Initializes Delete parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "urlChannelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "urlChannelId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// Add a new URL channel to the host AdSense account.
        /// <param name="body">The body of the request.</param>
        /// <param name="adClientId">Ad client to which the new URL channel will be added.</param>
        public virtual InsertRequest Insert(Google.Apis.AdSenseHost.v4_1.Data.UrlChannel body, string adClientId)
        {
            return new InsertRequest(service, body, adClientId);
        }

        /// Add a new URL channel to the host AdSense account.
        public class InsertRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.UrlChannel>
        {
            /// Constructs a new Insert request.
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.AdSenseHost.v4_1.Data.UrlChannel body, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                Body = body;
                InitParameters();
            }

            /// Ad client to which the new URL channel will be added.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// Gets or sets the body of this request.
            Google.Apis.AdSenseHost.v4_1.Data.UrlChannel Body { get; set; }

            ///Returns the body of the request.
            protected override object GetBody() { return Body; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/urlchannels"; }
            }

            /// Initializes Insert parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// List all host URL channels in the host AdSense account.
        /// <param name="adClientId">Ad client for which to list URL channels.</param>
        public virtual ListRequest List(string adClientId)
        {
            return new ListRequest(service, adClientId);
        }

        /// List all host URL channels in the host AdSense account.
        public class ListRequest : AdSenseHostBaseServiceRequest<Google.Apis.AdSenseHost.v4_1.Data.UrlChannels>
        {
            /// Constructs a new List request.
            public ListRequest(Google.Apis.Services.IClientService service, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                InitParameters();
            }

            /// Ad client for which to list URL channels.
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// The maximum number of URL channels to include in the response, used for paging.
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// A continuation token, used to page through URL channels. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            ///Gets the method name.
            public override string MethodName
            {
                get { return "list"; }
            }

            ///Gets the HTTP method.
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///Gets the REST path.
            public override string RestPath
            {
                get { return "adclients/{adClientId}/urlchannels"; }
            }

            /// Initializes List parameter list.
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.AdSenseHost.v4_1.Data
{

    public class Account : Google.Apis.Requests.IDirectResponseSchema
    {
        /// Unique identifier of this account.
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; }

        /// Kind of resource this is, in this case adsensehost#account.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Name of this account.
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; }

        /// Approval status of this account. One of: PENDING, APPROVED, DISABLED.
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }
    }

    public class Accounts : Google.Apis.Requests.IDirectResponseSchema
    {
        /// ETag of this response for caching purposes.
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; }

        /// The accounts returned in this list response.
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Account> Items { get; set; }

        /// Kind of list this is, in this case adsensehost#accounts.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

    }

    public class AdClient : Google.Apis.Requests.IDirectResponseSchema
    {
        /// Whether this ad client is opted in to ARC.
        [Newtonsoft.Json.JsonPropertyAttribute("arcOptIn")]
        public virtual System.Nullable<bool> ArcOptIn { get; set; }

        /// Unique identifier of this ad client.
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; }

        /// Kind of resource this is, in this case adsensehost#adClient.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension.
        [Newtonsoft.Json.JsonPropertyAttribute("productCode")]
        public virtual string ProductCode { get; set; }

        /// Whether this ad client supports being reported on.
        [Newtonsoft.Json.JsonPropertyAttribute("supportsReporting")]
        public virtual System.Nullable<bool> SupportsReporting { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }
    }

    public class AdClients : Google.Apis.Requests.IDirectResponseSchema
    {
        /// ETag of this response for caching purposes.
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; }

        /// The ad clients returned in this list response.
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<AdClient> Items { get; set; }

        /// Kind of list this is, in this case adsensehost#adClients.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Continuation token used to page through ad clients. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; }

    }

    public class AdCode : Google.Apis.Requests.IDirectResponseSchema
    {
        /// The ad code snippet.
        [Newtonsoft.Json.JsonPropertyAttribute("adCode")]
        public virtual string AdCodeValue { get; set; }

        /// Kind this is, in this case adsensehost#adCode.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }
    }

    public class AdStyle : Google.Apis.Requests.IDirectResponseSchema
    {
        /// The colors included in the style. These are represented as six hexadecimal characters, similar to
        /// HTML color codes, but without the leading hash.
        [Newtonsoft.Json.JsonPropertyAttribute("colors")]
        public virtual AdStyle.ColorsData Colors { get; set; }

        /// The style of the corners in the ad. Possible values are SQUARE, SLIGHTLY_ROUNDED and
        /// VERY_ROUNDED.
        [Newtonsoft.Json.JsonPropertyAttribute("corners")]
        public virtual string Corners { get; set; }

        /// The font which is included in the style.
        [Newtonsoft.Json.JsonPropertyAttribute("font")]
        public virtual AdStyle.FontData Font { get; set; }

        /// Kind this is, in this case adsensehost#adStyle.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }

        /// The colors included in the style. These are represented as six hexadecimal characters, similar to
        /// HTML color codes, but without the leading hash.
        public class ColorsData
        {
            /// The color of the ad background.
            [Newtonsoft.Json.JsonPropertyAttribute("background")]
            public virtual string Background { get; set; }

            /// The color of the ad border.
            [Newtonsoft.Json.JsonPropertyAttribute("border")]
            public virtual string Border { get; set; }

            /// The color of the ad text.
            [Newtonsoft.Json.JsonPropertyAttribute("text")]
            public virtual string Text { get; set; }

            /// The color of the ad title.
            [Newtonsoft.Json.JsonPropertyAttribute("title")]
            public virtual string Title { get; set; }

            /// The color of the ad url.
            [Newtonsoft.Json.JsonPropertyAttribute("url")]
            public virtual string Url { get; set; }

        }

        /// The font which is included in the style.
        public class FontData
        {
            /// The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY, ADSENSE_DEFAULT_FAMILY,
            /// ARIAL, TIMES and VERDANA.
            [Newtonsoft.Json.JsonPropertyAttribute("family")]
            public virtual string Family { get; set; }

            /// The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE, ADSENSE_DEFAULT_SIZE, SMALL,
            /// MEDIUM and LARGE.
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual string Size { get; set; }

        }
    }

    public class AdUnit : Google.Apis.Requests.IDirectResponseSchema
    {
        /// Identity code of this ad unit, not necessarily unique across ad clients.
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; }

        /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC -
        /// deprecated).
        [Newtonsoft.Json.JsonPropertyAttribute("contentAdsSettings")]
        public virtual AdUnit.ContentAdsSettingsData ContentAdsSettings { get; set; }

        /// Custom style information specific to this ad unit.
        [Newtonsoft.Json.JsonPropertyAttribute("customStyle")]
        public virtual AdStyle CustomStyle { get; set; }

        /// Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe
        /// to rely on it being in any particular format.
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; }

        /// Kind of resource this is, in this case adsensehost#adUnit.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Settings specific to WAP mobile content ads (AFMC - deprecated).
        [Newtonsoft.Json.JsonPropertyAttribute("mobileContentAdsSettings")]
        public virtual AdUnit.MobileContentAdsSettingsData MobileContentAdsSettings { get; set; }

        /// Name of this ad unit.
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; }

        /// Status of this ad unit. Possible values are: NEW: Indicates that the ad unit was created within the
        /// last seven days and does not yet have any activity associated with it.
        ///
        /// ACTIVE: Indicates that there has been activity on this ad unit in the last seven days.
        ///
        /// INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days.
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }

        /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC -
        /// deprecated).
        public class ContentAdsSettingsData
        {
            /// The backup option to be used in instances where no ad is available.
            [Newtonsoft.Json.JsonPropertyAttribute("backupOption")]
            public virtual ContentAdsSettingsData.BackupOptionData BackupOption { get; set; }

            /// Size of this ad unit. Size values are in the form SIZE_{width}_{height}.
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual string Size { get; set; }

            /// Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK.
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; }

            /// The backup option to be used in instances where no ad is available.
            public class BackupOptionData
            {
                /// Color to use when type is set to COLOR. These are represented as six hexadecimal
                /// characters, similar to HTML color codes, but without the leading hash.
                [Newtonsoft.Json.JsonPropertyAttribute("color")]
                public virtual string Color { get; set; }

                /// Type of the backup option. Possible values are BLANK, COLOR and URL.
                [Newtonsoft.Json.JsonPropertyAttribute("type")]
                public virtual string Type { get; set; }

                /// URL to use when type is set to URL.
                [Newtonsoft.Json.JsonPropertyAttribute("url")]
                public virtual string Url { get; set; }

            }
        }

        /// Settings specific to WAP mobile content ads (AFMC - deprecated).
        public class MobileContentAdsSettingsData
        {
            /// The markup language to use for this ad unit.
            [Newtonsoft.Json.JsonPropertyAttribute("markupLanguage")]
            public virtual string MarkupLanguage { get; set; }

            /// The scripting language to use for this ad unit.
            [Newtonsoft.Json.JsonPropertyAttribute("scriptingLanguage")]
            public virtual string ScriptingLanguage { get; set; }

            /// Size of this ad unit.
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual string Size { get; set; }

            /// Type of this ad unit.
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; }

        }
    }

    public class AdUnits : Google.Apis.Requests.IDirectResponseSchema
    {
        /// ETag of this response for caching purposes.
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; }

        /// The ad units returned in this list response.
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<AdUnit> Items { get; set; }

        /// Kind of list this is, in this case adsensehost#adUnits.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Continuation token used to page through ad units. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; }

    }

    public class AssociationSession : Google.Apis.Requests.IDirectResponseSchema
    {
        /// Hosted account id of the associated publisher after association. Present if status is
        /// ACCEPTED.
        [Newtonsoft.Json.JsonPropertyAttribute("accountId")]
        public virtual string AccountId { get; set; }

        /// Unique identifier of this association session.
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; }

        /// Kind of resource this is, in this case adsensehost#associationSession.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// The products to associate with the user. Options: AFC, AFG, AFV, AFS (deprecated), AFMC
        /// (deprecated)
        [Newtonsoft.Json.JsonPropertyAttribute("productCodes")]
        public virtual System.Collections.Generic.IList<string> ProductCodes { get; set; }

        /// Redirect URL of this association session. Used to redirect users into the AdSense association
        /// flow.
        [Newtonsoft.Json.JsonPropertyAttribute("redirectUrl")]
        public virtual string RedirectUrl { get; set; }

        /// Status of the completed association, available once the association callback token has been
        /// verified. One of ACCEPTED, REJECTED, or ERROR.
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; }

        /// The preferred locale of the user themselves when going through the AdSense association
        /// flow.
        [Newtonsoft.Json.JsonPropertyAttribute("userLocale")]
        public virtual string UserLocale { get; set; }

        /// The locale of the user's hosted website.
        [Newtonsoft.Json.JsonPropertyAttribute("websiteLocale")]
        public virtual string WebsiteLocale { get; set; }

        /// The URL of the user's hosted website.
        [Newtonsoft.Json.JsonPropertyAttribute("websiteUrl")]
        public virtual string WebsiteUrl { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }
    }

    public class CustomChannel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// Code of this custom channel, not necessarily unique across ad clients.
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; }

        /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not
        /// safe to rely on it being in any particular format.
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; }

        /// Kind of resource this is, in this case adsensehost#customChannel.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Name of this custom channel.
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }
    }

    public class CustomChannels : Google.Apis.Requests.IDirectResponseSchema
    {
        /// ETag of this response for caching purposes.
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; }

        /// The custom channels returned in this list response.
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<CustomChannel> Items { get; set; }

        /// Kind of list this is, in this case adsensehost#customChannels.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Continuation token used to page through custom channels. To retrieve the next page of results, set
        /// the next request's "pageToken" value to this.
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; }

    }

    public class Report : Google.Apis.Requests.IDirectResponseSchema
    {
        /// The averages of the report. This is the same length as any other row in the report; cells
        /// corresponding to dimension columns are empty.
        [Newtonsoft.Json.JsonPropertyAttribute("averages")]
        public virtual System.Collections.Generic.IList<string> Averages { get; set; }

        /// The header information of the columns requested in the report. This is a list of headers; one for
        /// each dimension in the request, followed by one for each metric in the request.
        [Newtonsoft.Json.JsonPropertyAttribute("headers")]
        public virtual System.Collections.Generic.IList<Report.HeadersData> Headers { get; set; }

        /// Kind this is, in this case adsensehost#report.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// The output rows of the report. Each row is a list of cells; one for each dimension in the request,
        /// followed by one for each metric in the request. The dimension cells contain strings, and the metric cells
        /// contain numbers.
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IList<string>> Rows { get; set; }

        /// The total number of rows matched by the report request. Fewer rows may be returned in the response
        /// due to being limited by the row count requested or the report row limit.
        [Newtonsoft.Json.JsonPropertyAttribute("totalMatchedRows")]
        public virtual System.Nullable<long> TotalMatchedRows { get; set; }

        /// The totals of the report. This is the same length as any other row in the report; cells
        /// corresponding to dimension columns are empty.
        [Newtonsoft.Json.JsonPropertyAttribute("totals")]
        public virtual System.Collections.Generic.IList<string> Totals { get; set; }

        /// Any warnings associated with generation of the report.
        [Newtonsoft.Json.JsonPropertyAttribute("warnings")]
        public virtual System.Collections.Generic.IList<string> Warnings { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }

        public class HeadersData
        {
            /// The currency of this column. Only present if the header type is METRIC_CURRENCY.
            [Newtonsoft.Json.JsonPropertyAttribute("currency")]
            public virtual string Currency { get; set; }

            /// The name of the header.
            [Newtonsoft.Json.JsonPropertyAttribute("name")]
            public virtual string Name { get; set; }

            /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
            /// METRIC_CURRENCY.
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; }

        }
    }

    public class UrlChannel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not
        /// safe to rely on it being in any particular format.
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; }

        /// Kind of resource this is, in this case adsensehost#urlChannel.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example:
        /// www.example.com/home
        [Newtonsoft.Json.JsonPropertyAttribute("urlPattern")]
        public virtual string UrlPattern { get; set; }

        /// The ETag of the item.
        public virtual string ETag { get; set; }
    }

    public class UrlChannels : Google.Apis.Requests.IDirectResponseSchema
    {
        /// ETag of this response for caching purposes.
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; }

        /// The URL channels returned in this list response.
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<UrlChannel> Items { get; set; }

        /// Kind of list this is, in this case adsensehost#urlChannels.
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; }

        /// Continuation token used to page through URL channels. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; }

    }
}