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

package com.google.api.services.composer.v1;

/**
 * Service definition for CloudComposer (v1).
 *
 *

 * Manages Apache Airflow environments on Google Cloud Platform.
 *

 *
 *

 * For more information about this service, see the
 * API Documentation
 *

 *
 *

 * This service uses {@link CloudComposerRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 *

 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class CloudComposer extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {

  // Note: Leave this static initializer at the top of the file.
  static {
    com.google.api.client.util.Preconditions.checkState(
        com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
        com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15,
        "You are currently running with version %s of google-api-client. " +
        "You need at least version 1.15 of google-api-client to run version " +
        "1.30.10 of the Cloud Composer API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
  }

  /**
   * The default encoded root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_ROOT_URL = "https://composer.googleapis.com/";

  /**
   * The default encoded service path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_SERVICE_PATH = "";

  /**
   * The default encoded batch path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.23
   */
  public static final String DEFAULT_BATCH_PATH = "batch";

  /**
   * The default encoded base URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   */
  public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;

  /**
   * Constructor.
   *
   *

   * Use {@link Builder} if you need to specify any of the optional parameters.
   *

   *
   * @param transport HTTP transport, which should normally be:
   *

   *
Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}

   *
Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}

   *
Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *

   *

   * @param jsonFactory JSON factory, which may be:
   *

   *
Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}

   *
Google GSON: {@code com.google.api.client.json.gson.GsonFactory}

   *
Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}

   *

   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public CloudComposer(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
      com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
    this(new Builder(transport, jsonFactory, httpRequestInitializer));
  }

  /**
   * @param builder builder
   */
  CloudComposer(Builder builder) {
    super(builder);
  }

  @Override
  protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
    super.initialize(httpClientRequest);
  }

  /**
   * An accessor for creating requests from the Projects collection.
   *
   *
The typical use is:

   *

   *   {@code CloudComposer composer = new CloudComposer(...);}
   *   {@code CloudComposer.Projects.List request = composer.projects().list(parameters ...)}
   *

   *
   * @return the resource collection
   */
  public Projects projects() {
    return new Projects();
  }

  /**
   * The "projects" collection of methods.
   */
  public class Projects {

    /**
     * An accessor for creating requests from the Locations collection.
     *
     *
The typical use is:

     *

     *   {@code CloudComposer composer = new CloudComposer(...);}
     *   {@code CloudComposer.Locations.List request = composer.locations().list(parameters ...)}
     *

     *
     * @return the resource collection
     */
    public Locations locations() {
      return new Locations();
    }

    /**
     * The "locations" collection of methods.
     */
    public class Locations {

      /**
       * An accessor for creating requests from the Environments collection.
       *
       *
The typical use is:

       *

       *   {@code CloudComposer composer = new CloudComposer(...);}
       *   {@code CloudComposer.Environments.List request = composer.environments().list(parameters ...)}
       *

       *
       * @return the resource collection
       */
      public Environments environments() {
        return new Environments();
      }

      /**
       * The "environments" collection of methods.
       */
      public class Environments {

        /**
         * Create a new environment.
         *
         * Create a request for the method "environments.create".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link Create#execute()} method to invoke the remote operation.
         *
         * @param parent The parent must be of the form "projects/{projectId}/locations/{locationId}".
         * @param content the {@link com.google.api.services.composer.v1.model.Environment}
         * @return the request
         */
        public Create create(java.lang.String parent, com.google.api.services.composer.v1.model.Environment content) throws java.io.IOException {
          Create result = new Create(parent, content);
          initialize(result);
          return result;
        }

        public class Create extends CloudComposerRequest<com.google.api.services.composer.v1.model.Operation> {

          private static final String REST_PATH = "v1/{+parent}/environments";

          private final java.util.regex.Pattern PARENT_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");

          /**
           * Create a new environment.
           *
           * Create a request for the method "environments.create".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
           *
 {@link
           * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor.

           *
           * @param parent The parent must be of the form "projects/{projectId}/locations/{locationId}".
           * @param content the {@link com.google.api.services.composer.v1.model.Environment}
           * @since 1.13
           */
          protected Create(java.lang.String parent, com.google.api.services.composer.v1.model.Environment content) {
            super(CloudComposer.this, "POST", REST_PATH, content, com.google.api.services.composer.v1.model.Operation.class);
            this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
          }

          @Override
          public Create set$Xgafv(java.lang.String $Xgafv) {
            return (Create) super.set$Xgafv($Xgafv);
          }

          @Override
          public Create setAccessToken(java.lang.String accessToken) {
            return (Create) super.setAccessToken(accessToken);
          }

          @Override
          public Create setAlt(java.lang.String alt) {
            return (Create) super.setAlt(alt);
          }

          @Override
          public Create setCallback(java.lang.String callback) {
            return (Create) super.setCallback(callback);
          }

          @Override
          public Create setFields(java.lang.String fields) {
            return (Create) super.setFields(fields);
          }

          @Override
          public Create setKey(java.lang.String key) {
            return (Create) super.setKey(key);
          }

          @Override
          public Create setOauthToken(java.lang.String oauthToken) {
            return (Create) super.setOauthToken(oauthToken);
          }

          @Override
          public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (Create) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public Create setQuotaUser(java.lang.String quotaUser) {
            return (Create) super.setQuotaUser(quotaUser);
          }

          @Override
          public Create setUploadType(java.lang.String uploadType) {
            return (Create) super.setUploadType(uploadType);
          }

          @Override
          public Create setUploadProtocol(java.lang.String uploadProtocol) {
            return (Create) super.setUploadProtocol(uploadProtocol);
          }

          /** The parent must be of the form "projects/{projectId}/locations/{locationId}". */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** The parent must be of the form "projects/{projectId}/locations/{locationId}".
           */
          public java.lang.String getParent() {
            return parent;
          }

          /** The parent must be of the form "projects/{projectId}/locations/{locationId}". */
          public Create setParent(java.lang.String parent) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
            this.parent = parent;
            return this;
          }

          @Override
          public Create set(String parameterName, Object value) {
            return (Create) super.set(parameterName, value);
          }
        }
        /**
         * Delete an environment.
         *
         * Create a request for the method "environments.delete".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link Delete#execute()} method to invoke the remote operation.
         *
         * @param name The environment to delete, in the form:
         *        "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
         * @return the request
         */
        public Delete delete(java.lang.String name) throws java.io.IOException {
          Delete result = new Delete(name);
          initialize(result);
          return result;
        }

        public class Delete extends CloudComposerRequest<com.google.api.services.composer.v1.model.Operation> {

          private static final String REST_PATH = "v1/{+name}";

          private final java.util.regex.Pattern NAME_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/environments/[^/]+$");

          /**
           * Delete an environment.
           *
           * Create a request for the method "environments.delete".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
           *
 {@link
           * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor.

           *
           * @param name The environment to delete, in the form:
         *        "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           * @since 1.13
           */
          protected Delete(java.lang.String name) {
            super(CloudComposer.this, "DELETE", REST_PATH, null, com.google.api.services.composer.v1.model.Operation.class);
            this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
            }
          }

          @Override
          public Delete set$Xgafv(java.lang.String $Xgafv) {
            return (Delete) super.set$Xgafv($Xgafv);
          }

          @Override
          public Delete setAccessToken(java.lang.String accessToken) {
            return (Delete) super.setAccessToken(accessToken);
          }

          @Override
          public Delete setAlt(java.lang.String alt) {
            return (Delete) super.setAlt(alt);
          }

          @Override
          public Delete setCallback(java.lang.String callback) {
            return (Delete) super.setCallback(callback);
          }

          @Override
          public Delete setFields(java.lang.String fields) {
            return (Delete) super.setFields(fields);
          }

          @Override
          public Delete setKey(java.lang.String key) {
            return (Delete) super.setKey(key);
          }

          @Override
          public Delete setOauthToken(java.lang.String oauthToken) {
            return (Delete) super.setOauthToken(oauthToken);
          }

          @Override
          public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (Delete) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public Delete setQuotaUser(java.lang.String quotaUser) {
            return (Delete) super.setQuotaUser(quotaUser);
          }

          @Override
          public Delete setUploadType(java.lang.String uploadType) {
            return (Delete) super.setUploadType(uploadType);
          }

          @Override
          public Delete setUploadProtocol(java.lang.String uploadProtocol) {
            return (Delete) super.setUploadProtocol(uploadProtocol);
          }

          /**
           * The environment to delete, in the form:
           * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** The environment to delete, in the form:
         "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          public java.lang.String getName() {
            return name;
          }

          /**
           * The environment to delete, in the form:
           * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          public Delete setName(java.lang.String name) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
            }
            this.name = name;
            return this;
          }

          @Override
          public Delete set(String parameterName, Object value) {
            return (Delete) super.set(parameterName, value);
          }
        }
        /**
         * Get an existing environment.
         *
         * Create a request for the method "environments.get".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link Get#execute()} method to invoke the remote operation.
         *
         * @param name The resource name of the environment to get, in the form:
         *        "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
         * @return the request
         */
        public Get get(java.lang.String name) throws java.io.IOException {
          Get result = new Get(name);
          initialize(result);
          return result;
        }

        public class Get extends CloudComposerRequest<com.google.api.services.composer.v1.model.Environment> {

          private static final String REST_PATH = "v1/{+name}";

          private final java.util.regex.Pattern NAME_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/environments/[^/]+$");

          /**
           * Get an existing environment.
           *
           * Create a request for the method "environments.get".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

           * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor.

           *
           * @param name The resource name of the environment to get, in the form:
         *        "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           * @since 1.13
           */
          protected Get(java.lang.String name) {
            super(CloudComposer.this, "GET", REST_PATH, null, com.google.api.services.composer.v1.model.Environment.class);
            this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
            }
          }

          @Override
          public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
            return super.executeUsingHead();
          }

          @Override
          public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
            return super.buildHttpRequestUsingHead();
          }

          @Override
          public Get set$Xgafv(java.lang.String $Xgafv) {
            return (Get) super.set$Xgafv($Xgafv);
          }

          @Override
          public Get setAccessToken(java.lang.String accessToken) {
            return (Get) super.setAccessToken(accessToken);
          }

          @Override
          public Get setAlt(java.lang.String alt) {
            return (Get) super.setAlt(alt);
          }

          @Override
          public Get setCallback(java.lang.String callback) {
            return (Get) super.setCallback(callback);
          }

          @Override
          public Get setFields(java.lang.String fields) {
            return (Get) super.setFields(fields);
          }

          @Override
          public Get setKey(java.lang.String key) {
            return (Get) super.setKey(key);
          }

          @Override
          public Get setOauthToken(java.lang.String oauthToken) {
            return (Get) super.setOauthToken(oauthToken);
          }

          @Override
          public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (Get) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public Get setQuotaUser(java.lang.String quotaUser) {
            return (Get) super.setQuotaUser(quotaUser);
          }

          @Override
          public Get setUploadType(java.lang.String uploadType) {
            return (Get) super.setUploadType(uploadType);
          }

          @Override
          public Get setUploadProtocol(java.lang.String uploadProtocol) {
            return (Get) super.setUploadProtocol(uploadProtocol);
          }

          /**
           * The resource name of the environment to get, in the form:
           * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** The resource name of the environment to get, in the form:
         "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          public java.lang.String getName() {
            return name;
          }

          /**
           * The resource name of the environment to get, in the form:
           * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          public Get setName(java.lang.String name) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
            }
            this.name = name;
            return this;
          }

          @Override
          public Get set(String parameterName, Object value) {
            return (Get) super.set(parameterName, value);
          }
        }
        /**
         * List environments.
         *
         * Create a request for the method "environments.list".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link List#execute()} method to invoke the remote operation.
         *
         * @param parent List environments in the given project and location, in the form:
         *        "projects/{projectId}/locations/{locationId}"
         * @return the request
         */
        public List list(java.lang.String parent) throws java.io.IOException {
          List result = new List(parent);
          initialize(result);
          return result;
        }

        public class List extends CloudComposerRequest<com.google.api.services.composer.v1.model.ListEnvironmentsResponse> {

          private static final String REST_PATH = "v1/{+parent}/environments";

          private final java.util.regex.Pattern PARENT_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");

          /**
           * List environments.
           *
           * Create a request for the method "environments.list".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

           * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor.

           *
           * @param parent List environments in the given project and location, in the form:
         *        "projects/{projectId}/locations/{locationId}"
           * @since 1.13
           */
          protected List(java.lang.String parent) {
            super(CloudComposer.this, "GET", REST_PATH, null, com.google.api.services.composer.v1.model.ListEnvironmentsResponse.class);
            this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
          }

          @Override
          public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
            return super.executeUsingHead();
          }

          @Override
          public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
            return super.buildHttpRequestUsingHead();
          }

          @Override
          public List set$Xgafv(java.lang.String $Xgafv) {
            return (List) super.set$Xgafv($Xgafv);
          }

          @Override
          public List setAccessToken(java.lang.String accessToken) {
            return (List) super.setAccessToken(accessToken);
          }

          @Override
          public List setAlt(java.lang.String alt) {
            return (List) super.setAlt(alt);
          }

          @Override
          public List setCallback(java.lang.String callback) {
            return (List) super.setCallback(callback);
          }

          @Override
          public List setFields(java.lang.String fields) {
            return (List) super.setFields(fields);
          }

          @Override
          public List setKey(java.lang.String key) {
            return (List) super.setKey(key);
          }

          @Override
          public List setOauthToken(java.lang.String oauthToken) {
            return (List) super.setOauthToken(oauthToken);
          }

          @Override
          public List setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (List) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public List setQuotaUser(java.lang.String quotaUser) {
            return (List) super.setQuotaUser(quotaUser);
          }

          @Override
          public List setUploadType(java.lang.String uploadType) {
            return (List) super.setUploadType(uploadType);
          }

          @Override
          public List setUploadProtocol(java.lang.String uploadProtocol) {
            return (List) super.setUploadProtocol(uploadProtocol);
          }

          /**
           * List environments in the given project and location, in the form:
           * "projects/{projectId}/locations/{locationId}"
           */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** List environments in the given project and location, in the form:
         "projects/{projectId}/locations/{locationId}"
           */
          public java.lang.String getParent() {
            return parent;
          }

          /**
           * List environments in the given project and location, in the form:
           * "projects/{projectId}/locations/{locationId}"
           */
          public List setParent(java.lang.String parent) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
            this.parent = parent;
            return this;
          }

          /** The maximum number of environments to return. */
          @com.google.api.client.util.Key
          private java.lang.Integer pageSize;

          /** The maximum number of environments to return.
           */
          public java.lang.Integer getPageSize() {
            return pageSize;
          }

          /** The maximum number of environments to return. */
          public List setPageSize(java.lang.Integer pageSize) {
            this.pageSize = pageSize;
            return this;
          }

          /** The next_page_token value returned from a previous List request, if any. */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** The next_page_token value returned from a previous List request, if any.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /** The next_page_token value returned from a previous List request, if any. */
          public List setPageToken(java.lang.String pageToken) {
            this.pageToken = pageToken;
            return this;
          }

          @Override
          public List set(String parameterName, Object value) {
            return (List) super.set(parameterName, value);
          }
        }
        /**
         * Update an environment.
         *
         * Create a request for the method "environments.patch".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link Patch#execute()} method to invoke the remote operation.
         *
         * @param name The relative resource name of the environment to update, in the form:
         *        "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
         * @param content the {@link com.google.api.services.composer.v1.model.Environment}
         * @return the request
         */
        public Patch patch(java.lang.String name, com.google.api.services.composer.v1.model.Environment content) throws java.io.IOException {
          Patch result = new Patch(name, content);
          initialize(result);
          return result;
        }

        public class Patch extends CloudComposerRequest<com.google.api.services.composer.v1.model.Operation> {

          private static final String REST_PATH = "v1/{+name}";

          private final java.util.regex.Pattern NAME_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/environments/[^/]+$");

          /**
           * Update an environment.
           *
           * Create a request for the method "environments.patch".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
           *
 {@link
           * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor.

           *
           * @param name The relative resource name of the environment to update, in the form:
         *        "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           * @param content the {@link com.google.api.services.composer.v1.model.Environment}
           * @since 1.13
           */
          protected Patch(java.lang.String name, com.google.api.services.composer.v1.model.Environment content) {
            super(CloudComposer.this, "PATCH", REST_PATH, content, com.google.api.services.composer.v1.model.Operation.class);
            this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
            }
          }

          @Override
          public Patch set$Xgafv(java.lang.String $Xgafv) {
            return (Patch) super.set$Xgafv($Xgafv);
          }

          @Override
          public Patch setAccessToken(java.lang.String accessToken) {
            return (Patch) super.setAccessToken(accessToken);
          }

          @Override
          public Patch setAlt(java.lang.String alt) {
            return (Patch) super.setAlt(alt);
          }

          @Override
          public Patch setCallback(java.lang.String callback) {
            return (Patch) super.setCallback(callback);
          }

          @Override
          public Patch setFields(java.lang.String fields) {
            return (Patch) super.setFields(fields);
          }

          @Override
          public Patch setKey(java.lang.String key) {
            return (Patch) super.setKey(key);
          }

          @Override
          public Patch setOauthToken(java.lang.String oauthToken) {
            return (Patch) super.setOauthToken(oauthToken);
          }

          @Override
          public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (Patch) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public Patch setQuotaUser(java.lang.String quotaUser) {
            return (Patch) super.setQuotaUser(quotaUser);
          }

          @Override
          public Patch setUploadType(java.lang.String uploadType) {
            return (Patch) super.setUploadType(uploadType);
          }

          @Override
          public Patch setUploadProtocol(java.lang.String uploadProtocol) {
            return (Patch) super.setUploadProtocol(uploadProtocol);
          }

          /**
           * The relative resource name of the environment to update, in the form:
           * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** The relative resource name of the environment to update, in the form:
         "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          public java.lang.String getName() {
            return name;
          }

          /**
           * The relative resource name of the environment to update, in the form:
           * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
           */
          public Patch setName(java.lang.String name) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
            }
            this.name = name;
            return this;
          }

          /**
           * Required. A comma-separated list of paths, relative to `Environment`, of fields to
           * update. For example, to set the version of scikit-learn to install in the environment
           * to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter
           * would include the following two `paths` values: "config.softwareConfig.pypiPackages
           * .scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch
           * environment would specify the scikit-learn version as follows: { "config":{
           * "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } Note that in the
           * above example, any existing PyPI packages other than scikit-learn and numpy will be
           * unaffected. Only one update type may be included in a single request's `updateMask`.
           * For example, one cannot update both the PyPI packages and labels in the same request.
           * However, it is possible to update multiple members of a map field simultaneously in the
           * same request. For example, to set the labels "label1" and "label2" while clearing
           * "label3" (assuming it already exists), one can provide the paths "labels.label1",
           * "labels.label2", and "labels.label3" and populate the patch environment as follows: {
           * "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the
           * above example, any existing labels that are not included in the `updateMask` will be
           * unaffected. It is also possible to replace an entire map field by providing the map
           * field's path in the `updateMask`. The new value of the field will be that which is
           * provided in the patch environment. For example, to delete all pre-existing user-
           * specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would
           * contain the path "config.softwareConfig.pypiPackages", and the patch environment would
           * be the following: { "config":{ "softwareConfig":{ "pypiPackages":{
           * "botocore":"==1.7.14" } } } } **Note:** Only the following fields can be updated:
           * *Mask* *Purpose* config.softwareConfig.pypiPackages Replace all custom custom PyPI
           * packages. If a replacement package map is not included in `environment`, all custom
           * PyPI packages are cleared. It is an error to provide both this mask and a mask
           * specifying an individual package. config.softwareConfig.pypiPackages.packagename Update
           * the custom PyPI package packagename, preserving other packages. To delete the package,
           * include it in `updateMask`, and omit the mapping for it in
           * `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask
           * of this form and the "config.softwareConfig.pypiPackages" mask. labels Replace all
           * environment labels. If a replacement labels map is not included in `environment`, all
           * labels are cleared. It is an error to provide both this mask and a mask specifying one
           * or more individual labels. labels.labelName Set the label named labelName, while
           * preserving other labels. To delete the label, include it in `updateMask` and omit its
           * mapping in `environment.labels`. It is an error to provide both a mask of this form and
           * the "labels" mask. config.nodeCount Horizontally scale the number of nodes in the
           * environment. An integer greater than or equal to 3 must be provided in the
           * `config.nodeCount` field. config.softwareConfig.airflowConfigOverrides Replace all
           * Apache Airflow config overrides. If a replacement config overrides map is not included
           * in `environment`, all config overrides are cleared. It is an error to provide both this
           * mask and a mask specifying one or more individual config overrides.
           * config.softwareConfig.airflowConfigOverrides.section-name Override the Apache Airflow
           * config property name in the section named section, preserving other properties. To
           * delete the property override, include it in `updateMask` and omit its mapping in
           * `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide
           * both a mask of this form and the "config.softwareConfig.airflowConfigOverrides" mask.
           * config.softwareConfig.envVariables Replace all environment variables. If a replacement
           * environment variable map is not included in `environment`, all custom environment
           * variables are cleared. It is an error to provide both this mask and a mask specifying
           * one or more individual environment variables.
           */
          @com.google.api.client.util.Key
          private String updateMask;

          /** Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For
         example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove
         an existing installation of numpy, the `updateMask` parameter would include the following two
         `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
         "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify the
         scikit-learn version as follows: { "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-
         learn":"==0.19.0" } } } } Note that in the above example, any existing PyPI packages other than
         scikit-learn and numpy will be unaffected. Only one update type may be included in a single
         request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the
         same request. However, it is possible to update multiple members of a map field simultaneously in
         the same request. For example, to set the labels "label1" and "label2" while clearing "label3"
         (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and
         "labels.label3" and populate the patch environment as follows: { "labels":{ "label1":"new-
         label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels
         that are not included in the `updateMask` will be unaffected. It is also possible to replace an
         entire map field by providing the map field's path in the `updateMask`. The new value of the field
         will be that which is provided in the patch environment. For example, to delete all pre-existing
         user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain
         the path "config.softwareConfig.pypiPackages", and the patch environment would be the following: {
         "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } **Note:** Only the
         following fields can be updated: *Mask* *Purpose* config.softwareConfig.pypiPackages Replace all
         custom custom PyPI packages. If a replacement package map is not included in `environment`, all
         custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an
         individual package. config.softwareConfig.pypiPackages.packagename Update the custom PyPI package
         packagename, preserving other packages. To delete the package, include it in `updateMask`, and omit
         the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide
         both a mask of this form and the "config.softwareConfig.pypiPackages" mask. labels Replace all
         environment labels. If a replacement labels map is not included in `environment`, all labels are
         cleared. It is an error to provide both this mask and a mask specifying one or more individual
         labels. labels.labelName Set the label named labelName, while preserving other labels. To delete
         the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error
         to provide both a mask of this form and the "labels" mask. config.nodeCount Horizontally scale the
         number of nodes in the environment. An integer greater than or equal to 3 must be provided in the
         `config.nodeCount` field. config.softwareConfig.airflowConfigOverrides Replace all Apache Airflow
         config overrides. If a replacement config overrides map is not included in `environment`, all
         config overrides are cleared. It is an error to provide both this mask and a mask specifying one or
         more individual config overrides. config.softwareConfig.airflowConfigOverrides.section-name
         Override the Apache Airflow config property name in the section named section, preserving other
         properties. To delete the property override, include it in `updateMask` and omit its mapping in
         `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask
         of this form and the "config.softwareConfig.airflowConfigOverrides" mask.
         config.softwareConfig.envVariables Replace all environment variables. If a replacement environment
         variable map is not included in `environment`, all custom environment variables are cleared. It is
         an error to provide both this mask and a mask specifying one or more individual environment
         variables.
           */
          public String getUpdateMask() {
            return updateMask;
          }

          /**
           * Required. A comma-separated list of paths, relative to `Environment`, of fields to
           * update. For example, to set the version of scikit-learn to install in the environment
           * to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter
           * would include the following two `paths` values: "config.softwareConfig.pypiPackages
           * .scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch
           * environment would specify the scikit-learn version as follows: { "config":{
           * "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } Note that in the
           * above example, any existing PyPI packages other than scikit-learn and numpy will be
           * unaffected. Only one update type may be included in a single request's `updateMask`.
           * For example, one cannot update both the PyPI packages and labels in the same request.
           * However, it is possible to update multiple members of a map field simultaneously in the
           * same request. For example, to set the labels "label1" and "label2" while clearing
           * "label3" (assuming it already exists), one can provide the paths "labels.label1",
           * "labels.label2", and "labels.label3" and populate the patch environment as follows: {
           * "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the
           * above example, any existing labels that are not included in the `updateMask` will be
           * unaffected. It is also possible to replace an entire map field by providing the map
           * field's path in the `updateMask`. The new value of the field will be that which is
           * provided in the patch environment. For example, to delete all pre-existing user-
           * specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would
           * contain the path "config.softwareConfig.pypiPackages", and the patch environment would
           * be the following: { "config":{ "softwareConfig":{ "pypiPackages":{
           * "botocore":"==1.7.14" } } } } **Note:** Only the following fields can be updated:
           * *Mask* *Purpose* config.softwareConfig.pypiPackages Replace all custom custom PyPI
           * packages. If a replacement package map is not included in `environment`, all custom
           * PyPI packages are cleared. It is an error to provide both this mask and a mask
           * specifying an individual package. config.softwareConfig.pypiPackages.packagename Update
           * the custom PyPI package packagename, preserving other packages. To delete the package,
           * include it in `updateMask`, and omit the mapping for it in
           * `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask
           * of this form and the "config.softwareConfig.pypiPackages" mask. labels Replace all
           * environment labels. If a replacement labels map is not included in `environment`, all
           * labels are cleared. It is an error to provide both this mask and a mask specifying one
           * or more individual labels. labels.labelName Set the label named labelName, while
           * preserving other labels. To delete the label, include it in `updateMask` and omit its
           * mapping in `environment.labels`. It is an error to provide both a mask of this form and
           * the "labels" mask. config.nodeCount Horizontally scale the number of nodes in the
           * environment. An integer greater than or equal to 3 must be provided in the
           * `config.nodeCount` field. config.softwareConfig.airflowConfigOverrides Replace all
           * Apache Airflow config overrides. If a replacement config overrides map is not included
           * in `environment`, all config overrides are cleared. It is an error to provide both this
           * mask and a mask specifying one or more individual config overrides.
           * config.softwareConfig.airflowConfigOverrides.section-name Override the Apache Airflow
           * config property name in the section named section, preserving other properties. To
           * delete the property override, include it in `updateMask` and omit its mapping in
           * `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide
           * both a mask of this form and the "config.softwareConfig.airflowConfigOverrides" mask.
           * config.softwareConfig.envVariables Replace all environment variables. If a replacement
           * environment variable map is not included in `environment`, all custom environment
           * variables are cleared. It is an error to provide both this mask and a mask specifying
           * one or more individual environment variables.
           */
          public Patch setUpdateMask(String updateMask) {
            this.updateMask = updateMask;
            return this;
          }

          @Override
          public Patch set(String parameterName, Object value) {
            return (Patch) super.set(parameterName, value);
          }
        }

      }
      /**
       * An accessor for creating requests from the ImageVersions collection.
       *
       *
The typical use is:

       *

       *   {@code CloudComposer composer = new CloudComposer(...);}
       *   {@code CloudComposer.ImageVersions.List request = composer.imageVersions().list(parameters ...)}
       *

       *
       * @return the resource collection
       */
      public ImageVersions imageVersions() {
        return new ImageVersions();
      }

      /**
       * The "imageVersions" collection of methods.
       */
      public class ImageVersions {

        /**
         * List ImageVersions for provided location.
         *
         * Create a request for the method "imageVersions.list".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link List#execute()} method to invoke the remote operation.
         *
         * @param parent List ImageVersions in the given project and location, in the form:
         *        "projects/{projectId}/locations/{locationId}"
         * @return the request
         */
        public List list(java.lang.String parent) throws java.io.IOException {
          List result = new List(parent);
          initialize(result);
          return result;
        }

        public class List extends CloudComposerRequest<com.google.api.services.composer.v1.model.ListImageVersionsResponse> {

          private static final String REST_PATH = "v1/{+parent}/imageVersions";

          private final java.util.regex.Pattern PARENT_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");

          /**
           * List ImageVersions for provided location.
           *
           * Create a request for the method "imageVersions.list".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

           * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor.

           *
           * @param parent List ImageVersions in the given project and location, in the form:
         *        "projects/{projectId}/locations/{locationId}"
           * @since 1.13
           */
          protected List(java.lang.String parent) {
            super(CloudComposer.this, "GET", REST_PATH, null, com.google.api.services.composer.v1.model.ListImageVersionsResponse.class);
            this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
          }

          @Override
          public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
            return super.executeUsingHead();
          }

          @Override
          public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
            return super.buildHttpRequestUsingHead();
          }

          @Override
          public List set$Xgafv(java.lang.String $Xgafv) {
            return (List) super.set$Xgafv($Xgafv);
          }

          @Override
          public List setAccessToken(java.lang.String accessToken) {
            return (List) super.setAccessToken(accessToken);
          }

          @Override
          public List setAlt(java.lang.String alt) {
            return (List) super.setAlt(alt);
          }

          @Override
          public List setCallback(java.lang.String callback) {
            return (List) super.setCallback(callback);
          }

          @Override
          public List setFields(java.lang.String fields) {
            return (List) super.setFields(fields);
          }

          @Override
          public List setKey(java.lang.String key) {
            return (List) super.setKey(key);
          }

          @Override
          public List setOauthToken(java.lang.String oauthToken) {
            return (List) super.setOauthToken(oauthToken);
          }

          @Override
          public List setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (List) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public List setQuotaUser(java.lang.String quotaUser) {
            return (List) super.setQuotaUser(quotaUser);
          }

          @Override
          public List setUploadType(java.lang.String uploadType) {
            return (List) super.setUploadType(uploadType);
          }

          @Override
          public List setUploadProtocol(java.lang.String uploadProtocol) {
            return (List) super.setUploadProtocol(uploadProtocol);
          }

          /**
           * List ImageVersions in the given project and location, in the form:
           * "projects/{projectId}/locations/{locationId}"
           */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** List ImageVersions in the given project and location, in the form:
         "projects/{projectId}/locations/{locationId}"
           */
          public java.lang.String getParent() {
            return parent;
          }

          /**
           * List ImageVersions in the given project and location, in the form:
           * "projects/{projectId}/locations/{locationId}"
           */
          public List setParent(java.lang.String parent) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
            this.parent = parent;
            return this;
          }

          /** The maximum number of image_versions to return. */
          @com.google.api.client.util.Key
          private java.lang.Integer pageSize;

          /** The maximum number of image_versions to return.
           */
          public java.lang.Integer getPageSize() {
            return pageSize;
          }

          /** The maximum number of image_versions to return. */
          public List setPageSize(java.lang.Integer pageSize) {
            this.pageSize = pageSize;
            return this;
          }

          /** The next_page_token value returned from a previous List request, if any. */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** The next_page_token value returned from a previous List request, if any.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /** The next_page_token value returned from a previous List request, if any. */
          public List setPageToken(java.lang.String pageToken) {
            this.pageToken = pageToken;
            return this;
          }

          @Override
          public List set(String parameterName, Object value) {
            return (List) super.set(parameterName, value);
          }
        }

      }
      /**
       * An accessor for creating requests from the Operations collection.
       *
       *
The typical use is:

       *

       *   {@code CloudComposer composer = new CloudComposer(...);}
       *   {@code CloudComposer.Operations.List request = composer.operations().list(parameters ...)}
       *

       *
       * @return the resource collection
       */
      public Operations operations() {
        return new Operations();
      }

      /**
       * The "operations" collection of methods.
       */
      public class Operations {

        /**
         * Deletes a long-running operation. This method indicates that the client is no longer interested
         * in the operation result. It does not cancel the operation. If the server doesn't support this
         * method, it returns `google.rpc.Code.UNIMPLEMENTED`.
         *
         * Create a request for the method "operations.delete".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link Delete#execute()} method to invoke the remote operation.
         *
         * @param name The name of the operation resource to be deleted.
         * @return the request
         */
        public Delete delete(java.lang.String name) throws java.io.IOException {
          Delete result = new Delete(name);
          initialize(result);
          return result;
        }

        public class Delete extends CloudComposerRequest<com.google.api.services.composer.v1.model.Empty> {

          private static final String REST_PATH = "v1/{+name}";

          private final java.util.regex.Pattern NAME_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");

          /**
           * Deletes a long-running operation. This method indicates that the client is no longer interested
           * in the operation result. It does not cancel the operation. If the server doesn't support this
           * method, it returns `google.rpc.Code.UNIMPLEMENTED`.
           *
           * Create a request for the method "operations.delete".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
           *
 {@link
           * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor.

           *
           * @param name The name of the operation resource to be deleted.
           * @since 1.13
           */
          protected Delete(java.lang.String name) {
            super(CloudComposer.this, "DELETE", REST_PATH, null, com.google.api.services.composer.v1.model.Empty.class);
            this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
            }
          }

          @Override
          public Delete set$Xgafv(java.lang.String $Xgafv) {
            return (Delete) super.set$Xgafv($Xgafv);
          }

          @Override
          public Delete setAccessToken(java.lang.String accessToken) {
            return (Delete) super.setAccessToken(accessToken);
          }

          @Override
          public Delete setAlt(java.lang.String alt) {
            return (Delete) super.setAlt(alt);
          }

          @Override
          public Delete setCallback(java.lang.String callback) {
            return (Delete) super.setCallback(callback);
          }

          @Override
          public Delete setFields(java.lang.String fields) {
            return (Delete) super.setFields(fields);
          }

          @Override
          public Delete setKey(java.lang.String key) {
            return (Delete) super.setKey(key);
          }

          @Override
          public Delete setOauthToken(java.lang.String oauthToken) {
            return (Delete) super.setOauthToken(oauthToken);
          }

          @Override
          public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (Delete) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public Delete setQuotaUser(java.lang.String quotaUser) {
            return (Delete) super.setQuotaUser(quotaUser);
          }

          @Override
          public Delete setUploadType(java.lang.String uploadType) {
            return (Delete) super.setUploadType(uploadType);
          }

          @Override
          public Delete setUploadProtocol(java.lang.String uploadProtocol) {
            return (Delete) super.setUploadProtocol(uploadProtocol);
          }

          /** The name of the operation resource to be deleted. */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** The name of the operation resource to be deleted.
           */
          public java.lang.String getName() {
            return name;
          }

          /** The name of the operation resource to be deleted. */
          public Delete setName(java.lang.String name) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
            }
            this.name = name;
            return this;
          }

          @Override
          public Delete set(String parameterName, Object value) {
            return (Delete) super.set(parameterName, value);
          }
        }
        /**
         * Gets the latest state of a long-running operation. Clients can use this method to poll the
         * operation result at intervals as recommended by the API service.
         *
         * Create a request for the method "operations.get".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link Get#execute()} method to invoke the remote operation.
         *
         * @param name The name of the operation resource.
         * @return the request
         */
        public Get get(java.lang.String name) throws java.io.IOException {
          Get result = new Get(name);
          initialize(result);
          return result;
        }

        public class Get extends CloudComposerRequest<com.google.api.services.composer.v1.model.Operation> {

          private static final String REST_PATH = "v1/{+name}";

          private final java.util.regex.Pattern NAME_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");

          /**
           * Gets the latest state of a long-running operation. Clients can use this method to poll the
           * operation result at intervals as recommended by the API service.
           *
           * Create a request for the method "operations.get".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

           * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor.

           *
           * @param name The name of the operation resource.
           * @since 1.13
           */
          protected Get(java.lang.String name) {
            super(CloudComposer.this, "GET", REST_PATH, null, com.google.api.services.composer.v1.model.Operation.class);
            this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
            }
          }

          @Override
          public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
            return super.executeUsingHead();
          }

          @Override
          public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
            return super.buildHttpRequestUsingHead();
          }

          @Override
          public Get set$Xgafv(java.lang.String $Xgafv) {
            return (Get) super.set$Xgafv($Xgafv);
          }

          @Override
          public Get setAccessToken(java.lang.String accessToken) {
            return (Get) super.setAccessToken(accessToken);
          }

          @Override
          public Get setAlt(java.lang.String alt) {
            return (Get) super.setAlt(alt);
          }

          @Override
          public Get setCallback(java.lang.String callback) {
            return (Get) super.setCallback(callback);
          }

          @Override
          public Get setFields(java.lang.String fields) {
            return (Get) super.setFields(fields);
          }

          @Override
          public Get setKey(java.lang.String key) {
            return (Get) super.setKey(key);
          }

          @Override
          public Get setOauthToken(java.lang.String oauthToken) {
            return (Get) super.setOauthToken(oauthToken);
          }

          @Override
          public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (Get) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public Get setQuotaUser(java.lang.String quotaUser) {
            return (Get) super.setQuotaUser(quotaUser);
          }

          @Override
          public Get setUploadType(java.lang.String uploadType) {
            return (Get) super.setUploadType(uploadType);
          }

          @Override
          public Get setUploadProtocol(java.lang.String uploadProtocol) {
            return (Get) super.setUploadProtocol(uploadProtocol);
          }

          /** The name of the operation resource. */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** The name of the operation resource.
           */
          public java.lang.String getName() {
            return name;
          }

          /** The name of the operation resource. */
          public Get setName(java.lang.String name) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
            }
            this.name = name;
            return this;
          }

          @Override
          public Get set(String parameterName, Object value) {
            return (Get) super.set(parameterName, value);
          }
        }
        /**
         * Lists operations that match the specified filter in the request. If the server doesn't support
         * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override
         * the binding to use different resource name schemes, such as `users/operations`. To override the
         * binding, API services can add a binding such as `"/v1/{name=users}/operations"` to their service
         * configuration. For backwards compatibility, the default name includes the operations collection
         * id, however overriding users must ensure the name binding is the parent resource, without the
         * operations collection id.
         *
         * Create a request for the method "operations.list".
         *
         * This request holds the parameters needed by the composer server.  After setting any optional
         * parameters, call the {@link List#execute()} method to invoke the remote operation.
         *
         * @param name The name of the operation's parent resource.
         * @return the request
         */
        public List list(java.lang.String name) throws java.io.IOException {
          List result = new List(name);
          initialize(result);
          return result;
        }

        public class List extends CloudComposerRequest<com.google.api.services.composer.v1.model.ListOperationsResponse> {

          private static final String REST_PATH = "v1/{+name}/operations";

          private final java.util.regex.Pattern NAME_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");

          /**
           * Lists operations that match the specified filter in the request. If the server doesn't support
           * this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
           * override the binding to use different resource name schemes, such as `users/operations`. To
           * override the binding, API services can add a binding such as `"/v1/{name=users}/operations"` to
           * their service configuration. For backwards compatibility, the default name includes the
           * operations collection id, however overriding users must ensure the name binding is the parent
           * resource, without the operations collection id.
           *
           * Create a request for the method "operations.list".
           *
           * This request holds the parameters needed by the the composer server.  After setting any
           * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

           * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor.

           *
           * @param name The name of the operation's parent resource.
           * @since 1.13
           */
          protected List(java.lang.String name) {
            super(CloudComposer.this, "GET", REST_PATH, null, com.google.api.services.composer.v1.model.ListOperationsResponse.class);
            this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
          }

          @Override
          public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
            return super.executeUsingHead();
          }

          @Override
          public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
            return super.buildHttpRequestUsingHead();
          }

          @Override
          public List set$Xgafv(java.lang.String $Xgafv) {
            return (List) super.set$Xgafv($Xgafv);
          }

          @Override
          public List setAccessToken(java.lang.String accessToken) {
            return (List) super.setAccessToken(accessToken);
          }

          @Override
          public List setAlt(java.lang.String alt) {
            return (List) super.setAlt(alt);
          }

          @Override
          public List setCallback(java.lang.String callback) {
            return (List) super.setCallback(callback);
          }

          @Override
          public List setFields(java.lang.String fields) {
            return (List) super.setFields(fields);
          }

          @Override
          public List setKey(java.lang.String key) {
            return (List) super.setKey(key);
          }

          @Override
          public List setOauthToken(java.lang.String oauthToken) {
            return (List) super.setOauthToken(oauthToken);
          }

          @Override
          public List setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (List) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public List setQuotaUser(java.lang.String quotaUser) {
            return (List) super.setQuotaUser(quotaUser);
          }

          @Override
          public List setUploadType(java.lang.String uploadType) {
            return (List) super.setUploadType(uploadType);
          }

          @Override
          public List setUploadProtocol(java.lang.String uploadProtocol) {
            return (List) super.setUploadProtocol(uploadProtocol);
          }

          /** The name of the operation's parent resource. */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** The name of the operation's parent resource.
           */
          public java.lang.String getName() {
            return name;
          }

          /** The name of the operation's parent resource. */
          public List setName(java.lang.String name) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                  "Parameter name must conform to the pattern " +
                  "^projects/[^/]+/locations/[^/]+$");
            }
            this.name = name;
            return this;
          }

          /** The standard list filter. */
          @com.google.api.client.util.Key
          private java.lang.String filter;

          /** The standard list filter.
           */
          public java.lang.String getFilter() {
            return filter;
          }

          /** The standard list filter. */
          public List setFilter(java.lang.String filter) {
            this.filter = filter;
            return this;
          }

          /** The standard list page size. */
          @com.google.api.client.util.Key
          private java.lang.Integer pageSize;

          /** The standard list page size.
           */
          public java.lang.Integer getPageSize() {
            return pageSize;
          }

          /** The standard list page size. */
          public List setPageSize(java.lang.Integer pageSize) {
            this.pageSize = pageSize;
            return this;
          }

          /** The standard list page token. */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** The standard list page token.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /** The standard list page token. */
          public List setPageToken(java.lang.String pageToken) {
            this.pageToken = pageToken;
            return this;
          }

          @Override
          public List set(String parameterName, Object value) {
            return (List) super.set(parameterName, value);
          }
        }

      }
    }
  }

  /**
   * Builder for {@link CloudComposer}.
   *
   *

   * Implementation is not thread-safe.
   *

   *
   * @since 1.3.0
   */
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    /**
     * Returns an instance of a new builder.
     *
     * @param transport HTTP transport, which should normally be:
     *

     *
Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}

     *
Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}

     *
Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *

     *

     * @param jsonFactory JSON factory, which may be:
     *

     *
Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}

     *
Google GSON: {@code com.google.api.client.json.gson.GsonFactory}

     *
Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}

     *

     * @param httpRequestInitializer HTTP request initializer or {@code null} for none
     * @since 1.7
     */
    public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
        com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      super(
          transport,
          jsonFactory,
          DEFAULT_ROOT_URL,
          DEFAULT_SERVICE_PATH,
          httpRequestInitializer,
          false);
      setBatchPath(DEFAULT_BATCH_PATH);
    }

    /** Builds a new instance of {@link CloudComposer}. */
    @Override
    public CloudComposer build() {
      return new CloudComposer(this);
    }

    @Override
    public Builder setRootUrl(String rootUrl) {
      return (Builder) super.setRootUrl(rootUrl);
    }

    @Override
    public Builder setServicePath(String servicePath) {
      return (Builder) super.setServicePath(servicePath);
    }

    @Override
    public Builder setBatchPath(String batchPath) {
      return (Builder) super.setBatchPath(batchPath);
    }

    @Override
    public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
    }

    @Override
    public Builder setApplicationName(String applicationName) {
      return (Builder) super.setApplicationName(applicationName);
    }

    @Override
    public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
      return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
    }

    @Override
    public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
      return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
    }

    @Override
    public Builder setSuppressAllChecks(boolean suppressAllChecks) {
      return (Builder) super.setSuppressAllChecks(suppressAllChecks);
    }

    /**
     * Set the {@link CloudComposerRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setCloudComposerRequestInitializer(
        CloudComposerRequestInitializer cloudcomposerRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(cloudcomposerRequestInitializer);
    }

    @Override
    public Builder setGoogleClientRequestInitializer(
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
}


text:
Scopes
======

.. _scope-reason-label:

Why should use scope?
---------------------

In a general unittest, the test function will import other classes or modules and test them. However, there are some exceptional possibilities for testing functions in the same module/class/function level.

**For example**

.. code-block:: python

    import sinon

    def a_function_of_test():
        pass

    def test_func():

        spy = sinon.spy(a_function_of_test)
        assert not spy.called
        a_function_of_test()
        assert spy.called

    test_func()

In this case, a_function_of_test is not wrapped successfully. Because the scope is not able to be inspected.

.. code-block:: shell

    AttributeError: 'NoneType' object has no attribute 'a_function_of_test'

.. _scope-label:

Scope API
---------

**sinon.init(scope)**

For getting a inspectable scope, passing globals()/locals() as an argument into .init()

For inspecting the function, using the return scope to call the inspected function instead of calling original function directly.

**Example1: globals()**

.. code-block:: python

    import sinon

    def a_global_function_in_test():
        pass

    def test_func():
        scope = sinon.init(globals())
        spy = sinon.spy(a_global_function_in_test)
        assert not spy.called
        scope.a_global_function_in_test()
        assert spy.called

    test_func()

**Example2: locals()**

.. code-block:: python

    import sinon

    def test_func():

        def a_local_function_in_test():
            pass

        scope = sinon.init(locals())
        spy = sinon.spy(a_local_function_in_test)
        assert not spy.called
        scope.a_local_function_in_test()
        assert spy.called

    test_func()

redpajama_set_name: RedPajamaGithub


text:
CREATE TABLE IF NOT EXISTS `add_delete_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


text:
var do_Page=sm("do_Page");
var do_App=sm("do_App");
var do_Notification = sm("do_Notification");
var do_Global = sm("do_Global")
var do_Storage =sm("do_Storage")
var do_Button_open = ui("do_Button_open")
var rootview = ui("$");
var qq_view = ui(rootview.add("qq_view", "source://view/qq/qq_view.ui", 0, 0));

var do_ALayout_back = ui("do_ALayout_back")
do_ALayout_back.on("touch", function(data) {
	do_App.closePage();
});

do_Page.on("back", function() { // 监听android 的返回按钮;
	do_App.closePage();
});

do_Page.supportPanClosePage({support:"true"})

var uitools = require("uitools");
uitools.setButtonStyle(do_Button_open);

do_Button_open.on("touch",function(){
	qq_view.visible = true
})


text:
package mcjty.rftools.api.screens.data;

/**
 * A string.
 */
