/*
 * 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.osconfig.v1;

/**
 * Service definition for OSConfig (v1).
 *
 * <p>
 * OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.
 * </p>
 *
 * <p>
 * For more information about this service, see the
 * <a href="https://cloud.google.com/compute/docs/osconfig/rest" target="_blank">API Documentation</a>
 * </p>
 *
 * <p>
 * This service uses {@link OSConfigRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 * </p>
 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class OSConfig 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 >= 32 ||
        (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 &&
        com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)),
        "You are currently running with version %s of google-api-client. " +
        "You need at least version 1.31.1 of google-api-client to run version " +
        "1.32.1 of the OS Config 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://osconfig.googleapis.com/";

  /**
   * The default encoded mTLS root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.31
   */
  public static final String DEFAULT_MTLS_ROOT_URL = "https://osconfig.mtls.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.
   *
   * <p>
   * Use {@link Builder} if you need to specify any of the optional parameters.
   * </p>
   *
   * @param transport HTTP transport, which should normally be:
   *        <ul>
   *        <li>Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
   *        <li>Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
   *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *        </li>
   *        </ul>
   * @param jsonFactory JSON factory, which may be:
   *        <ul>
   *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
   *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
   *        <li>Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
   *        </ul>
   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public OSConfig(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
   */
  OSConfig(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.
   *
   * <p>The typical use is:</p>
   * <pre>
   *   {@code OSConfig osconfig = new OSConfig(...);}
   *   {@code OSConfig.Projects.List request = osconfig.projects().list(parameters ...)}
   * </pre>
   *
   * @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.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code OSConfig osconfig = new OSConfig(...);}
     *   {@code OSConfig.Locations.List request = osconfig.locations().list(parameters ...)}
     * </pre>
     *
     * @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 Instances collection.
       *
       * <p>The typical use is:</p>
       * <pre>
       *   {@code OSConfig osconfig = new OSConfig(...);}
       *   {@code OSConfig.Instances.List request = osconfig.instances().list(parameters ...)}
       * </pre>
       *
       * @return the resource collection
       */
      public Instances instances() {
        return new Instances();
      }

      /**
       * The "instances" collection of methods.
       */
      public class Instances {

        /**
         * An accessor for creating requests from the Inventories collection.
         *
         * <p>The typical use is:</p>
         * <pre>
         *   {@code OSConfig osconfig = new OSConfig(...);}
         *   {@code OSConfig.Inventories.List request = osconfig.inventories().list(parameters ...)}
         * </pre>
         *
         * @return the resource collection
         */
        public Inventories inventories() {
          return new Inventories();
        }

        /**
         * The "inventories" collection of methods.
         */
        public class Inventories {

          /**
           * Get inventory data for the specified VM instance. If the VM has no associated inventory, the
           * message `NOT_FOUND` is returned.
           *
           * Create a request for the method "inventories.get".
           *
           * This request holds the parameters needed by the osconfig server.  After setting any optional
           * parameters, call the {@link Get#execute()} method to invoke the remote operation.
           *
           * @param name Required. API resource name for inventory resource. Format:
           *        `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`,
           *        either `project-number` or `project-id` can be provided. For `{instance}`, either Compute
           *        Engine `instance-id` or `instance-name` can be provided.
           * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.Inventory> {

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

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

            /**
             * Get inventory data for the specified VM instance. If the VM has no associated inventory, the
             * message `NOT_FOUND` is returned.
             *
             * Create a request for the method "inventories.get".
             *
             * This request holds the parameters needed by the the osconfig server.  After setting any
             * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
             * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
             * must be called to initialize this instance immediately after invoking the constructor. </p>
             *
             * @param name Required. API resource name for inventory resource. Format:
           *        `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`,
           *        either `project-number` or `project-id` can be provided. For `{instance}`, either Compute
           *        Engine `instance-id` or `instance-name` can be provided.
             * @since 1.13
             */
            protected Get(java.lang.String name) {
              super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.Inventory.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/[^/]+/instances/[^/]+/inventory$");
              }
            }

            @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);
            }

            /**
             * Required. API resource name for inventory resource. Format:
             * `projects/{project}/locations/{location}/instances/{instance}/inventory` For
             * `{project}`, either `project-number` or `project-id` can be provided. For
             * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.
             */
            @com.google.api.client.util.Key
            private java.lang.String name;

            /** Required. API resource name for inventory resource. Format:
           `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`, either
           `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine
           `instance-id` or `instance-name` can be provided.
             */
            public java.lang.String getName() {
              return name;
            }

            /**
             * Required. API resource name for inventory resource. Format:
             * `projects/{project}/locations/{location}/instances/{instance}/inventory` For
             * `{project}`, either `project-number` or `project-id` can be provided. For
             * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.
             */
            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/[^/]+/instances/[^/]+/inventory$");
              }
              this.name = name;
              return this;
            }

            /**
             * Inventory view indicating what information should be included in the inventory
             * resource. If unspecified, the default view is BASIC.
             */
            @com.google.api.client.util.Key
            private java.lang.String view;

            /** Inventory view indicating what information should be included in the inventory resource. If
           unspecified, the default view is BASIC.
             */
            public java.lang.String getView() {
              return view;
            }

            /**
             * Inventory view indicating what information should be included in the inventory
             * resource. If unspecified, the default view is BASIC.
             */
            public Get setView(java.lang.String view) {
              this.view = view;
              return this;
            }

            @Override
            public Get set(String parameterName, Object value) {
              return (Get) super.set(parameterName, value);
            }
          }
          /**
           * List inventory data for all VM instances in the specified zone.
           *
           * Create a request for the method "inventories.list".
           *
           * This request holds the parameters needed by the osconfig server.  After setting any optional
           * parameters, call the {@link List#execute()} method to invoke the remote operation.
           *
           * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-`
           *        For `{project}`, either `project-number` or `project-id` can be provided.
           * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListInventoriesResponse> {

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

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

            /**
             * List inventory data for all VM instances in the specified zone.
             *
             * Create a request for the method "inventories.list".
             *
             * This request holds the parameters needed by the the osconfig server.  After setting any
             * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
             * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
             * must be called to initialize this instance immediately after invoking the constructor. </p>
             *
             * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-`
           *        For `{project}`, either `project-number` or `project-id` can be provided.
             * @since 1.13
             */
            protected List(java.lang.String parent) {
              super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListInventoriesResponse.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/[^/]+/instances/[^/]+$");
              }
            }

            @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);
            }

            /**
             * Required. The parent resource name. Format:
             * `projects/{project}/locations/{location}/instances/-` For `{project}`, either
             * `project-number` or `project-id` can be provided.
             */
            @com.google.api.client.util.Key
            private java.lang.String parent;

            /** Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-`
           For `{project}`, either `project-number` or `project-id` can be provided.
             */
            public java.lang.String getParent() {
              return parent;
            }

            /**
             * Required. The parent resource name. Format:
             * `projects/{project}/locations/{location}/instances/-` For `{project}`, either
             * `project-number` or `project-id` can be provided.
             */
            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/[^/]+/instances/[^/]+$");
              }
              this.parent = parent;
              return this;
            }

            /**
             * If provided, this field specifies the criteria that must be met by a `Inventory` API
             * resource to be included in the response.
             */
            @com.google.api.client.util.Key
            private java.lang.String filter;

            /** If provided, this field specifies the criteria that must be met by a `Inventory` API resource to be
           included in the response.
             */
            public java.lang.String getFilter() {
              return filter;
            }

            /**
             * If provided, this field specifies the criteria that must be met by a `Inventory` API
             * resource to be included in the response.
             */
            public List setFilter(java.lang.String filter) {
              this.filter = filter;
              return this;
            }

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

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

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

            /**
             * A pagination token returned from a previous call to `ListInventories` that indicates
             * where this listing should continue from.
             */
            @com.google.api.client.util.Key
            private java.lang.String pageToken;

            /** A pagination token returned from a previous call to `ListInventories` that indicates where this
           listing should continue from.
             */
            public java.lang.String getPageToken() {
              return pageToken;
            }

            /**
             * A pagination token returned from a previous call to `ListInventories` that indicates
             * where this listing should continue from.
             */
            public List setPageToken(java.lang.String pageToken) {
              this.pageToken = pageToken;
              return this;
            }

            /**
             * Inventory view indicating what information should be included in the inventory
             * resource. If unspecified, the default view is BASIC.
             */
            @com.google.api.client.util.Key
            private java.lang.String view;

            /** Inventory view indicating what information should be included in the inventory resource. If
           unspecified, the default view is BASIC.
             */
            public java.lang.String getView() {
              return view;
            }

            /**
             * Inventory view indicating what information should be included in the inventory
             * resource. If unspecified, the default view is BASIC.
             */
            public List setView(java.lang.String view) {
              this.view = view;
              return this;
            }

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

        }
        /**
         * An accessor for creating requests from the OsPolicyAssignments collection.
         *
         * <p>The typical use is:</p>
         * <pre>
         *   {@code OSConfig osconfig = new OSConfig(...);}
         *   {@code OSConfig.OsPolicyAssignments.List request = osconfig.osPolicyAssignments().list(parameters ...)}
         * </pre>
         *
         * @return the resource collection
         */
        public OsPolicyAssignments osPolicyAssignments() {
          return new OsPolicyAssignments();
        }

        /**
         * The "osPolicyAssignments" collection of methods.
         */
        public class OsPolicyAssignments {

          /**
           * An accessor for creating requests from the Reports collection.
           *
           * <p>The typical use is:</p>
           * <pre>
           *   {@code OSConfig osconfig = new OSConfig(...);}
           *   {@code OSConfig.Reports.List request = osconfig.reports().list(parameters ...)}
           * </pre>
           *
           * @return the resource collection
           */
          public Reports reports() {
            return new Reports();
          }

          /**
           * The "reports" collection of methods.
           */
          public class Reports {

            /**
             * Get the OS policy asssignment report for the specified Compute Engine VM instance.
             *
             * Create a request for the method "reports.get".
             *
             * This request holds the parameters needed by the osconfig server.  After setting any optional
             * parameters, call the {@link Get#execute()} method to invoke the remote operation.
             *
             * @param name Required. API resource name for OS policy assignment report. Format: `/projects/{project}/locations/
             *        {location}/instances/{instance}/osPolicyAssignments/{assignment}/report` For `{project}`,
             *        either `project-number` or `project-id` can be provided. For `{instance_id}`, either
             *        Compute Engine `instance-id` or `instance-name` can be provided. For `{assignment_id}`,
             *        the OSPolicyAssignment id must be provided.
             * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.OSPolicyAssignmentReport> {

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

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

              /**
               * Get the OS policy asssignment report for the specified Compute Engine VM instance.
               *
               * Create a request for the method "reports.get".
               *
               * This request holds the parameters needed by the the osconfig server.  After setting any
               * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
               * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
               * must be called to initialize this instance immediately after invoking the constructor. </p>
               *
               * @param name Required. API resource name for OS policy assignment report. Format: `/projects/{project}/locations/
             *        {location}/instances/{instance}/osPolicyAssignments/{assignment}/report` For `{project}`,
             *        either `project-number` or `project-id` can be provided. For `{instance_id}`, either
             *        Compute Engine `instance-id` or `instance-name` can be provided. For `{assignment_id}`,
             *        the OSPolicyAssignment id must be provided.
               * @since 1.13
               */
              protected Get(java.lang.String name) {
                super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.OSPolicyAssignmentReport.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/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+/report$");
                }
              }

              @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);
              }

              /**
               * Required. API resource name for OS policy assignment report. Format: `/projects/{pr
               * oject}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/r
               * eport` For `{project}`, either `project-number` or `project-id` can be provided.
               * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be
               * provided. For `{assignment_id}`, the OSPolicyAssignment id must be provided.
               */
              @com.google.api.client.util.Key
              private java.lang.String name;

              /** Required. API resource name for OS policy assignment report. Format: `/projects/{project}/locations
             /{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` For `{project}`, either
             `project-number` or `project-id` can be provided. For `{instance_id}`, either Compute Engine
             `instance-id` or `instance-name` can be provided. For `{assignment_id}`, the OSPolicyAssignment id
             must be provided.
               */
              public java.lang.String getName() {
                return name;
              }

              /**
               * Required. API resource name for OS policy assignment report. Format: `/projects/{pr
               * oject}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/r
               * eport` For `{project}`, either `project-number` or `project-id` can be provided.
               * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be
               * provided. For `{assignment_id}`, the OSPolicyAssignment id must be provided.
               */
              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/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+/report$");
                }
                this.name = name;
                return this;
              }

              @Override
              public Get set(String parameterName, Object value) {
                return (Get) super.set(parameterName, value);
              }
            }
            /**
             * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.
             *
             * Create a request for the method "reports.list".
             *
             * This request holds the parameters needed by the osconfig server.  After setting any optional
             * parameters, call the {@link List#execute()} method to invoke the remote operation.
             *
             * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/{inst
             *        ance}/osPolicyAssignments/{assignment}/reports` For `{project}`, either `project-number`
             *        or `project-id` can be provided. For `{instance}`, either `instance-name`, `instance-id`,
             *        or `-` can be provided. If '-' is provided, the response will include
             *        OSPolicyAssignmentReports for all instances in the project/location. For `{assignment}`,
             *        either `assignment-id` or `-` can be provided. If '-' is provided, the response will
             *        include OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location.
             *        Either {instance} or {assignment} must be `-`. For example: `projects/{project}/locations/
             *        {location}/instances/{instance}/osPolicyAssignments/-/reports` returns all reports for the
             *        instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments
             *        /{assignment-id}/reports` returns all the reports for the given assignment across all
             *        instances.
             *        `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
             *        returns all the reports for all assignments across all instances.
             * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListOSPolicyAssignmentReportsResponse> {

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

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

              /**
               * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.
               *
               * Create a request for the method "reports.list".
               *
               * This request holds the parameters needed by the the osconfig server.  After setting any
               * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
               * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
               * must be called to initialize this instance immediately after invoking the constructor. </p>
               *
               * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/{inst
             *        ance}/osPolicyAssignments/{assignment}/reports` For `{project}`, either `project-number`
             *        or `project-id` can be provided. For `{instance}`, either `instance-name`, `instance-id`,
             *        or `-` can be provided. If '-' is provided, the response will include
             *        OSPolicyAssignmentReports for all instances in the project/location. For `{assignment}`,
             *        either `assignment-id` or `-` can be provided. If '-' is provided, the response will
             *        include OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location.
             *        Either {instance} or {assignment} must be `-`. For example: `projects/{project}/locations/
             *        {location}/instances/{instance}/osPolicyAssignments/-/reports` returns all reports for the
             *        instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments
             *        /{assignment-id}/reports` returns all the reports for the given assignment across all
             *        instances.
             *        `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
             *        returns all the reports for all assignments across all instances.
               * @since 1.13
               */
              protected List(java.lang.String parent) {
                super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListOSPolicyAssignmentReportsResponse.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/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+$");
                }
              }

              @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);
              }

              /**
               * Required. The parent resource name. Format: `projects/{project}/locations/{location
               * }/instances/{instance}/osPolicyAssignments/{assignment}/reports` For `{project}`,
               * either `project-number` or `project-id` can be provided. For `{instance}`, either
               * `instance-name`, `instance-id`, or `-` can be provided. If '-' is provided, the
               * response will include OSPolicyAssignmentReports for all instances in the
               * project/location. For `{assignment}`, either `assignment-id` or `-` can be
               * provided. If '-' is provided, the response will include OSPolicyAssignmentReports
               * for all OSPolicyAssignments in the project/location. Either {instance} or
               * {assignment} must be `-`. For example: `projects/{project}/locations/{location}/ins
               * tances/{instance}/osPolicyAssignments/-/reports` returns all reports for the
               * instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments
               * /{assignment-id}/reports` returns all the reports for the given assignment across
               * all instances.
               * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
               * returns all the reports for all assignments across all instances.
               */
              @com.google.api.client.util.Key
              private java.lang.String parent;

              /** Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/{ins
             tance}/osPolicyAssignments/{assignment}/reports` For `{project}`, either `project-number` or
             `project-id` can be provided. For `{instance}`, either `instance-name`, `instance-id`, or `-` can
             be provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all
             instances in the project/location. For `{assignment}`, either `assignment-id` or `-` can be
             provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all
             OSPolicyAssignments in the project/location. Either {instance} or {assignment} must be `-`. For
             example:
             `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
             returns all reports for the instance
             `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
             returns all the reports for the given assignment across all instances.
             `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` returns all the
             reports for all assignments across all instances.
               */
              public java.lang.String getParent() {
                return parent;
              }

              /**
               * Required. The parent resource name. Format: `projects/{project}/locations/{location
               * }/instances/{instance}/osPolicyAssignments/{assignment}/reports` For `{project}`,
               * either `project-number` or `project-id` can be provided. For `{instance}`, either
               * `instance-name`, `instance-id`, or `-` can be provided. If '-' is provided, the
               * response will include OSPolicyAssignmentReports for all instances in the
               * project/location. For `{assignment}`, either `assignment-id` or `-` can be
               * provided. If '-' is provided, the response will include OSPolicyAssignmentReports
               * for all OSPolicyAssignments in the project/location. Either {instance} or
               * {assignment} must be `-`. For example: `projects/{project}/locations/{location}/ins
               * tances/{instance}/osPolicyAssignments/-/reports` returns all reports for the
               * instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments
               * /{assignment-id}/reports` returns all the reports for the given assignment across
               * all instances.
               * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
               * returns all the reports for all assignments across all instances.
               */
              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/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+$");
                }
                this.parent = parent;
                return this;
              }

              /**
               * If provided, this field specifies the criteria that must be met by the
               * `OSPolicyAssignmentReport` API resource that is included in the response.
               */
              @com.google.api.client.util.Key
              private java.lang.String filter;

              /** If provided, this field specifies the criteria that must be met by the `OSPolicyAssignmentReport`
             API resource that is included in the response.
               */
              public java.lang.String getFilter() {
                return filter;
              }

              /**
               * If provided, this field specifies the criteria that must be met by the
               * `OSPolicyAssignmentReport` API resource that is included in the response.
               */
              public List setFilter(java.lang.String filter) {
                this.filter = filter;
                return this;
              }

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

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

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

              /**
               * A pagination token returned from a previous call to the
               * `ListOSPolicyAssignmentReports` method that indicates where this listing should
               * continue from.
               */
              @com.google.api.client.util.Key
              private java.lang.String pageToken;

              /** A pagination token returned from a previous call to the `ListOSPolicyAssignmentReports` method that
             indicates where this listing should continue from.
               */
              public java.lang.String getPageToken() {
                return pageToken;
              }

              /**
               * A pagination token returned from a previous call to the
               * `ListOSPolicyAssignmentReports` method that indicates where this listing should
               * continue from.
               */
              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 VulnerabilityReports collection.
         *
         * <p>The typical use is:</p>
         * <pre>
         *   {@code OSConfig osconfig = new OSConfig(...);}
         *   {@code OSConfig.VulnerabilityReports.List request = osconfig.vulnerabilityReports().list(parameters ...)}
         * </pre>
         *
         * @return the resource collection
         */
        public VulnerabilityReports vulnerabilityReports() {
          return new VulnerabilityReports();
        }

        /**
         * The "vulnerabilityReports" collection of methods.
         */
        public class VulnerabilityReports {

          /**
           * Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have
           * vulnerability reports associated with them.
           *
           * Create a request for the method "vulnerabilityReports.get".
           *
           * This request holds the parameters needed by the osconfig server.  After setting any optional
           * parameters, call the {@link Get#execute()} method to invoke the remote operation.
           *
           * @param name Required. API resource name for vulnerability resource. Format:
           *        `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` For
           *        `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`,
           *        either Compute Engine `instance-id` or `instance-name` can be provided.
           * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.VulnerabilityReport> {

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

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

            /**
             * Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have
             * vulnerability reports associated with them.
             *
             * Create a request for the method "vulnerabilityReports.get".
             *
             * This request holds the parameters needed by the the osconfig server.  After setting any
             * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
             * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
             * must be called to initialize this instance immediately after invoking the constructor. </p>
             *
             * @param name Required. API resource name for vulnerability resource. Format:
           *        `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` For
           *        `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`,
           *        either Compute Engine `instance-id` or `instance-name` can be provided.
             * @since 1.13
             */
            protected Get(java.lang.String name) {
              super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.VulnerabilityReport.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/[^/]+/instances/[^/]+/vulnerabilityReport$");
              }
            }

            @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);
            }

            /**
             * Required. API resource name for vulnerability resource. Format:
             * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
             * For `{project}`, either `project-number` or `project-id` can be provided. For
             * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.
             */
            @com.google.api.client.util.Key
            private java.lang.String name;

            /** Required. API resource name for vulnerability resource. Format:
           `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` For `{project}`,
           either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine
           `instance-id` or `instance-name` can be provided.
             */
            public java.lang.String getName() {
              return name;
            }

            /**
             * Required. API resource name for vulnerability resource. Format:
             * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
             * For `{project}`, either `project-number` or `project-id` can be provided. For
             * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.
             */
            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/[^/]+/instances/[^/]+/vulnerabilityReport$");
              }
              this.name = name;
              return this;
            }

            @Override
            public Get set(String parameterName, Object value) {
              return (Get) super.set(parameterName, value);
            }
          }
          /**
           * List vulnerability reports for all VM instances in the specified zone.
           *
           * Create a request for the method "vulnerabilityReports.list".
           *
           * This request holds the parameters needed by the osconfig server.  After setting any optional
           * parameters, call the {@link List#execute()} method to invoke the remote operation.
           *
           * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-`
           *        For `{project}`, either `project-number` or `project-id` can be provided.
           * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListVulnerabilityReportsResponse> {

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

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

            /**
             * List vulnerability reports for all VM instances in the specified zone.
             *
             * Create a request for the method "vulnerabilityReports.list".
             *
             * This request holds the parameters needed by the the osconfig server.  After setting any
             * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
             * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
             * must be called to initialize this instance immediately after invoking the constructor. </p>
             *
             * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-`
           *        For `{project}`, either `project-number` or `project-id` can be provided.
             * @since 1.13
             */
            protected List(java.lang.String parent) {
              super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListVulnerabilityReportsResponse.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/[^/]+/instances/[^/]+$");
              }
            }

            @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);
            }

            /**
             * Required. The parent resource name. Format:
             * `projects/{project}/locations/{location}/instances/-` For `{project}`, either
             * `project-number` or `project-id` can be provided.
             */
            @com.google.api.client.util.Key
            private java.lang.String parent;

            /** Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-`
           For `{project}`, either `project-number` or `project-id` can be provided.
             */
            public java.lang.String getParent() {
              return parent;
            }

            /**
             * Required. The parent resource name. Format:
             * `projects/{project}/locations/{location}/instances/-` For `{project}`, either
             * `project-number` or `project-id` can be provided.
             */
            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/[^/]+/instances/[^/]+$");
              }
              this.parent = parent;
              return this;
            }

            /**
             * This field supports filtering by the severity level for the vulnerability. For a list
             * of severity levels, see [Severity levels for
             * vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-
             * overview#severity_levels_for_vulnerabilities). The filter field follows the rules
             * described in the [AIP-160](https://google.aip.dev/160) guidelines as follows: +
             * **Filter for a specific severity type**: you can list reports that contain
             * vulnerabilities that are classified as medium by specifying
             * `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of severities** :
             * you can list reports that have vulnerabilities that are classified as critical or
             * high by specifying `vulnerabilities.details.severity:HIGH OR
             * vulnerabilities.details.severity:CRITICAL`
             */
            @com.google.api.client.util.Key
            private java.lang.String filter;

            /** This field supports filtering by the severity level for the vulnerability. For a list of severity
           levels, see [Severity levels for vulnerabilities](https://cloud.google.com/container-analysis/docs
           /container-scanning-overview#severity_levels_for_vulnerabilities). The filter field follows the
           rules described in the [AIP-160](https://google.aip.dev/160) guidelines as follows: + **Filter for
           a specific severity type**: you can list reports that contain vulnerabilities that are classified
           as medium by specifying `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of
           severities** : you can list reports that have vulnerabilities that are classified as critical or
           high by specifying `vulnerabilities.details.severity:HIGH OR
           vulnerabilities.details.severity:CRITICAL`
             */
            public java.lang.String getFilter() {
              return filter;
            }

            /**
             * This field supports filtering by the severity level for the vulnerability. For a list
             * of severity levels, see [Severity levels for
             * vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-
             * overview#severity_levels_for_vulnerabilities). The filter field follows the rules
             * described in the [AIP-160](https://google.aip.dev/160) guidelines as follows: +
             * **Filter for a specific severity type**: you can list reports that contain
             * vulnerabilities that are classified as medium by specifying
             * `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of severities** :
             * you can list reports that have vulnerabilities that are classified as critical or
             * high by specifying `vulnerabilities.details.severity:HIGH OR
             * vulnerabilities.details.severity:CRITICAL`
             */
            public List setFilter(java.lang.String filter) {
              this.filter = filter;
              return this;
            }

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

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

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

            /**
             * A pagination token returned from a previous call to `ListVulnerabilityReports` that
             * indicates where this listing should continue from.
             */
            @com.google.api.client.util.Key
            private java.lang.String pageToken;

            /** A pagination token returned from a previous call to `ListVulnerabilityReports` that indicates where
           this listing should continue from.
             */
            public java.lang.String getPageToken() {
              return pageToken;
            }

            /**
             * A pagination token returned from a previous call to `ListVulnerabilityReports` that
             * indicates where this listing should continue from.
             */
            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 OsPolicyAssignments collection.
       *
       * <p>The typical use is:</p>
       * <pre>
       *   {@code OSConfig osconfig = new OSConfig(...);}
       *   {@code OSConfig.OsPolicyAssignments.List request = osconfig.osPolicyAssignments().list(parameters ...)}
       * </pre>
       *
       * @return the resource collection
       */
      public OsPolicyAssignments osPolicyAssignments() {
        return new OsPolicyAssignments();
      }

      /**
       * The "osPolicyAssignments" collection of methods.
       */
      public class OsPolicyAssignments {

        /**
         * Create an OS policy assignment. This method also creates the first revision of the OS policy
         * assignment. This method returns a long running operation (LRO) that contains the rollout details.
         * The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.l
         * ocations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/re
         * st/v1/projects.locations.osPolicyAssignments.operations/cancel).
         *
         * Create a request for the method "osPolicyAssignments.create".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link Create#execute()} method to invoke the remote operation.
         *
         * @param parent Required. The parent resource name in the form: projects/{project}/locations/{location}
         * @param content the {@link com.google.api.services.osconfig.v1.model.OSPolicyAssignment}
         * @return the request
         */
        public Create create(java.lang.String parent, com.google.api.services.osconfig.v1.model.OSPolicyAssignment content) throws java.io.IOException {
          Create result = new Create(parent, content);
          initialize(result);
          return result;
        }

        public class Create extends OSConfigRequest<com.google.api.services.osconfig.v1.model.Operation> {

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

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

          /**
           * Create an OS policy assignment. This method also creates the first revision of the OS policy
           * assignment. This method returns a long running operation (LRO) that contains the rollout
           * details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method:
           * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs
           * /osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
           *
           * Create a request for the method "osPolicyAssignments.create".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
           * <p> {@link
           * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param parent Required. The parent resource name in the form: projects/{project}/locations/{location}
           * @param content the {@link com.google.api.services.osconfig.v1.model.OSPolicyAssignment}
           * @since 1.13
           */
          protected Create(java.lang.String parent, com.google.api.services.osconfig.v1.model.OSPolicyAssignment content) {
            super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.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);
          }

          /**
           * Required. The parent resource name in the form: projects/{project}/locations/{location}
           */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** Required. The parent resource name in the form: projects/{project}/locations/{location}
           */
          public java.lang.String getParent() {
            return parent;
          }

          /**
           * Required. The parent resource name in the form: projects/{project}/locations/{location}
           */
          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;
          }

          /**
           * Required. The logical name of the OS policy assignment in the project with the
           * following restrictions: * Must contain only lowercase letters, numbers, and hyphens. *
           * Must start with a letter. * Must be between 1-63 characters. * Must end with a number
           * or a letter. * Must be unique within the project.
           */
          @com.google.api.client.util.Key
          private java.lang.String osPolicyAssignmentId;

          /** Required. The logical name of the OS policy assignment in the project with the following
         restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a
         letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique
         within the project.
           */
          public java.lang.String getOsPolicyAssignmentId() {
            return osPolicyAssignmentId;
          }

          /**
           * Required. The logical name of the OS policy assignment in the project with the
           * following restrictions: * Must contain only lowercase letters, numbers, and hyphens. *
           * Must start with a letter. * Must be between 1-63 characters. * Must end with a number
           * or a letter. * Must be unique within the project.
           */
          public Create setOsPolicyAssignmentId(java.lang.String osPolicyAssignmentId) {
            this.osPolicyAssignmentId = osPolicyAssignmentId;
            return this;
          }

          @Override
          public Create set(String parameterName, Object value) {
            return (Create) super.set(parameterName, value);
          }
        }
        /**
         * Delete the OS policy assignment. This method creates a new revision of the OS policy assignment.
         * This method returns a long running operation (LRO) that contains the rollout details. The rollout
         * can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions
         * associated with the OS policy assignment are deleted. For more information, see [Method: projects
         * .locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/
         * rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
         *
         * Create a request for the method "osPolicyAssignments.delete".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link Delete#execute()} method to invoke the remote operation.
         *
         * @param name Required. The name of the OS policy assignment 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 OSConfigRequest<com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+$");

          /**
           * Delete the OS policy assignment. This method creates a new revision of the OS policy
           * assignment. This method returns a long running operation (LRO) that contains the rollout
           * details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not
           * cancelled, all revisions associated with the OS policy assignment are deleted. For more
           * information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://clo
           * ud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/c
           * ancel).
           *
           * Create a request for the method "osPolicyAssignments.delete".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
           * <p> {@link
           * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param name Required. The name of the OS policy assignment to be deleted
           * @since 1.13
           */
          protected Delete(java.lang.String name) {
            super(OSConfig.this, "DELETE", REST_PATH, null, com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+$");
            }
          }

          @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);
          }

          /** Required. The name of the OS policy assignment to be deleted */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** Required. The name of the OS policy assignment to be deleted
           */
          public java.lang.String getName() {
            return name;
          }

          /** Required. The name of the OS policy assignment 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/[^/]+/osPolicyAssignments/[^/]+$");
            }
            this.name = name;
            return this;
          }

          @Override
          public Delete set(String parameterName, Object value) {
            return (Delete) super.set(parameterName, value);
          }
        }
        /**
         * Retrieve an existing OS policy assignment. This method always returns the latest revision. In
         * order to retrieve a previous revision of the assignment, also provide the revision ID in the
         * `name` parameter.
         *
         * Create a request for the method "osPolicyAssignments.get".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link Get#execute()} method to invoke the remote operation.
         *
         * @param name Required. The resource name of OS policy assignment. Format:
         *        `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revis
         *        ionId}`
         * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.OSPolicyAssignment> {

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

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

          /**
           * Retrieve an existing OS policy assignment. This method always returns the latest revision. In
           * order to retrieve a previous revision of the assignment, also provide the revision ID in the
           * `name` parameter.
           *
           * Create a request for the method "osPolicyAssignments.get".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
           * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param name Required. The resource name of OS policy assignment. Format:
         *        `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revis
         *        ionId}`
           * @since 1.13
           */
          protected Get(java.lang.String name) {
            super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.OSPolicyAssignment.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/[^/]+/osPolicyAssignments/[^/]+$");
            }
          }

          @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);
          }

          /**
           * Required. The resource name of OS policy assignment. Format: `projects/{project}/locati
           * ons/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
           */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** Required. The resource name of OS policy assignment. Format:
         `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
           */
          public java.lang.String getName() {
            return name;
          }

          /**
           * Required. The resource name of OS policy assignment. Format: `projects/{project}/locati
           * ons/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
           */
          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/[^/]+/osPolicyAssignments/[^/]+$");
            }
            this.name = name;
            return this;
          }

          @Override
          public Get set(String parameterName, Object value) {
            return (Get) super.set(parameterName, value);
          }
        }
        /**
         * List the OS policy assignments under the parent resource. For each OS policy assignment, the
         * latest revision is returned.
         *
         * Create a request for the method "osPolicyAssignments.list".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link List#execute()} method to invoke the remote operation.
         *
         * @param parent Required. The parent resource name.
         * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListOSPolicyAssignmentsResponse> {

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

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

          /**
           * List the OS policy assignments under the parent resource. For each OS policy assignment, the
           * latest revision is returned.
           *
           * Create a request for the method "osPolicyAssignments.list".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
           * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param parent Required. The parent resource name.
           * @since 1.13
           */
          protected List(java.lang.String parent) {
            super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListOSPolicyAssignmentsResponse.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);
          }

          /** Required. The parent resource name. */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** Required. The parent resource name.
           */
          public java.lang.String getParent() {
            return parent;
          }

          /** Required. The parent resource name. */
          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 assignments to return. */
          @com.google.api.client.util.Key
          private java.lang.Integer pageSize;

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

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

          /**
           * A pagination token returned from a previous call to `ListOSPolicyAssignments` that
           * indicates where this listing should continue from.
           */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where
         this listing should continue from.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /**
           * A pagination token returned from a previous call to `ListOSPolicyAssignments` that
           * indicates where this listing should continue from.
           */
          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);
          }
        }
        /**
         * List the OS policy assignment revisions for a given OS policy assignment.
         *
         * Create a request for the method "osPolicyAssignments.listRevisions".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link ListRevisions#execute()} method to invoke the remote operation.
         *
         * @param name Required. The name of the OS policy assignment to list revisions for.
         * @return the request
         */
        public ListRevisions listRevisions(java.lang.String name) throws java.io.IOException {
          ListRevisions result = new ListRevisions(name);
          initialize(result);
          return result;
        }

        public class ListRevisions extends OSConfigRequest<com.google.api.services.osconfig.v1.model.ListOSPolicyAssignmentRevisionsResponse> {

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

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

          /**
           * List the OS policy assignment revisions for a given OS policy assignment.
           *
           * Create a request for the method "osPolicyAssignments.listRevisions".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link ListRevisions#execute()} method to invoke the remote
           * operation. <p> {@link ListRevisions#initialize(com.google.api.client.googleapis.services.Abstra
           * ctGoogleClientRequest)} must be called to initialize this instance immediately after invoking
           * the constructor. </p>
           *
           * @param name Required. The name of the OS policy assignment to list revisions for.
           * @since 1.13
           */
          protected ListRevisions(java.lang.String name) {
            super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListOSPolicyAssignmentRevisionsResponse.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/[^/]+/osPolicyAssignments/[^/]+$");
            }
          }

          @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 ListRevisions set$Xgafv(java.lang.String $Xgafv) {
            return (ListRevisions) super.set$Xgafv($Xgafv);
          }

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

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

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

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

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

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

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

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

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

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

          /** Required. The name of the OS policy assignment to list revisions for. */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** Required. The name of the OS policy assignment to list revisions for.
           */
          public java.lang.String getName() {
            return name;
          }

          /** Required. The name of the OS policy assignment to list revisions for. */
          public ListRevisions 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/[^/]+/osPolicyAssignments/[^/]+$");
            }
            this.name = name;
            return this;
          }

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

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

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

          /**
           * A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions`
           * that indicates where this listing should continue from.
           */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that
         indicates where this listing should continue from.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /**
           * A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions`
           * that indicates where this listing should continue from.
           */
          public ListRevisions setPageToken(java.lang.String pageToken) {
            this.pageToken = pageToken;
            return this;
          }

          @Override
          public ListRevisions set(String parameterName, Object value) {
            return (ListRevisions) super.set(parameterName, value);
          }
        }
        /**
         * Update an existing OS policy assignment. This method creates a new revision of the OS policy
         * assignment. This method returns a long running operation (LRO) that contains the rollout details.
         * The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.l
         * ocations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/re
         * st/v1/projects.locations.osPolicyAssignments.operations/cancel).
         *
         * Create a request for the method "osPolicyAssignments.patch".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link Patch#execute()} method to invoke the remote operation.
         *
         * @param name Resource name. Format:
         *        `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_
         *        id}` This field is ignored when you create an OS policy assignment.
         * @param content the {@link com.google.api.services.osconfig.v1.model.OSPolicyAssignment}
         * @return the request
         */
        public Patch patch(java.lang.String name, com.google.api.services.osconfig.v1.model.OSPolicyAssignment content) throws java.io.IOException {
          Patch result = new Patch(name, content);
          initialize(result);
          return result;
        }

        public class Patch extends OSConfigRequest<com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+$");

          /**
           * Update an existing OS policy assignment. This method creates a new revision of the OS policy
           * assignment. This method returns a long running operation (LRO) that contains the rollout
           * details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method:
           * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs
           * /osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
           *
           * Create a request for the method "osPolicyAssignments.patch".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
           * <p> {@link
           * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
           * be called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param name Resource name. Format:
         *        `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_
         *        id}` This field is ignored when you create an OS policy assignment.
           * @param content the {@link com.google.api.services.osconfig.v1.model.OSPolicyAssignment}
           * @since 1.13
           */
          protected Patch(java.lang.String name, com.google.api.services.osconfig.v1.model.OSPolicyAssignment content) {
            super(OSConfig.this, "PATCH", REST_PATH, content, com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+$");
            }
          }

          @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);
          }

          /**
           * Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignme
           * nts/{os_policy_assignment_id}` This field is ignored when you create an OS policy
           * assignment.
           */
          @com.google.api.client.util.Key
          private java.lang.String name;

          /** Resource name. Format:
         `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This
         field is ignored when you create an OS policy assignment.
           */
          public java.lang.String getName() {
            return name;
          }

          /**
           * Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignme
           * nts/{os_policy_assignment_id}` This field is ignored when you create an OS policy
           * assignment.
           */
          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/[^/]+/osPolicyAssignments/[^/]+$");
            }
            this.name = name;
            return this;
          }

          /**
           * Optional. Field mask that controls which fields of the assignment should be updated.
           */
          @com.google.api.client.util.Key
          private String updateMask;

          /** Optional. Field mask that controls which fields of the assignment should be updated.
           */
          public String getUpdateMask() {
            return updateMask;
          }

          /**
           * Optional. Field mask that controls which fields of the assignment should be updated.
           */
          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 Operations collection.
         *
         * <p>The typical use is:</p>
         * <pre>
         *   {@code OSConfig osconfig = new OSConfig(...);}
         *   {@code OSConfig.Operations.List request = osconfig.operations().list(parameters ...)}
         * </pre>
         *
         * @return the resource collection
         */
        public Operations operations() {
          return new Operations();
        }

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

          /**
           * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
           * cancel the operation, but success is not guaranteed. If the server doesn't support this method,
           * it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
           * methods to check whether the cancellation succeeded or whether the operation completed despite
           * cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
           * operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
           * `Code.CANCELLED`.
           *
           * Create a request for the method "operations.cancel".
           *
           * This request holds the parameters needed by the osconfig server.  After setting any optional
           * parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
           *
           * @param name The name of the operation resource to be cancelled.
           * @param content the {@link com.google.api.services.osconfig.v1.model.CancelOperationRequest}
           * @return the request
           */
          public Cancel cancel(java.lang.String name, com.google.api.services.osconfig.v1.model.CancelOperationRequest content) throws java.io.IOException {
            Cancel result = new Cancel(name, content);
            initialize(result);
            return result;
          }

          public class Cancel extends OSConfigRequest<com.google.api.services.osconfig.v1.model.Empty> {

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

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

            /**
             * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
             * cancel the operation, but success is not guaranteed. If the server doesn't support this method,
             * it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
             * methods to check whether the cancellation succeeded or whether the operation completed despite
             * cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
             * operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
             * `Code.CANCELLED`.
             *
             * Create a request for the method "operations.cancel".
             *
             * This request holds the parameters needed by the the osconfig server.  After setting any
             * optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
             * <p> {@link
             * Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
             * be called to initialize this instance immediately after invoking the constructor. </p>
             *
             * @param name The name of the operation resource to be cancelled.
             * @param content the {@link com.google.api.services.osconfig.v1.model.CancelOperationRequest}
             * @since 1.13
             */
            protected Cancel(java.lang.String name, com.google.api.services.osconfig.v1.model.CancelOperationRequest content) {
              super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$");
              }
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

            /** The name of the operation resource to be cancelled. */
            public Cancel 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/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$");
              }
              this.name = name;
              return this;
            }

            @Override
            public Cancel set(String parameterName, Object value) {
              return (Cancel) 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 osconfig 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 OSConfigRequest<com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+/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 osconfig server.  After setting any
             * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
             * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
             * must be called to initialize this instance immediately after invoking the constructor. </p>
             *
             * @param name The name of the operation resource.
             * @since 1.13
             */
            protected Get(java.lang.String name) {
              super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.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/[^/]+/osPolicyAssignments/[^/]+/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/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$");
              }
              this.name = name;
              return this;
            }

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

        }
      }
    }
    /**
     * An accessor for creating requests from the PatchDeployments collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code OSConfig osconfig = new OSConfig(...);}
     *   {@code OSConfig.PatchDeployments.List request = osconfig.patchDeployments().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public PatchDeployments patchDeployments() {
      return new PatchDeployments();
    }

    /**
     * The "patchDeployments" collection of methods.
     */
    public class PatchDeployments {

      /**
       * Create an OS Config patch deployment.
       *
       * Create a request for the method "patchDeployments.create".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Create#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The project to apply this patch deployment to in the form `projects`.
       * @param content the {@link com.google.api.services.osconfig.v1.model.PatchDeployment}
       * @return the request
       */
      public Create create(java.lang.String parent, com.google.api.services.osconfig.v1.model.PatchDeployment content) throws java.io.IOException {
        Create result = new Create(parent, content);
        initialize(result);
        return result;
      }

      public class Create extends OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchDeployment> {

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

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

        /**
         * Create an OS Config patch deployment.
         *
         * Create a request for the method "patchDeployments.create".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
         * <p> {@link
         * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The project to apply this patch deployment to in the form `projects`.
         * @param content the {@link com.google.api.services.osconfig.v1.model.PatchDeployment}
         * @since 1.13
         */
        protected Create(java.lang.String parent, com.google.api.services.osconfig.v1.model.PatchDeployment content) {
          super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.v1.model.PatchDeployment.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/[^/]+$");
          }
        }

        @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);
        }

        /** Required. The project to apply this patch deployment to in the form `projects`. */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The project to apply this patch deployment to in the form `projects`.
         */
        public java.lang.String getParent() {
          return parent;
        }

        /** Required. The project to apply this patch deployment to in the form `projects`. */
        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/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        /**
         * Required. A name for the patch deployment in the project. When creating a name the
         * following rules apply: * Must contain only lowercase letters, numbers, and hyphens. *
         * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or
         * a letter. * Must be unique within the project.
         */
        @com.google.api.client.util.Key
        private java.lang.String patchDeploymentId;

        /** Required. A name for the patch deployment in the project. When creating a name the following rules
       apply: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. *
       Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the
       project.
         */
        public java.lang.String getPatchDeploymentId() {
          return patchDeploymentId;
        }

        /**
         * Required. A name for the patch deployment in the project. When creating a name the
         * following rules apply: * Must contain only lowercase letters, numbers, and hyphens. *
         * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or
         * a letter. * Must be unique within the project.
         */
        public Create setPatchDeploymentId(java.lang.String patchDeploymentId) {
          this.patchDeploymentId = patchDeploymentId;
          return this;
        }

        @Override
        public Create set(String parameterName, Object value) {
          return (Create) super.set(parameterName, value);
        }
      }
      /**
       * Delete an OS Config patch deployment.
       *
       * Create a request for the method "patchDeployments.delete".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Delete#execute()} method to invoke the remote operation.
       *
       * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
       * @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 OSConfigRequest<com.google.api.services.osconfig.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/[^/]+/patchDeployments/[^/]+$");

        /**
         * Delete an OS Config patch deployment.
         *
         * Create a request for the method "patchDeployments.delete".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
         * <p> {@link
         * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         * @since 1.13
         */
        protected Delete(java.lang.String name) {
          super(OSConfig.this, "DELETE", REST_PATH, null, com.google.api.services.osconfig.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/[^/]+/patchDeployments/[^/]+$");
          }
        }

        @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);
        }

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        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/[^/]+/patchDeployments/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Delete set(String parameterName, Object value) {
          return (Delete) super.set(parameterName, value);
        }
      }
      /**
       * Get an OS Config patch deployment.
       *
       * Create a request for the method "patchDeployments.get".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Get#execute()} method to invoke the remote operation.
       *
       * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
       * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchDeployment> {

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

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

        /**
         * Get an OS Config patch deployment.
         *
         * Create a request for the method "patchDeployments.get".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
         * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         * @since 1.13
         */
        protected Get(java.lang.String name) {
          super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.PatchDeployment.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/[^/]+/patchDeployments/[^/]+$");
          }
        }

        @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);
        }

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        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/[^/]+/patchDeployments/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Get set(String parameterName, Object value) {
          return (Get) super.set(parameterName, value);
        }
      }
      /**
       * Get a page of OS Config patch deployments.
       *
       * Create a request for the method "patchDeployments.list".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The resource name of the parent in the form `projects`.
       * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListPatchDeploymentsResponse> {

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

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

        /**
         * Get a page of OS Config patch deployments.
         *
         * Create a request for the method "patchDeployments.list".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
         * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The resource name of the parent in the form `projects`.
         * @since 1.13
         */
        protected List(java.lang.String parent) {
          super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListPatchDeploymentsResponse.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/[^/]+$");
          }
        }

        @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);
        }

        /** Required. The resource name of the parent in the form `projects`. */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The resource name of the parent in the form `projects`.
         */
        public java.lang.String getParent() {
          return parent;
        }

        /** Required. The resource name of the parent in the form `projects`. */
        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/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        /** Optional. The maximum number of patch deployments to return. Default is 100. */
        @com.google.api.client.util.Key
        private java.lang.Integer pageSize;

        /** Optional. The maximum number of patch deployments to return. Default is 100.
         */
        public java.lang.Integer getPageSize() {
          return pageSize;
        }

        /** Optional. The maximum number of patch deployments to return. Default is 100. */
        public List setPageSize(java.lang.Integer pageSize) {
          this.pageSize = pageSize;
          return this;
        }

        /**
         * Optional. A pagination token returned from a previous call to ListPatchDeployments that
         * indicates where this listing should continue from.
         */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** Optional. A pagination token returned from a previous call to ListPatchDeployments that indicates
       where this listing should continue from.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /**
         * Optional. A pagination token returned from a previous call to ListPatchDeployments that
         * indicates where this listing should continue from.
         */
        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 OS Config patch deployment.
       *
       * Create a request for the method "patchDeployments.patch".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Patch#execute()} method to invoke the remote operation.
       *
       * @param name Unique name for the patch deployment resource in a project. The patch deployment name is in the
       *        form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is
       *        ignored when you create a new patch deployment.
       * @param content the {@link com.google.api.services.osconfig.v1.model.PatchDeployment}
       * @return the request
       */
      public Patch patch(java.lang.String name, com.google.api.services.osconfig.v1.model.PatchDeployment content) throws java.io.IOException {
        Patch result = new Patch(name, content);
        initialize(result);
        return result;
      }

      public class Patch extends OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchDeployment> {

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

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

        /**
         * Update an OS Config patch deployment.
         *
         * Create a request for the method "patchDeployments.patch".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
         * <p> {@link
         * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Unique name for the patch deployment resource in a project. The patch deployment name is in the
       *        form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is
       *        ignored when you create a new patch deployment.
         * @param content the {@link com.google.api.services.osconfig.v1.model.PatchDeployment}
         * @since 1.13
         */
        protected Patch(java.lang.String name, com.google.api.services.osconfig.v1.model.PatchDeployment content) {
          super(OSConfig.this, "PATCH", REST_PATH, content, com.google.api.services.osconfig.v1.model.PatchDeployment.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/[^/]+/patchDeployments/[^/]+$");
          }
        }

        @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);
        }

        /**
         * Unique name for the patch deployment resource in a project. The patch deployment name is
         * in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field
         * is ignored when you create a new patch deployment.
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Unique name for the patch deployment resource in a project. The patch deployment name is in the
       form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when
       you create a new patch deployment.
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Unique name for the patch deployment resource in a project. The patch deployment name is
         * in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field
         * is ignored when you create a new patch deployment.
         */
        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/[^/]+/patchDeployments/[^/]+$");
          }
          this.name = name;
          return this;
        }

        /**
         * Optional. Field mask that controls which fields of the patch deployment should be
         * updated.
         */
        @com.google.api.client.util.Key
        private String updateMask;

        /** Optional. Field mask that controls which fields of the patch deployment should be updated.
         */
        public String getUpdateMask() {
          return updateMask;
        }

        /**
         * Optional. Field mask that controls which fields of the patch deployment should be
         * updated.
         */
        public Patch setUpdateMask(String updateMask) {
          this.updateMask = updateMask;
          return this;
        }

        @Override
        public Patch set(String parameterName, Object value) {
          return (Patch) super.set(parameterName, value);
        }
      }
      /**
       * Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate
       * patch jobs.
       *
       * Create a request for the method "patchDeployments.pause".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Pause#execute()} method to invoke the remote operation.
       *
       * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
       * @param content the {@link com.google.api.services.osconfig.v1.model.PausePatchDeploymentRequest}
       * @return the request
       */
      public Pause pause(java.lang.String name, com.google.api.services.osconfig.v1.model.PausePatchDeploymentRequest content) throws java.io.IOException {
        Pause result = new Pause(name, content);
        initialize(result);
        return result;
      }

      public class Pause extends OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchDeployment> {

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

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

        /**
         * Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate
         * patch jobs.
         *
         * Create a request for the method "patchDeployments.pause".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Pause#execute()} method to invoke the remote operation.
         * <p> {@link
         * Pause#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         * @param content the {@link com.google.api.services.osconfig.v1.model.PausePatchDeploymentRequest}
         * @since 1.13
         */
        protected Pause(java.lang.String name, com.google.api.services.osconfig.v1.model.PausePatchDeploymentRequest content) {
          super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.v1.model.PatchDeployment.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/[^/]+/patchDeployments/[^/]+$");
          }
        }

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

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

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

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

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

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

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

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

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

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

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

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        public Pause 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/[^/]+/patchDeployments/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Pause set(String parameterName, Object value) {
          return (Pause) super.set(parameterName, value);
        }
      }
      /**
       * Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues to
       * generate patch jobs.
       *
       * Create a request for the method "patchDeployments.resume".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Resume#execute()} method to invoke the remote operation.
       *
       * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
       * @param content the {@link com.google.api.services.osconfig.v1.model.ResumePatchDeploymentRequest}
       * @return the request
       */
      public Resume resume(java.lang.String name, com.google.api.services.osconfig.v1.model.ResumePatchDeploymentRequest content) throws java.io.IOException {
        Resume result = new Resume(name, content);
        initialize(result);
        return result;
      }

      public class Resume extends OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchDeployment> {

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

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

        /**
         * Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues
         * to generate patch jobs.
         *
         * Create a request for the method "patchDeployments.resume".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Resume#execute()} method to invoke the remote operation.
         * <p> {@link
         * Resume#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         * @param content the {@link com.google.api.services.osconfig.v1.model.ResumePatchDeploymentRequest}
         * @since 1.13
         */
        protected Resume(java.lang.String name, com.google.api.services.osconfig.v1.model.ResumePatchDeploymentRequest content) {
          super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.v1.model.PatchDeployment.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/[^/]+/patchDeployments/[^/]+$");
          }
        }

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

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

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

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

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

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

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

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

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

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

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

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The resource name of the patch deployment in the form `projects/patchDeployments`.
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The resource name of the patch deployment in the form
         * `projects/patchDeployments`.
         */
        public Resume 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/[^/]+/patchDeployments/[^/]+$");
          }
          this.name = name;
          return this;
        }

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

    }
    /**
     * An accessor for creating requests from the PatchJobs collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code OSConfig osconfig = new OSConfig(...);}
     *   {@code OSConfig.PatchJobs.List request = osconfig.patchJobs().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public PatchJobs patchJobs() {
      return new PatchJobs();
    }

    /**
     * The "patchJobs" collection of methods.
     */
    public class PatchJobs {

      /**
       * Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
       *
       * Create a request for the method "patchJobs.cancel".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
       *
       * @param name Required. Name of the patch in the form `projects/patchJobs`
       * @param content the {@link com.google.api.services.osconfig.v1.model.CancelPatchJobRequest}
       * @return the request
       */
      public Cancel cancel(java.lang.String name, com.google.api.services.osconfig.v1.model.CancelPatchJobRequest content) throws java.io.IOException {
        Cancel result = new Cancel(name, content);
        initialize(result);
        return result;
      }

      public class Cancel extends OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchJob> {

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

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

        /**
         * Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
         *
         * Create a request for the method "patchJobs.cancel".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
         * <p> {@link
         * Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. Name of the patch in the form `projects/patchJobs`
         * @param content the {@link com.google.api.services.osconfig.v1.model.CancelPatchJobRequest}
         * @since 1.13
         */
        protected Cancel(java.lang.String name, com.google.api.services.osconfig.v1.model.CancelPatchJobRequest content) {
          super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.v1.model.PatchJob.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/[^/]+/patchJobs/[^/]+$");
          }
        }

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

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

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

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

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

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

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

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

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

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

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

        /** Required. Name of the patch in the form `projects/patchJobs` */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. Name of the patch in the form `projects/patchJobs`
         */
        public java.lang.String getName() {
          return name;
        }

        /** Required. Name of the patch in the form `projects/patchJobs` */
        public Cancel 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/[^/]+/patchJobs/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Cancel set(String parameterName, Object value) {
          return (Cancel) super.set(parameterName, value);
        }
      }
      /**
       * Patch VM instances by creating and running a patch job.
       *
       * Create a request for the method "patchJobs.execute".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Execute#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The project in which to run this patch in the form `projects`
       * @param content the {@link com.google.api.services.osconfig.v1.model.ExecutePatchJobRequest}
       * @return the request
       */
      public Execute execute(java.lang.String parent, com.google.api.services.osconfig.v1.model.ExecutePatchJobRequest content) throws java.io.IOException {
        Execute result = new Execute(parent, content);
        initialize(result);
        return result;
      }

      public class Execute extends OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchJob> {

        private static final String REST_PATH = "v1/{+parent}/patchJobs:execute";

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

        /**
         * Patch VM instances by creating and running a patch job.
         *
         * Create a request for the method "patchJobs.execute".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Execute#execute()} method to invoke the remote operation.
         * <p> {@link
         * Execute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The project in which to run this patch in the form `projects`
         * @param content the {@link com.google.api.services.osconfig.v1.model.ExecutePatchJobRequest}
         * @since 1.13
         */
        protected Execute(java.lang.String parent, com.google.api.services.osconfig.v1.model.ExecutePatchJobRequest content) {
          super(OSConfig.this, "POST", REST_PATH, content, com.google.api.services.osconfig.v1.model.PatchJob.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/[^/]+$");
          }
        }

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

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

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

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

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

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

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

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

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

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

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

        /** Required. The project in which to run this patch in the form `projects` */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The project in which to run this patch in the form `projects`
         */
        public java.lang.String getParent() {
          return parent;
        }

        /** Required. The project in which to run this patch in the form `projects` */
        public Execute 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/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        @Override
        public Execute set(String parameterName, Object value) {
          return (Execute) super.set(parameterName, value);
        }
      }
      /**
       * Get the patch job. This can be used to track the progress of an ongoing patch job or review the
       * details of completed jobs.
       *
       * Create a request for the method "patchJobs.get".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link Get#execute()} method to invoke the remote operation.
       *
       * @param name Required. Name of the patch in the form `projects/patchJobs`
       * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.PatchJob> {

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

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

        /**
         * Get the patch job. This can be used to track the progress of an ongoing patch job or review the
         * details of completed jobs.
         *
         * Create a request for the method "patchJobs.get".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
         * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. Name of the patch in the form `projects/patchJobs`
         * @since 1.13
         */
        protected Get(java.lang.String name) {
          super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.PatchJob.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/[^/]+/patchJobs/[^/]+$");
          }
        }

        @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);
        }

        /** Required. Name of the patch in the form `projects/patchJobs` */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. Name of the patch in the form `projects/patchJobs`
         */
        public java.lang.String getName() {
          return name;
        }

        /** Required. Name of the patch in the form `projects/patchJobs` */
        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/[^/]+/patchJobs/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Get set(String parameterName, Object value) {
          return (Get) super.set(parameterName, value);
        }
      }
      /**
       * Get a list of patch jobs.
       *
       * Create a request for the method "patchJobs.list".
       *
       * This request holds the parameters needed by the osconfig server.  After setting any optional
       * parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param parent Required. In the form of `projects`
       * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListPatchJobsResponse> {

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

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

        /**
         * Get a list of patch jobs.
         *
         * Create a request for the method "patchJobs.list".
         *
         * This request holds the parameters needed by the the osconfig server.  After setting any
         * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
         * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. In the form of `projects`
         * @since 1.13
         */
        protected List(java.lang.String parent) {
          super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListPatchJobsResponse.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/[^/]+$");
          }
        }

        @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);
        }

        /** Required. In the form of `projects` */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. In the form of `projects`
         */
        public java.lang.String getParent() {
          return parent;
        }

        /** Required. In the form of `projects` */
        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/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        /**
         * If provided, this field specifies the criteria that must be met by patch jobs to be
         * included in the response. Currently, filtering is only available on the patch_deployment
         * field.
         */
        @com.google.api.client.util.Key
        private java.lang.String filter;

        /** If provided, this field specifies the criteria that must be met by patch jobs to be included in the
       response. Currently, filtering is only available on the patch_deployment field.
         */
        public java.lang.String getFilter() {
          return filter;
        }

        /**
         * If provided, this field specifies the criteria that must be met by patch jobs to be
         * included in the response. Currently, filtering is only available on the patch_deployment
         * field.
         */
        public List setFilter(java.lang.String filter) {
          this.filter = filter;
          return this;
        }

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

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

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

        /**
         * A pagination token returned from a previous call that indicates where this listing should
         * continue from.
         */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** A pagination token returned from a previous call that indicates where this listing should continue
       from.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /**
         * A pagination token returned from a previous call that indicates where this listing should
         * continue from.
         */
        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 InstanceDetails collection.
       *
       * <p>The typical use is:</p>
       * <pre>
       *   {@code OSConfig osconfig = new OSConfig(...);}
       *   {@code OSConfig.InstanceDetails.List request = osconfig.instanceDetails().list(parameters ...)}
       * </pre>
       *
       * @return the resource collection
       */
      public InstanceDetails instanceDetails() {
        return new InstanceDetails();
      }

      /**
       * The "instanceDetails" collection of methods.
       */
      public class InstanceDetails {

        /**
         * Get a list of instance details for a given patch job.
         *
         * Create a request for the method "instanceDetails.list".
         *
         * This request holds the parameters needed by the osconfig server.  After setting any optional
         * parameters, call the {@link List#execute()} method to invoke the remote operation.
         *
         * @param parent Required. The parent for the instances are in the form of `projects/patchJobs`.
         * @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 OSConfigRequest<com.google.api.services.osconfig.v1.model.ListPatchJobInstanceDetailsResponse> {

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

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

          /**
           * Get a list of instance details for a given patch job.
           *
           * Create a request for the method "instanceDetails.list".
           *
           * This request holds the parameters needed by the the osconfig server.  After setting any
           * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
           * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
           * must be called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param parent Required. The parent for the instances are in the form of `projects/patchJobs`.
           * @since 1.13
           */
          protected List(java.lang.String parent) {
            super(OSConfig.this, "GET", REST_PATH, null, com.google.api.services.osconfig.v1.model.ListPatchJobInstanceDetailsResponse.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/[^/]+/patchJobs/[^/]+$");
            }
          }

          @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);
          }

          /** Required. The parent for the instances are in the form of `projects/patchJobs`. */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** Required. The parent for the instances are in the form of `projects/patchJobs`.
           */
          public java.lang.String getParent() {
            return parent;
          }

          /** Required. The parent for the instances are in the form of `projects/patchJobs`. */
          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/[^/]+/patchJobs/[^/]+$");
            }
            this.parent = parent;
            return this;
          }

          /**
           * A filter expression that filters results listed in the response. This field supports
           * filtering results by instance zone, name, state, or `failure_reason`.
           */
          @com.google.api.client.util.Key
          private java.lang.String filter;

          /** A filter expression that filters results listed in the response. This field supports filtering
         results by instance zone, name, state, or `failure_reason`.
           */
          public java.lang.String getFilter() {
            return filter;
          }

          /**
           * A filter expression that filters results listed in the response. This field supports
           * filtering results by instance zone, name, state, or `failure_reason`.
           */
          public List setFilter(java.lang.String filter) {
            this.filter = filter;
            return this;
          }

          /** The maximum number of instance details records to return. Default is 100. */
          @com.google.api.client.util.Key
          private java.lang.Integer pageSize;

          /** The maximum number of instance details records to return. Default is 100.
           */
          public java.lang.Integer getPageSize() {
            return pageSize;
          }

          /** The maximum number of instance details records to return. Default is 100. */
          public List setPageSize(java.lang.Integer pageSize) {
            this.pageSize = pageSize;
            return this;
          }

          /**
           * A pagination token returned from a previous call that indicates where this listing
           * should continue from.
           */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** A pagination token returned from a previous call that indicates where this listing should continue
         from.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /**
           * A pagination token returned from a previous call that indicates where this listing
           * should continue from.
           */
          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 OSConfig}.
   *
   * <p>
   * Implementation is not thread-safe.
   * </p>
   *
   * @since 1.3.0
   */
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) {
      // If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint.
      // If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS.
      // Use the regular endpoint for all other cases.
      String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT");
      useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint;
      if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) {
        return DEFAULT_MTLS_ROOT_URL;
      }
      return DEFAULT_ROOT_URL;
    }

    /**
     * Returns an instance of a new builder.
     *
     * @param transport HTTP transport, which should normally be:
     *        <ul>
     *        <li>Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
     *        <li>Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
     *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *        </li>
     *        </ul>
     * @param jsonFactory JSON factory, which may be:
     *        <ul>
     *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
     *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
     *        <li>Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
     *        </ul>
     * @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,
          Builder.chooseEndpoint(transport),
          DEFAULT_SERVICE_PATH,
          httpRequestInitializer,
          false);
      setBatchPath(DEFAULT_BATCH_PATH);
    }

    /** Builds a new instance of {@link OSConfig}. */
    @Override
    public OSConfig build() {
      return new OSConfig(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 OSConfigRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setOSConfigRequestInitializer(
        OSConfigRequestInitializer osconfigRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(osconfigRequestInitializer);
    }

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