text:
#include <aws/route53resolver/model/AssociateFirewallRuleGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Route53Resolver::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

AssociateFirewallRuleGroupRequest::AssociateFirewallRuleGroupRequest() :
    m_creatorRequestId(Aws::Utils::UUID::RandomUUID()),
    m_creatorRequestIdHasBeenSet(true),
    m_firewallRuleGroupIdHasBeenSet(false),
    m_vpcIdHasBeenSet(false),
    m_priority(0),
    m_priorityHasBeenSet(false),
    m_nameHasBeenSet(false),
    m_mutationProtection(MutationProtectionStatus::NOT_SET),
    m_mutationProtectionHasBeenSet(false),
    m_tagsHasBeenSet(false)
{
}

Aws::String AssociateFirewallRuleGroupRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_creatorRequestIdHasBeenSet)
  {
   payload.WithString("CreatorRequestId", m_creatorRequestId);

  }

  if(m_firewallRuleGroupIdHasBeenSet)
  {
   payload.WithString("FirewallRuleGroupId", m_firewallRuleGroupId);

  }

  if(m_vpcIdHasBeenSet)
  {
   payload.WithString("VpcId", m_vpcId);

  }

  if(m_priorityHasBeenSet)
  {
   payload.WithInteger("Priority", m_priority);

  }

  if(m_nameHasBeenSet)
  {
   payload.WithString("Name", m_name);

  }

  if(m_mutationProtectionHasBeenSet)
  {
   payload.WithString("MutationProtection", MutationProtectionStatusMapper::GetNameForMutationProtectionStatus(m_mutationProtection));
  }

  if(m_tagsHasBeenSet)
  {
   Aws::Utils::Array<JsonValue> tagsJsonList(m_tags.size());
   for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
   {
     tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
   }
   payload.WithArray("Tags", std::move(tagsJsonList));

  }

  return payload.View().WriteReadable();
}

Aws::Http::HeaderValueCollection AssociateFirewallRuleGroupRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Route53Resolver.AssociateFirewallRuleGroup"));
  return headers;

}

redpajama_set_name: RedPajamaGithub


text:
import { EventEmitter2 } from 'eventemitter2';

export default class Emitter extends EventEmitter2 {

}


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>Shape.LESS - Collection of LESS mixins for various shapes</title>

    <link rel="stylesheet" href="./docs/css/styles.css">
    <link rel="stylesheet" href="./docs/css/pygment_trac.css">
    <link rel="stylesheet" href="./docs/css/demo.css">
    <link rel="stylesheet" href="./dist/shapes.css">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

Shape.LESS

Collection of LESS mixins for various shapes

View the Project on GitHub fahad19/shape.less

Download ZIP File

Download TAR Ball

Fork On GitHub

  Shape.LESS is a collection of mixins for CSS shapes that we often use in web applications.
  The aim of this project is to reduce the repitive tasks of a developer required to create shapes using CSS.

Installation

You can download it with Bower:

$ bower install shape.less

Usage

Import the less/shape.less file in your own LESS files, and start using it right away:

@import "path-to-shape.less/less/shape.less";

.my-square {
  .shape-square(100px);
}

Examples

Rectangle

.rectangle {
  .shape-rectangle(100px, 50px);
}

Square

.square {
  .shape-square(50px);
}

Circle

.circle {
  .shape-circle(50px);
}

Oval

.circle {
  .shape-oval(50px);
}

Triangle

Up

.triangle-up {
  .shape-triangle-up(50px);
}

Down

.triangle-down {
  .shape-triangle-down(50px);
}

Left

.triangle-left {
  .shape-triangle-left(50px);
}

Right

.triangle-right {
  .shape-triangle-right(50px);
}

Top left

.triangle-top-left {
  .shape-triangle-top-left(50px);
}

Top right

.triangle-top-right {
  .shape-triangle-top-right(50px);
}

Bottom left

.triangle-bottom-left {
  .shape-triangle-bottom-left(50px);
}

Bottom right

.triangle-bottom-right {
  .shape-triangle-bottom-right(50px);
}

Thanks

  Special thanks to Chris Coyier for his Shapes of CSS article.

Maintained by Fahad Ibnay Heylaal

Hosted on GitHub Pages — Theme by orderedlist


text:
package com.manniwood.cl4pg.v1.commands;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.manniwood.cl4pg.v1.datasourceadapters.DataSourceAdapter;
import com.manniwood.cl4pg.v1.exceptions.Cl4pgException;
import com.manniwood.cl4pg.v1.typeconverters.TypeConverterStore;
import com.manniwood.cl4pg.v1.util.SqlCache;
import com.manniwood.cl4pg.v1.util.Str;