public interface IModuleDataString extends IModuleData {
    String get();
}


text:
import os
import platform
from setuptools import setup, Extension, find_packages

top_dir = os.path.dirname(os.path.realpath(__file__))
inc_dir = os.path.join(top_dir, "include")
lib_dir = os.path.join(top_dir, "lib")
libcrm114_obj = [
    os.path.join(top_dir, "lib", f) for f in (
        "crm114_base.c",
        "crm114_markov.c",
        "crm114_markov_microgroom.c",
        "crm114_bit_entropy.c",
        "crm114_hyperspace.c",
        "crm114_svm.c",
        "crm114_svm_lib_fncts.c",
        "crm114_svm_quad_prog.c",
        "crm114_fast_substring_compression.c",
        "crm114_pca.c",
        "crm114_pca_lib_fncts.c",
        "crm114_matrix.c",
        "crm114_matrix_util.c",
        "crm114_datalib.c",
        "crm114_vector_tokenize.c",
        "crm114_strnhash.c",
        "crm114_util.c",
        "crm114_regex_tre.c",
    )
]
if platform.uname()[0] in ['Darwin', 'BSD']:
    libcrm114_obj.insert(0, 'lib/memstream.c')
    libcrm114_obj.insert(0, 'lib/fmemopen.c')

pycrm114_module = Extension('pycrm114._binding',
                            sources=libcrm114_obj + ['pycrm114/pycrm114_module.c'],
                            include_dirs=[inc_dir],
                            library_dirs=[lib_dir],
                            runtime_library_dirs=[lib_dir],
                            libraries=['tre'],
                            extra_compile_args=['-std=c99', '-g', '-pedantic', '-Wall', '-Wextra', '-Wpointer-arith',
                                                '-Wstrict-prototypes', '-fpic'])

