text:
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module AdsensehostV4_1
      # AdSense Host API
      #
      # Generates performance reports, generates ad codes, and provides publisher
      #  management capabilities for AdSense Hosts.
      #
      # @example
      #    require 'google/apis/adsensehost_v4_1'
      #
      #    Adsensehost = Google::Apis::AdsensehostV4_1 # Alias the module
      #    service = Adsensehost::AdSenseHostService.new
      #
      # @see https://developers.google.com/adsense/host/
      class AdSenseHostService < Google::Apis::Core::BaseService
        # @return [String]
        #  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.
        attr_accessor :key

        # @return [String]
        #  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.
        attr_accessor :quota_user

        # @return [String]
        #  IP address of the site where the request originates. Use this if you want to
        #  enforce per-user limits.
        attr_accessor :user_ip

        def initialize
          super('https://www.googleapis.com/', 'adsensehost/v4.1/')
          @batch_path = 'batch'
        end

        # Get information about the selected associated AdSense account.
        # @param [String] account_id
        #   Account to get information about.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::Account] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::Account]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_account(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::Account::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::Account
          command.params['accountId'] = account_id unless account_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # List hosted accounts associated with this AdSense account by ad client id.
        # @param [Array<String>, String] filter_ad_client_id
        #   Ad clients to list accounts for.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::Accounts] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::Accounts]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def list_accounts(filter_ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::Accounts::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::Accounts
          command.query['filterAdClientId'] = filter_ad_client_id unless filter_ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Get information about one of the ad clients in the specified publisher's
        # AdSense account.
        # @param [String] account_id
        #   Account which contains the ad client.
        # @param [String] ad_client_id
        #   Ad client to get.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClient] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdClient]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_account_ad_client(account_id, ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdClient
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # List all hosted ad clients in the specified hosted account.
        # @param [String] account_id
        #   Account for which to list ad clients.
        # @param [Fixnum] max_results
        #   The maximum number of ad clients to include in the response, used for paging.
        # @param [String] page_token
        #   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.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClients] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdClients]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}/adclients', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdClients
          command.params['accountId'] = account_id unless account_id.nil?
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['pageToken'] = page_token unless page_token.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Delete the specified ad unit from the specified publisher AdSense account.
        # @param [String] account_id
        #   Account which contains the ad unit.
        # @param [String] ad_client_id
        #   Ad client for which to get ad unit.
        # @param [String] ad_unit_id
        #   Ad unit to delete.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdUnit]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def delete_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:delete, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Get the specified host ad unit in this AdSense account.
        # @param [String] account_id
        #   Account which contains the ad unit.
        # @param [String] ad_client_id
        #   Ad client for which to get ad unit.
        # @param [String] ad_unit_id
        #   Ad unit to get.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdUnit]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Get ad code for the specified ad unit, attaching the specified host custom
        # channels.
        # @param [String] account_id
        #   Account which contains the ad client.
        # @param [String] ad_client_id
        #   Ad client with contains the ad unit.
        # @param [String] ad_unit_id
        #   Ad unit to get the code for.
        # @param [Array<String>, String] host_custom_channel_id
        #   Host custom channel to attach to the ad code.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdCode] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdCode]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_account_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, host_custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdCode::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdCode
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
          command.query['hostCustomChannelId'] = host_custom_channel_id unless host_custom_channel_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Insert the supplied ad unit into the specified publisher AdSense account.
        # @param [String] account_id
        #   Account which will contain the ad unit.
        # @param [String] ad_client_id
        #   Ad client into which to insert the ad unit.
        # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdUnit]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def insert_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:post, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.request_object = ad_unit_object
          command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # List all ad units in the specified publisher's AdSense account.
        # @param [String] account_id
        #   Account which contains the ad client.
        # @param [String] ad_client_id
        #   Ad client for which to list ad units.
        # @param [Boolean] include_inactive
        #   Whether to include inactive ad units. Default: true.
        # @param [Fixnum] max_results
        #   The maximum number of ad units to include in the response, used for paging.
        # @param [String] page_token
        #   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.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnits] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdUnits]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdUnits::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdUnits
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['includeInactive'] = include_inactive unless include_inactive.nil?
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['pageToken'] = page_token unless page_token.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Update the supplied ad unit in the specified publisher AdSense account. This
        # method supports patch semantics.
        # @param [String] account_id
        #   Account which contains the ad client.
        # @param [String] ad_client_id
        #   Ad client which contains the ad unit.
        # @param [String] ad_unit_id
        #   Ad unit to get.
        # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdUnit]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def patch_account_ad_unit(account_id, ad_client_id, ad_unit_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:patch, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.request_object = ad_unit_object
          command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Update the supplied ad unit in the specified publisher AdSense account.
        # @param [String] account_id
        #   Account which contains the ad client.
        # @param [String] ad_client_id
        #   Ad client which contains the ad unit.
        # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdUnit]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def update_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:put, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.request_object = ad_unit_object
          command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
          command.params['accountId'] = account_id unless account_id.nil?
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # 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 [String] account_id
        #   Hosted account upon which to report.
        # @param [String] start_date
        #   Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
        # @param [String] end_date
        #   End of the date range to report on in "YYYY-MM-DD" format, inclusive.
        # @param [Array<String>, String] dimension
        #   Dimensions to base the report on.
        # @param [Array<String>, String] filter
        #   Filters to be run on the report.
        # @param [String] locale
        #   Optional locale to use for translating report output to a local language.
        #   Defaults to "en_US" if not specified.
        # @param [Fixnum] max_results
        #   The maximum number of rows of report data to return.
        # @param [Array<String>, String] metric
        #   Numeric columns to include in the report.
        # @param [Array<String>, String] sort
        #   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.
        # @param [Fixnum] start_index
        #   Index of the first row of report data to return.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::Report] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::Report]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def generate_account_report(account_id, start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'accounts/{accountId}/reports', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::Report
          command.params['accountId'] = account_id unless account_id.nil?
          command.query['dimension'] = dimension unless dimension.nil?
          command.query['endDate'] = end_date unless end_date.nil?
          command.query['filter'] = filter unless filter.nil?
          command.query['locale'] = locale unless locale.nil?
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['metric'] = metric unless metric.nil?
          command.query['sort'] = sort unless sort.nil?
          command.query['startDate'] = start_date unless start_date.nil?
          command.query['startIndex'] = start_index unless start_index.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Get information about one of the ad clients in the Host AdSense account.
        # @param [String] ad_client_id
        #   Ad client to get.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClient] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdClient]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_ad_client(ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'adclients/{adClientId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdClient
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # List all host ad clients in this AdSense account.
        # @param [Fixnum] max_results
        #   The maximum number of ad clients to include in the response, used for paging.
        # @param [String] page_token
        #   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.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClients] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AdClients]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'adclients', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AdClients
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['pageToken'] = page_token unless page_token.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Create an association session for initiating an association with an AdSense
        # user.
        # @param [Array<String>, String] product_code
        #   Products to associate with the user.
        # @param [String] website_url
        #   The URL of the user's hosted website.
        # @param [String] user_locale
        #   The preferred locale of the user.
        # @param [String] website_locale
        #   The locale of the user's hosted website.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AssociationSession] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AssociationSession]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def start_association_session(product_code, website_url, user_locale: nil, website_locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'associationsessions/start', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession
          command.query['productCode'] = product_code unless product_code.nil?
          command.query['userLocale'] = user_locale unless user_locale.nil?
          command.query['websiteLocale'] = website_locale unless website_locale.nil?
          command.query['websiteUrl'] = website_url unless website_url.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Verify an association session after the association callback returns from
        # AdSense signup.
        # @param [String] token
        #   The token returned to the association callback URL.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::AssociationSession] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::AssociationSession]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def verify_association_session(token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'associationsessions/verify', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession
          command.query['token'] = token unless token.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Delete a specific custom channel from the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client from which to delete the custom channel.
        # @param [String] custom_channel_id
        #   Custom channel to delete.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def delete_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:delete, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Get a specific custom channel from the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client from which to get the custom channel.
        # @param [String] custom_channel_id
        #   Custom channel to get.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Add a new custom channel to the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client to which the new custom channel will be added.
        # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def insert_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:post, 'adclients/{adClientId}/customchannels', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.request_object = custom_channel_object
          command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # List all host custom channels in this AdSense account.
        # @param [String] ad_client_id
        #   Ad client for which to list custom channels.
        # @param [Fixnum] max_results
        #   The maximum number of custom channels to include in the response, used for
        #   paging.
        # @param [String] page_token
        #   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.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannels] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::CustomChannels]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'adclients/{adClientId}/customchannels', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannels::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::CustomChannels
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['pageToken'] = page_token unless page_token.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Update a custom channel in the host AdSense account. This method supports
        # patch semantics.
        # @param [String] ad_client_id
        #   Ad client in which the custom channel will be updated.
        # @param [String] custom_channel_id
        #   Custom channel to get.
        # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def patch_custom_channel(ad_client_id, custom_channel_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:patch, 'adclients/{adClientId}/customchannels', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.request_object = custom_channel_object
          command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Update a custom channel in the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client in which the custom channel will be updated.
        # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def update_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:put, 'adclients/{adClientId}/customchannels', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.request_object = custom_channel_object
          command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # 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 [String] start_date
        #   Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
        # @param [String] end_date
        #   End of the date range to report on in "YYYY-MM-DD" format, inclusive.
        # @param [Array<String>, String] dimension
        #   Dimensions to base the report on.
        # @param [Array<String>, String] filter
        #   Filters to be run on the report.
        # @param [String] locale
        #   Optional locale to use for translating report output to a local language.
        #   Defaults to "en_US" if not specified.
        # @param [Fixnum] max_results
        #   The maximum number of rows of report data to return.
        # @param [Array<String>, String] metric
        #   Numeric columns to include in the report.
        # @param [Array<String>, String] sort
        #   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.
        # @param [Fixnum] start_index
        #   Index of the first row of report data to return.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::Report] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::Report]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def generate_report(start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'reports', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::Report
          command.query['dimension'] = dimension unless dimension.nil?
          command.query['endDate'] = end_date unless end_date.nil?
          command.query['filter'] = filter unless filter.nil?
          command.query['locale'] = locale unless locale.nil?
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['metric'] = metric unless metric.nil?
          command.query['sort'] = sort unless sort.nil?
          command.query['startDate'] = start_date unless start_date.nil?
          command.query['startIndex'] = start_index unless start_index.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Delete a URL channel from the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client from which to delete the URL channel.
        # @param [String] url_channel_id
        #   URL channel to delete.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::UrlChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def delete_url_channel(ad_client_id, url_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:delete, 'adclients/{adClientId}/urlchannels/{urlChannelId}', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.params['urlChannelId'] = url_channel_id unless url_channel_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # Add a new URL channel to the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client to which the new URL channel will be added.
        # @param [Google::Apis::AdsensehostV4_1::UrlChannel] url_channel_object
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannel] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::UrlChannel]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def insert_url_channel(ad_client_id, url_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:post, 'adclients/{adClientId}/urlchannels', options)
          command.request_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
          command.request_object = url_channel_object
          command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        # List all host URL channels in the host AdSense account.
        # @param [String] ad_client_id
        #   Ad client for which to list URL channels.
        # @param [Fixnum] max_results
        #   The maximum number of URL channels to include in the response, used for paging.
        # @param [String] page_token
        #   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.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [String] quota_user
        #   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.
        # @param [String] user_ip
        #   IP address of the site where the request originates. Use this if you want to
        #   enforce per-user limits.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannels] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AdsensehostV4_1::UrlChannels]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
          command =  make_simple_command(:get, 'adclients/{adClientId}/urlchannels', options)
          command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannels::Representation
          command.response_class = Google::Apis::AdsensehostV4_1::UrlChannels
          command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
          command.query['maxResults'] = max_results unless max_results.nil?
          command.query['pageToken'] = page_token unless page_token.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
          execute_or_queue_command(command, &block)
        end

        protected

        def apply_command_defaults(command)
          command.query['key'] = key unless key.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['userIp'] = user_ip unless user_ip.nil?
        end
      end
    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public abstract class DataIntegrationObject
    {
        protected int _id;
        protected string _name;

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
from django.conf.urls import *
# from django.core.urlresolvers import reverse_lazy
# from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from santa.views import *

urlpatterns = patterns(
    '',
    url(r'^$', rooms, name='home'),
    url(r'rooms$', rooms, name='rooms'),
    url(r'members$', members, name='members'),
    url(r'signin$', signin, name='signin'),
    # url(r'^recipe/(?P<pk>[0-9]+)/', view_recipe, name='view_recipe'),
    # url(r'^recipe/add/', add_recipe, name='add_recipe'),
    # url(r'^recipe/delete/(?P<pk>[0-9]+)/', delete_recipe, name='delete_recipe'),
    # url(r'^recipe/edit/(?P<pk>[0-9]+)/', edit_recipe, name='edit_recipe'),
    # url(r'^recipes/', recipes, name='recipes'),
    # url(r'^404/', custom_not_found_page, name='404'),
    # url(r'^login/', login_action, name="login"),
    # url(r'^logout/$', 'django.contrib.auth.views.logout',
    #     {"next_page": reverse_lazy('cook:index')}, name="logout"),
)

# urlpatterns += staticfiles_urlpatterns()


text:
def wrap
  require 'fileutils'
  FileUtils.cp_r "#{WRAP}/.", SITE
end

def add_filters filters, config = "#{SITE}/config.yaml"
  text = File.read(config)
  text[/text_extensions: ?\[()/, 1] = filters.map{|x| " '#{x}'," }.join
  File.write config, text
end

RSpec.configure do |config|
  config.before(:all) do
    wrap
    add_filters ['slim']
  end
end


text:
BUILD_PATH                       = build
ROOTFS_PATH                      = $(BUILD_PATH)/rootfs
PACKET_CACHE_PATH                = $(BUILD_PATH)/apt_cache
MULTISTRAP_CONF_FILE             = $(CONF_PATH)/minimal.conf
POST_ROOTFS_PATH                 = $(CONF_PATH)/post_rootfs
POST_CONFIGURE_PATH              = $(CONF_PATH)/post_configure
QEMU_BOOL_FILES_PATH             = boot_files
TMP_ROOTFS_MOUNT_POINT           = /mnt/tmp_arm_rootfs
BZ2_ARCHIVE_FILE                 = $(BUILD_PATH)/rootfs.tar.bz2
GZIP_ARCHIVE_FILE                = $(BUILD_PATH)/rootfs.tar.gz

CONF_PATH                        = conf
TARGET_ARCH                      = armhf
TARGET_BLOCK_DEVICE_NAME         = sdc
ROOTFS_PARTITION_NUMBER          = 2
ROOTFS_PARTITION_FILESYSTEM_TYPE = ext3

######################################################################
# Derived variables                                                  #
######################################################################

ROOTFS_SUCC_FILE                 = rootfs_success_file
POST_ROOTFS_SUCC_FILE            = post_rootfs_success_file
TARGET_BLOCK_DEVICE_FILE         = /dev/$(TARGET_BLOCK_DEVICE_NAME)
ROOTFS_BLOCK_DEVICE_FILE         = $(TARGET_BLOCK_DEVICE_FILE)$(ROOTFS_PARTITION_NUMBER)

QEMU_KERNEL_FILE                 = $(QEMU_BOOL_FILES_PATH)/kernel
QEMU_INITRD_FILE                 = $(QEMU_BOOL_FILES_PATH)/initrd

default: build

$(ROOTFS_SUCC_FILE):
	rm -rf $(SUCCESS_FILE)
	@if [ ! -d $(BUILD_PATH) ]; then \
		mkdir -p $(BUILD_PATH); \
	fi
	@if [ ! -d $(PACKET_CACHE_PATH) ]; then \
		mkdir -p $(PACKET_CACHE_PATH); \
	fi
	@multistrap --arch       $(TARGET_ARCH)          \
		    --dir        $(ROOTFS_PATH)          \
		    --file       $(MULTISTRAP_CONF_FILE) \
		    --source-dir $(PACKET_CACHE_PATH)
	@touch $(ROOTFS_SUCC_FILE)

rootfs: $(ROOTFS_SUCC_FILE)

$(BZ2_ARCHIVE_FILE): rootfs
	tar -cvjf $(BZ2_ARCHIVE_FILE) -C $(ROOTFS_PATH) .

rootfs_bz2: $(BZ2_ARCHIVE_FILE)

$(GZIP_ARCHIVE_FILE): rootfs
	tar -cvzf $(GZIP_ARCHIVE_FILE) -C $(ROOTFS_PATH) .

rootfs_gzip: $(GZIP_ARCHIVE_FILE)

rootfs_archive: rootfs_gzip rootfs_bz2

$(POST_ROOTFS_SUCC_FILE): rootfs
	@for POST_FILE in $$(find $(POST_ROOTFS_PATH)); do \
		if [ -d $${POST_FILE} ]; then continue; fi; \
		echo "$${POST_FILE}:"; \
		$${POST_FILE} $(ROOTFS_PATH); \
	done
	@touch $(POST_ROOTFS_SUCC_FILE)

post_rootfs: | rootfs $(POST_ROOTFS_SUCC_FILE)
	@cp /usr/bin/qemu-arm-static $(ROOTFS_PATH)/usr/bin
	@(cd $(ROOTFS_PATH) && mount        -t proc     /proc ./proc)
	@(cd $(ROOTFS_PATH) && mount        -t sysfs    /sys  ./sys)
	@(cd $(ROOTFS_PATH) && mount   udev -t devtmpfs       ./dev)
	@(cd $(ROOTFS_PATH) && chroot . /bin/bash -c "export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C && /var/lib/dpkg/info/dash.preinst install && dpkg --configure -a && dpkg --configure -a")
	@(cd $(ROOTFS_PATH) && umount                         ./proc)
	@(cd $(ROOTFS_PATH) && umount                         ./sys)
	@(cd $(ROOTFS_PATH) && umount                         ./dev)
	@for POST_FILE in $$(find $(POST_CONFIGURE_PATH)); do \
		if [ -d $${POST_FILE} ]; then continue; fi; \
		echo "$${POST_FILE}:"; \
		$${POST_FILE} $(ROOTFS_PATH); \
	done

#(cd $(ROOTFS_PATH) && chroot . /bin/bash -c "LC_ALL=C LANGUAGE=C LANG=C dpkg --configure -a")
#(cd $(ROOTFS_PATH) && chroot . /bin/bash -c "DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C dpkg --configure dash")

#(cd $(ROOTFS_PATH) && chroot . /bin/bash -c "DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C dpkg --configure -a")

build: | rootfs post_rootfs

#rootfs_archive

clean:
	@(cd $(ROOTFS_PATH) 2> /dev/null && umount ./proc 2> /dev/null) || echo "proc already unmounted."
	@(cd $(ROOTFS_PATH) 2> /dev/null && umount ./sys  2> /dev/null) || echo "sys already unmounted."
	@(cd $(ROOTFS_PATH) 2> /dev/null && umount ./dev  2> /dev/null) || echo "dev already unmounted."
	rm -rf build/rootfs
	rm -f $(ROOTFS_SUCC_FILE)
	rm -f $(POST_ROOTFS_SUCC_FILE)

deploy:
	@if [ ! -d $(TMP_ROOTFS_MOUNT_POINT) ]; then \
		mkdir -p $(TMP_ROOTFS_MOUNT_POINT); \
	fi
	@test -b $(TARGET_BLOCK_DEVICE_FILE)                                         || (echo "$(TARGET_BLOCK_DEVICE_FILE) is no block device" && exit 1)
	@test $$(cat /sys/block/$(TARGET_BLOCK_DEVICE_NAME)/device/model) = "SD/MMC" || (echo "$(TARGET_BLOCK_DEVICE_NAME) is no SD card"      && exit 1)
	@test -b $(ROOTFS_BLOCK_DEVICE_FILE)                                         || (echo "$(ROOTFS_BLOCK_DEVICE_FILE) is no block device" && exit 1)
	@dd if=/dev/zero of=$(ROOTFS_BLOCK_DEVICE_FILE) bs=1024 count=1024
	@mkfs.$(ROOTFS_PARTITION_FILESYSTEM_TYPE) $(ROOTFS_BLOCK_DEVICE_FILE)
	@mount $(ROOTFS_BLOCK_DEVICE_FILE) $(TMP_ROOTFS_MOUNT_POINT)
	@cp -arv $(ROOTFS_PATH)/* $(TMP_ROOTFS_MOUNT_POINT)/
	@umount $(ROOTFS_BLOCK_DEVICE_FILE)
	@sync

qemu_boot:
	qemu-system-arm -m 256 -M versatilepb -kernel $(QEMU_KERNEL_FILE) -initrd $(QEMU_INITRD_FILE) -hda $(TARGET_BLOCK_DEVICE_FILE)

#-append "root=/dev/sda1"

# .PHONY
# clean:
# 	echo test


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package com.azure.search.documents.indexes.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Defines a data deletion detection policy that implements a soft-deletion strategy. It determines whether an item
 * should be deleted based on the value of a designated 'soft delete' column.
 */
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.EXISTING_PROPERTY,
        property = "@odata.type",
        visible = true)
@JsonTypeName("#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy")
@Fluent
public final class SoftDeleteColumnDeletionDetectionPolicy extends DataDeletionDetectionPolicy {

    /*
     * Identifies the concrete type of the data deletion detection policy.
     */
    @JsonTypeId
    @JsonProperty(value = "@odata.type", required = true)
    private String odataType = "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy";

    /*
     * The name of the column to use for soft-deletion detection.
     */
    @JsonProperty(value = "softDeleteColumnName")
    private String softDeleteColumnName;

    /*
     * The marker value that identifies an item as deleted.
     */
    @JsonProperty(value = "softDeleteMarkerValue")
    private String softDeleteMarkerValue;

    /**
     * Get the softDeleteColumnName property: The name of the column to use for soft-deletion detection.
     *
     * @return the softDeleteColumnName value.
     */
    public String getSoftDeleteColumnName() {
        return this.softDeleteColumnName;
    }

    /**
     * Set the softDeleteColumnName property: The name of the column to use for soft-deletion detection.
     *
     * @param softDeleteColumnName the softDeleteColumnName value to set.
     * @return the SoftDeleteColumnDeletionDetectionPolicy object itself.
     */
    public SoftDeleteColumnDeletionDetectionPolicy setSoftDeleteColumnName(String softDeleteColumnName) {
        this.softDeleteColumnName = softDeleteColumnName;
        return this;
    }

    /**
     * Get the softDeleteMarkerValue property: The marker value that identifies an item as deleted.
     *
     * @return the softDeleteMarkerValue value.
     */
    public String getSoftDeleteMarkerValue() {
        return this.softDeleteMarkerValue;
    }

    /**
     * Set the softDeleteMarkerValue property: The marker value that identifies an item as deleted.
     *
     * @param softDeleteMarkerValue the softDeleteMarkerValue value to set.
     * @return the SoftDeleteColumnDeletionDetectionPolicy object itself.
     */
    public SoftDeleteColumnDeletionDetectionPolicy setSoftDeleteMarkerValue(String softDeleteMarkerValue) {
        this.softDeleteMarkerValue = softDeleteMarkerValue;
        return this;
    }
}


text:
package com.theoryinpractice.testng.intention;

import com.intellij.codeInsight.generation.OverrideImplementsAnnotationsHandler;
import com.intellij.openapi.project.Project;
import com.theoryinpractice.testng.util.TestNGUtil;

public class OverrideImplementsTestNGAnnotationsHandler implements OverrideImplementsAnnotationsHandler{
  public String[] getAnnotations(Project project) {
    return TestNGUtil.CONFIG_ANNOTATIONS_FQN;
  }
}


text:
import IContainer from '../index.vue';
import {
    IContainerBasicExample,
    IContainerFluidExample
} from './index';
import { createStory } from '@inkline/inkline/__storybook__';

export default {
    component: IContainer,
    title: 'Layout/Container'
};

export const Basic = createStory(IContainerBasicExample);
export const Fluid = createStory(IContainerFluidExample);


text:
goog.declareModuleId('Blockly.test.helpers.warnings');

/**
 * Captures the strings sent to console.warn() when calling a function.
 * Copies from core.
 * @param {Function} innerFunc The function where warnings may called.
 * @return {Array<string>} The warning messages (only the first arguments).
 */
export function captureWarnings(innerFunc) {
  const msgs = [];
  const nativeConsoleWarn = console.warn;
  try {
    console.warn = function(msg) {
      msgs.push(msg);
    };
    innerFunc();
  } finally {
    console.warn = nativeConsoleWarn;
  }
  return msgs;
}

/**
 * Asserts that the given function logs the provided warning messages.
 * @param {function()} innerFunc The function to call.
 * @param {Array<!RegExp>|!RegExp} messages A list of regex for the expected
 *    messages (in the expected order).
 */
export function assertWarnings(innerFunc, messages) {
  if (!Array.isArray(messages)) {
    messages = [messages];
  }
  const warnings = captureWarnings(innerFunc);
  chai.assert.lengthOf(warnings, messages.length);
  messages.forEach((message, i) => {
    chai.assert.match(warnings[i], message);
  });
}

/**
 * Asserts that the given function logs no warning messages.
 * @param {function()} innerFunc The function to call.
 */
export function assertNoWarnings(innerFunc) {
  assertWarnings(innerFunc, []);
}

/**
 * Stubs Blockly.utils.deprecation.warn call.
 * @return {!SinonStub} The created stub.
 */
export function createDeprecationWarningStub() {
  return sinon.stub(Blockly.utils.deprecation, 'warn');
}

/**
 * Asserts whether the given deprecation warning stub or call was called with
 * the expected functionName.
 * @param {!SinonSpy|!SinonSpyCall} spyOrSpyCall The spy or spy call to use.
 * @param {string} functionName The function name to check that the given spy or
 *    spy call was called with.
 */
export function assertDeprecationWarningCall(spyOrSpyCall, functionName) {
  sinon.assert.calledWith(spyOrSpyCall, functionName);
}

/**
 * Asserts that there was a single deprecation warning call with the given
 * functionName passed.
 * @param {!SinonSpy} spy The spy to use.
 * @param {string} functionName The function name to check that the given spy
 *    was called with.
 */
export function assertSingleDeprecationWarningCall(spy, functionName) {
  sinon.assert.calledOnce(spy);
  assertDeprecationWarningCall(spy.getCall(0), functionName);
}


text:
<?php

namespace Omnipay\Payone\Message;

/**
 * Purchase, shop mode, classic payment page (user is sent to
 * the PAYONE site).
 */
class ShopFrontendPurchaseRequest extends ShopFrontendAuthorizeRequest
{
    /**
     * The "request" parameter.
     */
    protected $request_code = 'authorization';
}


text:
import reducers from './reducers';
import log from '../utils/log';
import isClient from '../utils/isClient';
import { reduxReactRouter } from 'redux-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import createMemoryHistory from 'history/lib/createMemoryHistory';
import promiseMiddleware from './promiseMiddleware';
// import websocketMiddleware from '../shared/middleware/websocketMiddleware';
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';

export default function configureStore(initialState) {

  log('... Initializing store');

  const onClient = isClient();
  const createHistory = onClient ? createBrowserHistory : createMemoryHistory;
  const middlewares = onClient ?
    applyMiddleware(promiseMiddleware/*, websocketMiddleware*/) :
    applyMiddleware(promiseMiddleware);

  const store = compose(middlewares, reduxReactRouter({ createHistory }))(createStore)(combineReducers(reducers), initialState);

  // Enables Webpack hot module replacement for reducers
  if (module.hot) module.hot.accept('./reducers.js', () => store.replaceReducer(require('./reducers.js')));

  return store;
}


text:
package org.medicmobile.dto;

import java.util.List;

import org.medicmobile.model.AnganwadiCenter;

/**
 * The Class PerformanceReport.
 */
public final class PerformanceReport {

      /** The report accordions. */
      private List<PerformanceReportAccordion> reportAccordions;

      /** The anganwadi center. */
      private AnganwadiCenter anganwadiCenter;

      private PerformanceReportAccordion anganwadiCenterReportAccodion;

      /**
       * Gets the report accordions.
       *
       * @return the report accordions
       */
      public List<PerformanceReportAccordion> getReportAccordions() {
            return reportAccordions;
      }

      /**
       * Sets the report accordions.
       *
       * @param reportAccordions
       *              the new report accordions
       */
      public void setReportAccordions(
                  final List<PerformanceReportAccordion> reportAccordions) {
            this.reportAccordions = reportAccordions;
      }

      /**
       * Gets the anganwadi center.
       *
       * @return the anganwadi center
       */
      public AnganwadiCenter getAnganwadiCenter() {
            return anganwadiCenter;
      }

      /**
       * Sets the anganwadi center.
       *
       * @param anganwadiCenter
       *              the new anganwadi center
       */
      public void setAnganwadiCenter(final AnganwadiCenter anganwadiCenter) {
            this.anganwadiCenter = anganwadiCenter;
      }

      /**
       * gets the performance data for anganwadi center
       *
       * @return the anganwadiCenterReportAccodion
       */
      public PerformanceReportAccordion getAnganwadiCenterReportAccodion() {
            return anganwadiCenterReportAccodion;
      }

      /**
       * sets the performance data for anganwadi cenetr
       *
       * @param anganwadiCenterReportAccodion
       *              the anganwadiCenterReportAccodion to set
       */
      public void setAnganwadiCenterReportAccodion(
                  PerformanceReportAccordion anganwadiCenterReportAccodion) {
            this.anganwadiCenterReportAccodion = anganwadiCenterReportAccodion;
      }

}


text:
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package org.libreoffice.ci.gerrit.buildbot.publisher;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.transport.RemoteSession;
import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.io.StreamCopyThread;
import org.libreoffice.ci.gerrit.buildbot.commands.TaskStatus;
import org.libreoffice.ci.gerrit.buildbot.config.BuildbotConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JenkinsLogPublisher implements LogPublisher {
    static final Logger log = LoggerFactory
            .getLogger(JenkinsLogPublisher.class);

    final static String JENKINS_SSH_COMMAND = "set-external-build-result";
    final static String JENKINS_TEST_CHANNEL = "who-am-i";

    @Override
    public String publishLog(BuildbotConfig config, String ticket,
            String boxId, TaskStatus status, InputStream in) {
        final String cmd = JENKINS_SSH_COMMAND + " --display " + ticket + "_" + boxId
                + " --dump-build-number "
                + " --job " + config.getExternalLogViewerJob() + " --result "
                + (status.isSuccess() ? "0" : "1") + " --log -";
        OutputStream errStream = newErrorBufferStream();
        OutputStream outStream = newErrorBufferStream();
        URIish jenkins = null;
        try {
            jenkins = new URIish().setHost(config.getExternalLogViewerHost());
            RemoteSession ssh = connect(jenkins);
            Process proc = ssh.exec(cmd, 0/*timeout*/);
            StreamCopyThread out = new StreamCopyThread(proc.getInputStream(),
                    outStream);
            StreamCopyThread err = new StreamCopyThread(proc.getErrorStream(),
                    errStream);
            StreamCopyThread inp = new StreamCopyThread(in,
                    proc.getOutputStream());
            out.start();
            err.start();
            inp.start();
            try {
                out.flush();
                err.flush();
                inp.flush();
                proc.waitFor();
                proc.exitValue();
                out.halt();
                err.halt();
                inp.halt();
            } catch (InterruptedException interrupted) {
                log.error("process interupted: ", interrupted);
            }
            ssh.disconnect();
        } catch (IOException e) {
            log.error(
                    String.format("Error pushing log to %s:\n"
                            + "  Exception: %s\n" + " Command: %s\n"
                            + "  Output: %s", jenkins, e, cmd, errStream), e);
            return null;
        }
        String result = String.format("%s/job/%s/%s", config.getExternalLogViewerUrl(),
                config.getExternalLogViewerJob(), outStream.toString().trim());
        log.debug("log url: {}", result);
        return result;
    }

    @Override
    public String testChannel(BuildbotConfig config) {
        final String cmd = JENKINS_TEST_CHANNEL;
        StringBuilder builder = new StringBuilder(cmd.length())
                .append(">ssh ").append(config.getExternalLogViewerHost())
                .append(" ").append(cmd).append("\n");
        OutputStream errStream = newErrorBufferStream();
        OutputStream outStream = newErrorBufferStream();
        URIish jenkins = null;
        try {
            jenkins = new URIish().setHost(config.getExternalLogViewerHost());
            RemoteSession ssh = connect(jenkins);
            Process proc = ssh.exec(cmd, 0/*timeout*/);
            StreamCopyThread out = new StreamCopyThread(proc.getInputStream(),
                    outStream);
            StreamCopyThread err = new StreamCopyThread(proc.getErrorStream(),
                    errStream);
            out.start();
            err.start();
            try {
                out.flush();
                err.flush();
                proc.waitFor();
                proc.exitValue();
                out.halt();
                err.halt();
            } catch (InterruptedException interrupted) {
                log.error("process interupted: ", interrupted);
            }
            ssh.disconnect();
            return builder.append("<").append(outStream.toString()).toString();
        } catch (IOException e) {
            log.error(
                    String.format("Error testing log channel\n"
                            + "  Exception: %s\n" + " Command: %s\n"
                            + "  Output: %s", jenkins, e, cmd, errStream), e);
            return null;
        }
    }

    private static RemoteSession connect(URIish uri) throws TransportException {
        return SshSessionFactory.getInstance().getSession(uri, null,
                FS.DETECTED, 0);
    }

    private static OutputStream newErrorBufferStream() {
        return new OutputStream() {
            private final StringBuilder out = new StringBuilder();
            private final StringBuilder line = new StringBuilder();

            @Override
            public synchronized String toString() {
                while (out.length() > 0 && out.charAt(out.length() - 1) == '\n') {
                    out.setLength(out.length() - 1);
                }
                return out.toString();
            }

            @Override
            public synchronized void write(final int b) {
                if (b == '\r') {
                    return;
                }

                line.append((char) b);

                if (b == '\n') {
                    out.append(line);
                    line.setLength(0);
                }
            }
        };
    }
}


text:
set -o nounset
set -o errexit

VIRTUAL_ENV_DISABLE_PROMPT=1
VENV_BIN=${VENV_BIN:-/var/lib/galaxy/venv/bin/}
source ${VENV_BIN}/activate

mkdir -p build/static
make build/dist
make collectstatic