/**
 * Runs the PgSQL listen command.
 *
 * @author mwood
 *
 */
public class Listen implements Command {
    private final static Logger log = LoggerFactory.getLogger(Listen.class);

    private String sql;
    private PreparedStatement pstmt;
    private String channel;

    public Listen(String channel) {
        if (Str.isNullOrEmpty(channel)) {
            throw new IllegalArgumentException("Channel must be specified.");
        }
        this.channel = channel;
    }

    @Override
    public String getSQL() {
        return sql;
    }

    @Override
    public void execute(Connection connection,
                        TypeConverterStore converterStore,
                        SqlCache sqlCache,
                        DataSourceAdapter dataSourceAdapter) throws Exception {

        // Ask postgresql to correctly quote this identifier, to make it
        // safe to use in the next sql statement.
        PreparedStatement pstmt1 = connection.prepareStatement("select quote_ident(?)");
        pstmt1.setString(1, channel);
        log.debug("SQL to quote channel name:\n{}", dataSourceAdapter.unwrapPgPreparedStatement(pstmt1));
        ResultSet rs = pstmt1.executeQuery();
        if (rs.next()) {
            channel = rs.getString(1);
        } else {
            throw new Cl4pgException("Was not able to quote identifier \"" + channel + "\"");
        }

        sql = "listen " + channel;
        log.debug("Final SQL: {}", sql);

        pstmt = connection.prepareStatement(sql);
        pstmt.execute();
    }

    @Override
    public void close() throws Exception {
        if (pstmt != null) {
            pstmt.close();
        }
    }

}


text:
import json

from gore.models import Event
from gore.tests.data import exc_payload

def create_events(project, n):
    events = [Event.objects.create_from_raven(project_id=project.id, body=json.loads(exc_payload)) for i in range(n)]
    return events


text:
'use strict';

var apirequest = require('../../lib/apirequest');
var createAPIRequest = apirequest.createAPIRequest;

/**
 * Google Play Game Services API
 *
 * @classdesc The API for Google Play Game Services.
 * @namespace games
 * @version  v1
 * @variation v1
 * @this Games
 * @param {object=} options Options for Games
 */