requirements = filter(None, open(
    os.path.join(top_dir, 'requirements', 'main.txt')).read().splitlines())

import versioneer

versioneer.versionfile_source = "pycrm114/_version.py"
versioneer.versionfile_build = "pycrm114/version.py"
versioneer.tag_prefix = ""
versioneer.parentdir_prefix = "pycrm114-"

setup(
    name='pycrm114',
    version=versioneer.get_version(),
    description='Python interface to libcrm114',
    long_description=open('README.rst').read() + open('HISTORY.rst').read(),
    author='Prashanth Mundkur',
    author_email='prashanth.mundkur at gmail.com',
    maintainer='Ali-Akber Saifee',
    maintainer_email='ali at indydevs.org',
    url='https://github.com/alisaifee/pycrm114',
    license=open('LICENSE.txt').read(),
    classifiers=[k for k in open('CLASSIFIERS').read().split('\n') if k],
    install_requires=requirements,
    ext_modules=[pycrm114_module],
    packages=find_packages(exclude=["tests*"]),
    cmdclass=versioneer.get_cmdclass(),
)


text:
/**
 * Automatically generated file. DO NOT MODIFY
 */
package org.videolan.vlc;

public final class BuildConfig {
  public static final boolean DEBUG = Boolean.parseBoolean("true");
  public static final String APPLICATION_ID = "org.videolan.vlc.debug";
  public static final String BUILD_TYPE = "debug";
  public static final String FLAVOR = "vanillaX86";
  public static final int VERSION_CODE = 5;
  public static final String VERSION_NAME = "1.7.0";
  public static final String FLAVOR_target = "vanilla";
  public static final String FLAVOR_abi = "x86";
  // Fields from product flavor: vanilla
  public static final boolean tv = false;
}


text:
Javascript Accelerated
======================
This course is about familiarizing seasoned object oriented engineers to the JavaScript Language. After this day
developers should feel comfortable creating and debugging simple Javascript applications that load and save data.

Topics
------
* JS and ECMA History
* Primitives, Objects, Gotchas
* Array Challenges
* Frameworks
* Data
* Loading the NFL
* Advanced Functions
* Debugging
* Building an Alarm Clock

Samples
-------

### Primitives and Gotchas

* [object dot notation](http://jsbin.com/apazef/3/edit?js,output)
* [object literal notation](http://jsbin.com/apazef/4/edit?js,output)
* [regular expressions](http://jsbin.com/miqu/1/edit?js,console)

### Frameworks

* [CDN JS](https://cdnjs.com/)
* [CSS 3 Selectors, hide, show](http://www.w3schools.com/cssref/css_selectors.asp)
* [jQuery pub/sub](http://jsbin.com/iwenul/1/edit?js,output)

### Data

* [XHR and CORS](http://jsbin.com/rilisu/1/edit?js,console)
* [JQUERY Data (1-7)](http://jsbin.com/xobe/1/edit?js,console)
* [JSONP](http://jsbin.com/xobe/8/edit?js,console)
* [Response Codes](http://www.restapitutorial.com/httpstatuscodes.html)
* [d3.json](http://jsbin.com/cosumi/1/edit?js,console)
* [FillText.com](http://jsbin.com/hiyemo/1/edit?output)
* [Webstorage (1 -3)](http://jsbin.com/duwe/1/edit?js,console)

### Advanced Functions

* [Functions (1-11)](http://jsbin.com/nexi/1/edit?js,console)
* [Closures (1, 2)](http://jsbin.com/fibud/1/edit?js,output)
* [**this** scope](http://jsbin.com/OVelUYAb/7/edit?js,console)
* [Binding Functions (1-5)](http://jsbin.com/lumuge/1/edit?js,console)
* [modules](http://jsbin.com/gozim/1/edit?js,console,output)
* [Currying](http://jsbin.com/lumuge/6/edit?js,console)
* [Chaining](http://jsbin.com/lumuge/7/edit?js,console)

### Alarm Clock

* [start](http://jsbin.com/jiwuya/1/edit?js,output)


text:
This simple setup is intended to enable [Java gRPC](https://github.com/grpc/grpc-java) users or those interested
in starting up with gRPC to have a nice working environment.

One of the challenges of getting started with gRPC is that at present
the documentation is a little behind the available feature set as well as
on-boarding with gradle is not straight forward.  This repo is designed to help
with both issues.

1. You can fork over this repo and just start developing your service using the gradle build setup provided here
2. If you are interested in seeing an end-to-end protos, server, and client worked out example its available here as well

The example in this code is designed to simulate a few different scenarios and is somewhat explicitly not a "Hello World"
example.  The server here even acts as a client back to itself as part of the flows and even on occasion
intentionally fails.  Beginning with this setup you should be able to get your gRPC service working rather quickly.

There is also the ability to build a docker container.  This specific functionality sits in a separate
project, and is thus independent of the other projects.  There is one key requirement though, that docker as a runtime
environment along with the various docker commands needs to available on the host where this is being executed and built.

For quick reference, if you were to fork this service over or clone it, you can build and run with the following commands:
```bash
  > gradle :my_service:run  # will run the server, listening on port 8123
  > gradle :my_service_client:run  # will run the client which will execute a bunch of requests against the server
  > gradle :my_service:test  # will build and "test" the service, although there are no tests written at present
  > gradle :my_service_docker:distDocker  # will build the :my_service service and package it up as a docker image
                                          # it requires that the docker runtime environment and the associated
                                          # commands be installed and available
```
If you are interested in helping to improve this overall setup, maybe turn it into a plugin, please don't hesitate and sendover a pull request.


text:
This document is still being written, feel free to open an issue to discuss any aspect of confusion in the project.

## Packages

## Lerna Usage

### Running tests

```bash
$ npm run lerna:test
```

### Bootstrapping the packages

```bash
$ npm run lerna:bootstrap
```

### Installing a new package

```bash
$ npm run lerna:install -- <package-name> --scope=<target-package>
```


text:
SELECT type, repository_url, actor
  FROM [githubarchive:github.timeline]
  WHERE
    type="PushEvent"
    AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC("2013-11-01 00:00:00")
    AND PARSE_UTC_USEC(created_at) < PARSE_UTC_USEC("2013-12-01 00:00:00")
    AND repository_language="Ruby"
  GROUP EACH BY type, repository_url, actor


text:
package net.lightoze.jooq.postgresql.guava;

import com.google.common.collect.Range;

import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;

public class InstantRangeBinding extends AbstractRangeBinding<Instant> {

    private static final Range<Instant> EMPTY = Range.openClosed(Instant.EPOCH, Instant.EPOCH);
    private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder()
            .appendLiteral('"')
            .append(DateTimeFormatter.ISO_LOCAL_DATE)
            .appendLiteral(' ')
            .append(DateTimeFormatter.ISO_LOCAL_TIME)
            .appendOffset("+HH:mm", "Z")
            .appendLiteral('"')
            .parseStrict()
            .toFormatter();

    public InstantRangeBinding() {
        super("tstzrange");
    }

    @Override
    protected Range<Instant> getEmpty() {
        return EMPTY;
    }

    @Override
    protected Instant parse(String text) {
        return OffsetDateTime.parse(text, FORMATTER).toInstant();
    }

    @Override
    protected String format(Instant value) {
        return FORMATTER.format(value.atZone(ZoneId.systemDefault()));
    }
}


text:
import unittest
import dreambox
from time import sleep

sleep_time = 4
box = dreambox.Receiver()
box.power_control(4)
box.goto_channel(17)

print('Sleeping  for {0} seconds'.format(sleep_time))
sleep(sleep_time)

# box.change_audio_channel(0)
# surl = box.stream_curent_channel()

class TestDreambox(unittest.TestCase):

    def test_00_goto_channel(self):
        expected = None
        result = box.goto_channel(17)
        self.assertEqual(expected, result)

    def test_01_get_current(self):
        expected = ('TVN Turbo HD', 'TVN', '1920x1080')
        result = box.get_current()
        self.assertEqual(expected, result[0:3])

    def test_02_get_current_channel(self):
        expected = "TVN Turbo HD"
        result = box.get_current_channel()
        self.assertEqual(expected, result)

    def test_03_get_timerlist_for_no_timer(self):
        expected = ('NONE', 'NONE', 'NONE', 'NONE', 'NONE', 'NONE')
        result = box.get_timerlist()
        self.assertEqual(expected, result)

    def test_04_volume_set(self):
        expected = ('True', '100', 'False')
        result = box.volume_set("100")
        self.assertEqual(expected, result)

    def test_05_volume_down(self):
        expected = None
        result = box.volume_down()
        self.assertEqual(expected, result)

    def test_06_get_audio_status_95(self):
        expected = ('True', '95', 'False')
        result = box.get_audio_status()
        self.assertEqual(expected, result)

    def test_07_volume_up(self):
        expected = None
        result = box.volume_up()
        self.assertEqual(expected, result)

    def test_08_get_audio_status_100(self):
        expected = ('True', '100', 'False')
        result = box.get_audio_status()
        self.assertEqual(expected, result)

    # def test_09_power(self):
    #     expect = None
    #     result = box.power()
    #     self.assertEqual(expect, result)

    def test_10_stream_channel(self):
        expect = "name=TVN%20Turbo%20HD"
        result = box.stream_curent_channel()
        self.assertIn(expect, result)

    def test_11_list_record(self):
        expect = "Chemia"
        result = box.recording_list()
        self.assertIn(expect, result)

    def test_12_get_timerlist(self):
        expect = ('NONE', 'NONE', 'NONE', 'NONE', 'NONE', 'NONE')
        result = box.get_timerlist()
        self.assertEqual(expect, result)

    def test_13_power_already_off(self):
        expect = "Dreambox is off"
        result = box.power_control(5)
        self.assertEqual(expect, result)

    def test_14_power_on(self):
        expect = "Dreambox is now on"
        result = box.power_control(4)
        self.assertEqual(expect, result)

    def test_15_power_already_on(self):
        expect = "Dreambox is alerady on"
        result = box.power_control(4)
        self.assertEqual(expect, result)

    def test_16_power_off(self):
        expect = "Dreambox is off"
        result = box.power_control(5)
        self.assertEqual(expect, result)

    def test_17_power_on(self):
        expect = "Dreambox is now on"
        result = box.power_control(4)
        self.assertEqual(expect, result)

    def test_18_channel_up(self):
        expect = True
        result = box.right()
        self.assertEqual(expect, result)

    def test_19_get_current_after_change(self):
        expected = ('TVN Style HD', 'TVN', '1920x1080')
        result = box.get_current()
        self.assertEqual(expected, result[0:3])

    def test_20_record_now(self):
        expect = ('True', 'Instant record for current Event started')
        result = box.record_now()
        self.assertEqual(expect, result)

    def test_21_get_timerlist(self):
        expect = "TVN Style HD"
        global e2servicereference
        global e2timebegin
        global e2timeend
        e2servicereference, e2servicename, e2name, e2timebegin, e2timeend, e2duration = box.get_timerlist()
        self.assertIn(expect, e2servicename)
        return e2servicereference, e2servicename, e2name, e2timebegin, e2timeend, e2duration

    def test_22_del_timer(self):
        expect = "True"
        result = box.del_timer(e2servicereference, e2timebegin, e2timeend)
        self.assertEqual(expect, result[0])

    def test_23_del_timer_empty(self):
        expect = "False"
        result = box.del_timer(e2servicereference, e2timebegin, e2timeend)
        self.assertEqual(expect, result[0])