function Games(options) {

  var self = this;
  this._options = options || {};

  this.achievementDefinitions = {

    /**
     * games.achievementDefinitions.list
     *
     * @desc Lists all the achievement definitions for your application.
     *
     * @alias games.achievementDefinitions.list
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/achievements',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.achievements = {

    /**
     * games.achievements.increment
     *
     * @desc Increments the steps of the achievement with the given ID for the currently authenticated player.
     *
     * @alias games.achievements.increment
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.achievementId - The ID of the achievement used by this method.
     * @param  {string=} params.requestId - A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries.
     * @param  {integer} params.stepsToIncrement - The number of steps to increment.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    increment: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/achievements/' + params.achievementId + '/increment',
          method: 'POST'
        },
        params: params,
        requiredParams: ['achievementId', 'stepsToIncrement'],
        pathParams: ['achievementId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.achievements.list
     *
     * @desc Lists the progress for all your application's achievements for the currently authenticated player.
     *
     * @alias games.achievements.list
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {string} params.playerId - A player ID. A value of me may be used in place of the authenticated player's ID.
     * @param  {string=} params.state - Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/' + params.playerId + '/achievements',
          method: 'GET'
        },
        params: params,
        requiredParams: ['playerId'],
        pathParams: ['playerId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.achievements.reveal
     *
     * @desc Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.
     *
     * @alias games.achievements.reveal
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.achievementId - The ID of the achievement used by this method.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    reveal: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/achievements/' + params.achievementId + '/reveal',
          method: 'POST'
        },
        params: params,
        requiredParams: ['achievementId'],
        pathParams: ['achievementId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.achievements.setStepsAtLeast
     *
     * @desc Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.
     *
     * @alias games.achievements.setStepsAtLeast
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.achievementId - The ID of the achievement used by this method.
     * @param  {integer} params.steps - The minimum value to set the steps to.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    setStepsAtLeast: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/achievements/' + params.achievementId + '/setStepsAtLeast',
          method: 'POST'
        },
        params: params,
        requiredParams: ['achievementId', 'steps'],
        pathParams: ['achievementId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.achievements.unlock
     *
     * @desc Unlocks this achievement for the currently authenticated player.
     *
     * @alias games.achievements.unlock
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.achievementId - The ID of the achievement used by this method.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    unlock: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/achievements/' + params.achievementId + '/unlock',
          method: 'POST'
        },
        params: params,
        requiredParams: ['achievementId'],
        pathParams: ['achievementId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.achievements.updateMultiple
     *
     * @desc Updates multiple achievements for the currently authenticated player.
     *
     * @alias games.achievements.updateMultiple
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    updateMultiple: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/achievements/updateMultiple',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.applications = {

    /**
     * games.applications.get
     *
     * @desc Retrieves the metadata of the application with the given ID. If the requested application is not available for the specified platformType, the returned response will not include any instance data.
     *
     * @alias games.applications.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.applicationId - The application being requested.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string=} params.platformType - Restrict application details returned to the specific platform.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/applications/' + params.applicationId,
          method: 'GET'
        },
        params: params,
        requiredParams: ['applicationId'],
        pathParams: ['applicationId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.applications.played
     *
     * @desc Indicate that the the currently authenticated user is playing your application.
     *
     * @alias games.applications.played
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    played: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/applications/played',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.events = {

    /**
     * games.events.listByPlayer
     *
     * @desc Returns a list showing the current progress on events in this application for the currently authenticated user.
     *
     * @alias games.events.listByPlayer
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of events to return in the response, used for paging. For any response, the actual number of events to return may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    listByPlayer: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/events',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.events.listDefinitions
     *
     * @desc Returns a list of the event definitions in this application.
     *
     * @alias games.events.listDefinitions
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of event definitions to return in the response, used for paging. For any response, the actual number of event definitions to return may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    listDefinitions: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/eventDefinitions',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.events.record
     *
     * @desc Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.
     *
     * @alias games.events.record
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    record: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/events',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.leaderboards = {

    /**
     * games.leaderboards.get
     *
     * @desc Retrieves the metadata of the leaderboard with the given ID.
     *
     * @alias games.leaderboards.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.leaderboardId - The ID of the leaderboard.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/leaderboards/' + params.leaderboardId,
          method: 'GET'
        },
        params: params,
        requiredParams: ['leaderboardId'],
        pathParams: ['leaderboardId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.leaderboards.list
     *
     * @desc Lists all the leaderboard metadata for your application.
     *
     * @alias games.leaderboards.list
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of leaderboards to return in the response. For any response, the actual number of leaderboards returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/leaderboards',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.metagame = {

    /**
     * games.metagame.getMetagameConfig
     *
     * @desc Return the metagame configuration data for the calling application.
     *
     * @alias games.metagame.getMetagameConfig
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    getMetagameConfig: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/metagameConfig',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.metagame.listCategoriesByPlayer
     *
     * @desc List play data aggregated per category for the player corresponding to playerId.
     *
     * @alias games.metagame.listCategoriesByPlayer
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.collection - The collection of categories for which data will be returned.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of category resources to return in the response, used for paging. For any response, the actual number of category resources returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {string} params.playerId - A player ID. A value of me may be used in place of the authenticated player's ID.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    listCategoriesByPlayer: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/' + params.playerId + '/categories/' + params.collection,
          method: 'GET'
        },
        params: params,
        requiredParams: ['playerId', 'collection'],
        pathParams: ['collection', 'playerId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.players = {

    /**
     * games.players.get
     *
     * @desc Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me.
     *
     * @alias games.players.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.playerId - A player ID. A value of me may be used in place of the authenticated player's ID.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/' + params.playerId,
          method: 'GET'
        },
        params: params,
        requiredParams: ['playerId'],
        pathParams: ['playerId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.players.list
     *
     * @desc Get the collection of players for the currently authenticated user.
     *
     * @alias games.players.list
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.collection - Collection of players being retrieved
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of player resources to return in the response, used for paging. For any response, the actual number of player resources returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/me/players/' + params.collection,
          method: 'GET'
        },
        params: params,
        requiredParams: ['collection'],
        pathParams: ['collection'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.pushtokens = {

    /**
     * games.pushtokens.remove
     *
     * @desc Removes a push token for the current user and application. Removing a non-existent push token will report success.
     *
     * @alias games.pushtokens.remove
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    remove: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/pushtokens/remove',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.pushtokens.update
     *
     * @desc Registers a push token for the current user and application.
     *
     * @alias games.pushtokens.update
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    update: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/pushtokens',
          method: 'PUT'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.questMilestones = {

    /**
     * games.questMilestones.claim
     *
     * @desc Report that a reward for the milestone corresponding to milestoneId for the quest corresponding to questId has been claimed by the currently authorized user.
     *
     * @alias games.questMilestones.claim
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.milestoneId - The ID of the milestone.
     * @param  {string} params.questId - The ID of the quest.
     * @param  {string} params.requestId - A numeric ID to ensure that the request is handled correctly across retries. Your client application must generate this ID randomly.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    claim: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/quests/' + params.questId + '/milestones/' + params.milestoneId + '/claim',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['questId', 'milestoneId', 'requestId'],
        pathParams: ['milestoneId', 'questId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.quests = {

    /**
     * games.quests.accept
     *
     * @desc Indicates that the currently authorized user will participate in the quest.
     *
     * @alias games.quests.accept
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.questId - The ID of the quest.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    accept: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/quests/' + params.questId + '/accept',
          method: 'POST'
        },
        params: params,
        requiredParams: ['questId'],
        pathParams: ['questId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.quests.list
     *
     * @desc Get a list of quests for your application and the currently authenticated player.
     *
     * @alias games.quests.list
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of quest resources to return in the response, used for paging. For any response, the actual number of quest resources returned may be less than the specified maxResults. Acceptable values are 1 to 50, inclusive. (Default: 50).
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {string} params.playerId - A player ID. A value of me may be used in place of the authenticated player's ID.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/' + params.playerId + '/quests',
          method: 'GET'
        },
        params: params,
        requiredParams: ['playerId'],
        pathParams: ['playerId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.revisions = {

    /**
     * games.revisions.check
     *
     * @desc Checks whether the games client is out of date.
     *
     * @alias games.revisions.check
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.clientRevision - The revision of the client SDK used by your application. Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are:   - "ANDROID" - Client is running the Android SDK.  - "IOS" - Client is running the iOS SDK.  - "WEB_APP" - Client is running as a Web App.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    check: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/revisions/check',
          method: 'GET'
        },
        params: params,
        requiredParams: ['clientRevision'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.rooms = {

    /**
     * games.rooms.create
     *
     * @desc Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
     *
     * @alias games.rooms.create
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    create: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/create',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.decline
     *
     * @desc Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
     *
     * @alias games.rooms.decline
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.roomId - The ID of the room.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    decline: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/' + params.roomId + '/decline',
          method: 'POST'
        },
        params: params,
        requiredParams: ['roomId'],
        pathParams: ['roomId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.dismiss
     *
     * @desc Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
     *
     * @alias games.rooms.dismiss
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.roomId - The ID of the room.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    dismiss: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/' + params.roomId + '/dismiss',
          method: 'POST'
        },
        params: params,
        requiredParams: ['roomId'],
        pathParams: ['roomId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.get
     *
     * @desc Get the data for a room.
     *
     * @alias games.rooms.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.roomId - The ID of the room.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/' + params.roomId,
          method: 'GET'
        },
        params: params,
        requiredParams: ['roomId'],
        pathParams: ['roomId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.join
     *
     * @desc Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
     *
     * @alias games.rooms.join
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.roomId - The ID of the room.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    join: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/' + params.roomId + '/join',
          method: 'POST'
        },
        params: params,
        requiredParams: ['roomId'],
        pathParams: ['roomId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.leave
     *
     * @desc Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
     *
     * @alias games.rooms.leave
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.roomId - The ID of the room.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    leave: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/' + params.roomId + '/leave',
          method: 'POST'
        },
        params: params,
        requiredParams: ['roomId'],
        pathParams: ['roomId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.list
     *
     * @desc Returns invitations to join rooms.
     *
     * @alias games.rooms.list
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of rooms to return in the response, used for paging. For any response, the actual number of rooms to return may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.rooms.reportStatus
     *
     * @desc Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
     *
     * @alias games.rooms.reportStatus
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.roomId - The ID of the room.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    reportStatus: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/rooms/' + params.roomId + '/reportstatus',
          method: 'POST'
        },
        params: params,
        requiredParams: ['roomId'],
        pathParams: ['roomId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.scores = {

    /**
     * games.scores.get
     *
     * @desc Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a specific time span, leaderboardId can be set to ALL to retrieve data for all leaderboards in a given time span. NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one parameter may be set to 'ALL'.
     *
     * @alias games.scores.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.includeRankType - The types of ranks to return. If the parameter is omitted, no ranks will be returned.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.leaderboardId - The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application.
     * @param  {integer=} params.maxResults - The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {string} params.playerId - A player ID. A value of me may be used in place of the authenticated player's ID.
     * @param  {string} params.timeSpan - The time span for the scores and ranks you're requesting.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/' + params.playerId + '/leaderboards/' + params.leaderboardId + '/scores/' + params.timeSpan,
          method: 'GET'
        },
        params: params,
        requiredParams: ['playerId', 'leaderboardId', 'timeSpan'],
        pathParams: ['leaderboardId', 'playerId', 'timeSpan'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.scores.list
     *
     * @desc Lists the scores in a leaderboard, starting from the top.
     *
     * @alias games.scores.list
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.collection - The collection of scores you're requesting.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.leaderboardId - The ID of the leaderboard.
     * @param  {integer=} params.maxResults - The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {string} params.timeSpan - The time span for the scores and ranks you're requesting.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/leaderboards/' + params.leaderboardId + '/scores/' + params.collection,
          method: 'GET'
        },
        params: params,
        requiredParams: ['leaderboardId', 'collection', 'timeSpan'],
        pathParams: ['collection', 'leaderboardId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.scores.listWindow
     *
     * @desc Lists the scores in a leaderboard around (and including) a player's score.
     *
     * @alias games.scores.listWindow
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.collection - The collection of scores you're requesting.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.leaderboardId - The ID of the leaderboard.
     * @param  {integer=} params.maxResults - The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {integer=} params.resultsAbove - The preferred number of scores to return above the player's score. More scores may be returned if the player is at the bottom of the leaderboard; fewer may be returned if the player is at the top. Must be less than or equal to maxResults.
     * @param  {boolean=} params.returnTopIfAbsent - True if the top scores should be returned when the player is not in the leaderboard. Defaults to true.
     * @param  {string} params.timeSpan - The time span for the scores and ranks you're requesting.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    listWindow: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/leaderboards/' + params.leaderboardId + '/window/' + params.collection,
          method: 'GET'
        },
        params: params,
        requiredParams: ['leaderboardId', 'collection', 'timeSpan'],
        pathParams: ['collection', 'leaderboardId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.scores.submit
     *
     * @desc Submits a score to the specified leaderboard.
     *
     * @alias games.scores.submit
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.leaderboardId - The ID of the leaderboard.
     * @param  {string} params.score - The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.
     * @param  {string=} params.scoreTag - Additional information about the score you're submitting. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    submit: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/leaderboards/' + params.leaderboardId + '/scores',
          method: 'POST'
        },
        params: params,
        requiredParams: ['leaderboardId', 'score'],
        pathParams: ['leaderboardId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.scores.submitMultiple
     *
     * @desc Submits multiple scores to leaderboards.
     *
     * @alias games.scores.submitMultiple
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    submitMultiple: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/leaderboards/scores',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.snapshots = {

    /**
     * games.snapshots.get
     *
     * @desc Retrieves the metadata for a given snapshot ID.
     *
     * @alias games.snapshots.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.snapshotId - The ID of the snapshot.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/snapshots/' + params.snapshotId,
          method: 'GET'
        },
        params: params,
        requiredParams: ['snapshotId'],
        pathParams: ['snapshotId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.snapshots.list
     *
     * @desc Retrieves a list of snapshots created by your application for the player corresponding to the player ID.
     *
     * @alias games.snapshots.list
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxResults - The maximum number of snapshot resources to return in the response, used for paging. For any response, the actual number of snapshot resources returned may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {string} params.playerId - A player ID. A value of me may be used in place of the authenticated player's ID.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/players/' + params.playerId + '/snapshots',
          method: 'GET'
        },
        params: params,
        requiredParams: ['playerId'],
        pathParams: ['playerId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };

  this.turnBasedMatches = {

    /**
     * games.turnBasedMatches.cancel
     *
     * @desc Cancel a turn-based match.
     *
     * @alias games.turnBasedMatches.cancel
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.matchId - The ID of the match.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    cancel: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/cancel',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.create
     *
     * @desc Create a turn-based match.
     *
     * @alias games.turnBasedMatches.create
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    create: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/create',
          method: 'POST'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.decline
     *
     * @desc Decline an invitation to play a turn-based match.
     *
     * @alias games.turnBasedMatches.decline
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    decline: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/decline',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.dismiss
     *
     * @desc Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.
     *
     * @alias games.turnBasedMatches.dismiss
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string} params.matchId - The ID of the match.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    dismiss: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/dismiss',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.finish
     *
     * @desc Finish a turn-based match. Each player should make this call once, after all results are in. Only the player whose turn it is may make the first call to Finish, and can pass in the final match state.
     *
     * @alias games.turnBasedMatches.finish
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    finish: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/finish',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.get
     *
     * @desc Get the data for a turn-based match.
     *
     * @alias games.turnBasedMatches.get
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {boolean=} params.includeMatchData - Get match data along with metadata.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    get: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId,
          method: 'GET'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.join
     *
     * @desc Join a turn-based match.
     *
     * @alias games.turnBasedMatches.join
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    join: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/join',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.leave
     *
     * @desc Leave a turn-based match when it is not the current player's turn, without canceling the match.
     *
     * @alias games.turnBasedMatches.leave
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    leave: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/leave',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.leaveTurn
     *
     * @desc Leave a turn-based match during the current player's turn, without canceling the match.
     *
     * @alias games.turnBasedMatches.leaveTurn
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {integer} params.matchVersion - The version of the match being updated.
     * @param  {string=} params.pendingParticipantId - The ID of another participant who should take their turn next. If not set, the match will wait for other player(s) to join via automatching; this is only valid if automatch criteria is set on the match with remaining slots for automatched players.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    leaveTurn: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/leaveTurn',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId', 'matchVersion'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.list
     *
     * @desc Returns turn-based matches the player is or was involved in.
     *
     * @alias games.turnBasedMatches.list
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {boolean=} params.includeMatchData - True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxCompletedMatches - The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled.
     * @param  {integer=} params.maxResults - The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    list: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.rematch
     *
     * @desc Create a rematch of a match that was previously completed, with the same participants. This can be called by only one player on a match still in their list; the player must have called Finish first. Returns the newly created match; it will be the caller's turn.
     *
     * @alias games.turnBasedMatches.rematch
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {string=} params.requestId - A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    rematch: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/rematch',
          method: 'POST'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.sync
     *
     * @desc Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first. Matches that should be removed from the local cache will have a status of MATCH_DELETED.
     *
     * @alias games.turnBasedMatches.sync
     * @memberOf! games(v1)
     *
     * @param  {object=} params - Parameters for request
     * @param  {boolean=} params.includeMatchData - True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {integer=} params.maxCompletedMatches - The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled.
     * @param  {integer=} params.maxResults - The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults.
     * @param  {string=} params.pageToken - The token returned by the previous request.
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    sync: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/sync',
          method: 'GET'
        },
        params: params,
        context: self
      };

      return createAPIRequest(parameters, callback);
    },

    /**
     * games.turnBasedMatches.takeTurn
     *
     * @desc Commit the results of a player turn.
     *
     * @alias games.turnBasedMatches.takeTurn
     * @memberOf! games(v1)
     *
     * @param  {object} params - Parameters for request
     * @param  {string=} params.language - The preferred language to use for strings returned by this method.
     * @param  {string} params.matchId - The ID of the match.
     * @param  {object} params.resource - Request body data
     * @param  {callback} callback - The callback that handles the response.
     * @return {object} Request object
     */
    takeTurn: function(params, callback) {
      var parameters = {
        options: {
          url: 'https://www.googleapis.com/games/v1/turnbasedmatches/' + params.matchId + '/turn',
          method: 'PUT'
        },
        params: params,
        requiredParams: ['matchId'],
        pathParams: ['matchId'],
        context: self
      };

      return createAPIRequest(parameters, callback);
    }

  };
}

/**
 * Exports Games object
 * @type Games
 */
module.exports = Games;


text:
package com.happy3w.autobuy.util;

import org.apache.catalina.util.ServerInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;

import javax.net.ssl.*;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * Created by ysgao on 4/28/16.
 */
public class HttpsClientRequestFactory extends SimpleClientHttpRequestFactory {

    private final Logger logger = LoggerFactory.getLogger(HttpsClientRequestFactory.class);

    private final HostnameVerifier hostNameVerifier;
    private final ServerInfo serverInfo;

    public HttpsClientRequestFactory(final HostnameVerifier hostNameVerifier,
                                     final ServerInfo serverInfo) {
        this.hostNameVerifier = (hostNameVerifier == null ? new SslThumbprintVerifier() : hostNameVerifier);
        this.serverInfo = serverInfo;
    }

    @Override
    protected void prepareConnection(final HttpURLConnection connection, final String httpMethod)
            throws IOException {
        if (connection instanceof HttpsURLConnection) {
            ((HttpsURLConnection) connection).setHostnameVerifier(hostNameVerifier);
            ((HttpsURLConnection) connection).setSSLSocketFactory(initSSLContext()
                    .getSocketFactory());
        }
        super.prepareConnection(connection, httpMethod);
    }

    private SSLContext initSSLContext() {
        try {
            System.setProperty("https.protocols", "TLSv1");

            // Set ssl trust manager. VerifyStruct against our server thumbprint
            final SSLContext ctx = SSLContext.getInstance("TLSv1");
//            final SslThumbprintVerifier verifier = new SslThumbprintVerifier(serverInfo);
            final ThumbprintTrustManager thumbPrintTrustManager =
                    new ThumbprintTrustManager();//null, verifier);
            ctx.init(null, new TrustManager[] { thumbPrintTrustManager }, null);
            return ctx;
        } catch (final Exception ex) {
            logger.error(
                    "An exception was thrown while trying to initialize HTTP security manager.", ex);
            return null;
        }
    }

    private static class SslThumbprintVerifier implements HostnameVerifier {

        @Override
        public boolean verify(String s, SSLSession sslSession) {
            return true;
        }
    }

    private static class ThumbprintTrustManager implements X509TrustManager {

        @Override
        public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

        }

        @Override
        public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

        }

        @Override
        public X509Certificate[] getAcceptedIssuers() {
            return null;
        }
    }
}


text:
module Trivia
  module ChosenAnswer
    extend ActiveSupport::Concern

    included do
      attr_accessible :user, :user_id, :answer, :answer_id, :question, :question_id, :points

      belongs_to :answer
      belongs_to :user
      belongs_to :question

      validates_associated :answer, :user
      validates_presence_of :answer, :user

      validates :question_id, :uniqueness => { :scope => :user_id }

      before_save :fill_points, :fill_question
    end

    module ClassMethods

    end

    module InstanceMethods
      def fill_points
        self.points = self.answer.right ? self.answer.question.points : 0 unless self.points
      end

      def fill_question
        self.question = self.answer.question
      end
    end
  end
end


text:
import webapp2

from pages import author_list
from pages.authors import author

class Page(author.Page):
    """The tlarsen author page of the GiR App Labs at AAMU app."""

    USER_NAME = 'tlarsen'
    DISPLAY_NAME = 'Todd Larsen'
    MESSAGE = "Hi, I'm Todd Larsen!"

author_list.Page.add_author_page(Page)


text:
package xworker.jetty;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.xmeta.Action;
import org.xmeta.ActionContext;
import org.xmeta.Thing;
import org.xmeta.World;

import xworker.lang.executor.Executor;

public class SimpleHttpServer {
	private static final String TAG = SimpleHttpServer.class.getName();

	public static void run(ActionContext actionContext){
		try{
			World world = World.getInstance();
			Thing self = actionContext.getObject("self");

			//查看WEB-INFO是否存在
			File webIfo = new File("./WEB-INF");
			if(webIfo.exists() == false){
				Thing createWeb = world.getThing("xworker.tools.project.standalone.CreateProjectActions/@CreateDmlWebProject");
				createWeb.doAction("createWeb", actionContext, "dir", new File("."));
			}

			//XWorker之外的事物管理器增加文件改动监听
			Action monitorFile = actionContext.getObject("monitorFile");
			if(monitorFile != null) {
				monitorFile.run(actionContext);
			}

			//检查基本资源,编辑事物需要的基本资源
			File root = new File(".");
			String resourcesForCopy = self.getStringBlankAsNull("resourcesForCopy");
			if(resourcesForCopy != null){
				for(String res : resourcesForCopy.split("[,]")){
					checkResource(res, root);
				}
				//checkResource("js/extjs", root);
			}

			//把自己设置为默认的安全处理器
			//SecurityHandler securityHandler = new WebTextSecurityHandler(self);
			//SecurityManager.setDefaultSecurityHandler(securityHandler);

			//启动HTTP服务器
			Server aserver = new Server(self.getInt("port"));
			/*
			server.
		    Connector connector= new SelectChannelConnector();//new SocketConnector();//new SelectChannelConnector();
		    connector.setPort(self.getInt("port"));
		    aserver.setConnectors(new Connector[]{connector});
		    */
		    //根应用
		    String contextPath = self.doAction("getContextPath", actionContext);
		    if(contextPath == null){
		    	contextPath = "/";
		    }
		    WebAppContext context = new WebAppContext(".", contextPath);
		    //WebAppContext context = new WebAppContext(World.getInstance().getPath() + "/webroot/", "/");
	        context.setResourceBase(".");
		    //context.setResourceBase(World.getInstance().getPath() + "/webroot/");
	        context.setWelcomeFiles(new String[]{"index.html", "index.htm", "index.do",
	        		"index.dml", "index.xer", "index.xer.xml", "index.xer.txt"});
		    context.setClassLoader(world.getClassLoader());
		    context.setAttribute("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
		    //SWT rwt会出现文件明明存在,但404问题,加下面的语句可以解决
		    context.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false");

		    aserver.setHandler(context);
		    aserver.setStopAtShutdown(true);
		    aserver.start();
		}catch(Exception e){
			e.printStackTrace();
		}
	}

	public static void checkResource(String path, File root) throws IOException{
	    File targetFile = new File(root, path);
	    if(!targetFile.exists()){
	        File srcFile = new File(World.getInstance().getPath() + "/webroot/" + path);
	        Executor.info(TAG, "Copping " + targetFile.getPath());
	        if(srcFile.isFile()){
	            FileUtils.copyFile(srcFile, targetFile);
	        }else{
	            FileUtils.copyDirectory(srcFile, targetFile);
	        }
	    }
	}
}


text:
sizeof4j
========

[![Build Status](https://api.travis-ci.org/repositories/arturmkrtchyan/sizeof4j.png)](https://travis-ci.org/arturmkrtchyan/sizeof4j)
[![Coverage Status](https://img.shields.io/coveralls/arturmkrtchyan/sizeof4j.svg)](https://coveralls.io/r/arturmkrtchyan/sizeof4j)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.arturmkrtchyan.sizeof4j/sizeof4j/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.arturmkrtchyan.sizeof4j/sizeof4j)
[![License](http://img.shields.io/:license-Apache 2.0-blue.svg)](https://raw.githubusercontent.com/arturmkrtchyan/iban4j/master/LICENSE.txt)

A Java library for measuring memory size of Java objects.

```java
import com.arturmkrtchyan.sizeof4j.util.ConsoleUtil;

import static java.lang.System.out;

class Main {

    public static void main(String[] args) {

        ConsoleUtil.printJvmDetails();

        out.println("\n\nSizeOf");
        out.println("=================================");

        out.println(" --------------------------");
        out.println("|       Primitives         |");
        out.println(" --------------------------");
        out.println("byte:       " + SizeOf.byteSize());
        out.println("boolean:    " + SizeOf.booleanSize());
        out.println("short:      " + SizeOf.shortSize());
        out.println("char:       " + SizeOf.charSize());
        out.println("int:        " + SizeOf.intSize());
        out.println("float:      " + SizeOf.floatSize());
        out.println("long:       " + SizeOf.longSize());
        out.println("double:     " + SizeOf.doubleSize());

        out.println(" --------------------------");
        out.println("|     Classic Objects      |");
        out.println(" --------------------------");
        out.println("Object:     " + SizeOf.shallowSize(Object.class));
        out.println("Integer:    " + SizeOf.shallowSize(new Integer(2)));
        out.println("String:     " + SizeOf.shallowSize(new String("aaa")));

        out.println(" --------------------------");
        out.println("|      Custom Objects      |");
        out.println(" --------------------------");
        out.println("A:          " + SizeOf.shallowSize(new A()));
        out.println("B:          " + SizeOf.shallowSize(new B()));
        out.println("C:          " + SizeOf.shallowSize(new C()));

        out.println(" --------------------------");
        out.println("|      Class Objects      |");
        out.println(" --------------------------");
        out.println("int.class:  " + SizeOf.shallowSize(int.class));
        out.println("D.class:    " + SizeOf.shallowSize(D.class));

        out.println(" --------------------------");
        out.println("|           Arrays         |");
        out.println(" --------------------------");
        out.println("int[]:      " + SizeOf.shallowSize(new int[]{}));
        out.println("int[2]:     " + SizeOf.shallowSize(new int[]{1, 2}));
        out.println("int[].class " + SizeOf.shallowSize(int[].class));
        out.println("C[].class   " + SizeOf.shallowSize(C[].class));
        out.println("C[2]:       " + SizeOf.shallowSize(new C[]{new C(), new C()}));
    }

    private static class A {
        private int i;
    }

    private static class B {
        private int i;
        private java.util.Locale l = java.util.Locale.US;
    }

    private static class C {
        private int i;
        private java.util.HashMap hm = new java.util.HashMap();
    }

    private static class D {
        private int i;
        private java.util.HashMap hm = new java.util.HashMap();
    }

}
```

#### Maven dependency:
```
<dependency>
    <groupId>com.arturmkrtchyan.sizeof4j</groupId>
    <artifactId>sizeof4j</artifactId>
    <version>0.1.0</version>
</dependency>
```

![Compatibility Badge](https://java.net/downloads/adoptopenjdk/compat.svg)