All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.compute.model.BulkInsertInstanceResource Maven / Gradle / Ivy

There is a newer version: v1-rev20250320-2.0.0
Show newest version
/*
 * 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.compute.model;

/**
 * A transient resource used in compute.instances.bulkInsert and compute.regionInstances.bulkInsert
 * . This resource is not persisted anywhere, it is used only for processing the requests.
 *
 * 

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class BulkInsertInstanceResource extends com.google.api.client.json.GenericJson { /** * The maximum number of instances to create. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long count; /** * The instance properties defining the VM instances to be created. Required if * sourceInstanceTemplate is not provided. * The value may be {@code null}. */ @com.google.api.client.util.Key private InstanceProperties instanceProperties; /** * Policy for choosing target zone. For more information, see Create VMs in bulk. * The value may be {@code null}. */ @com.google.api.client.util.Key private LocationPolicy locationPolicy; /** * The minimum number of instances to create. If no min_count is specified then count is used as * the default value. If min_count instances cannot be created, then no instances will be created * and instances already created will be deleted. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long minCount; /** * The string pattern used for the names of the VMs. Either name_pattern or * per_instance_properties must be set. The pattern must contain one continuous sequence of * placeholder hash characters (#) with each character corresponding to one digit of the generated * instance name. Example: a name_pattern of inst-#### generates instance names such as inst-0001 * and inst-0002. If existing instances in the same project and zone have names that match the * name pattern then the generated instance numbers start after the biggest existing number. For * example, if there exists an instance with name inst-0050, then instance names generated using * the pattern inst-#### begin with inst-0051. The name pattern placeholder #...# can contain up * to 18 characters. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String namePattern; /** * Per-instance properties to be set on individual instances. Keys of this map specify requested * instance names. Can be empty if name_pattern is used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map perInstanceProperties; /** * Specifies the instance template from which to create instances. You may combine * sourceInstanceTemplate with instanceProperties to override specific values from an existing * instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC 7396. It * can be a full or partial URL. For example, the following are all valid URLs to an instance * template: - https://www.googleapis.com/compute/v1/projects/project * /global/instanceTemplates/instanceTemplate - * projects/project/global/instanceTemplates/instanceTemplate - * global/instanceTemplates/instanceTemplate This field is optional. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceInstanceTemplate; /** * The maximum number of instances to create. * @return value or {@code null} for none */ public java.lang.Long getCount() { return count; } /** * The maximum number of instances to create. * @param count count or {@code null} for none */ public BulkInsertInstanceResource setCount(java.lang.Long count) { this.count = count; return this; } /** * The instance properties defining the VM instances to be created. Required if * sourceInstanceTemplate is not provided. * @return value or {@code null} for none */ public InstanceProperties getInstanceProperties() { return instanceProperties; } /** * The instance properties defining the VM instances to be created. Required if * sourceInstanceTemplate is not provided. * @param instanceProperties instanceProperties or {@code null} for none */ public BulkInsertInstanceResource setInstanceProperties(InstanceProperties instanceProperties) { this.instanceProperties = instanceProperties; return this; } /** * Policy for choosing target zone. For more information, see Create VMs in bulk. * @return value or {@code null} for none */ public LocationPolicy getLocationPolicy() { return locationPolicy; } /** * Policy for choosing target zone. For more information, see Create VMs in bulk. * @param locationPolicy locationPolicy or {@code null} for none */ public BulkInsertInstanceResource setLocationPolicy(LocationPolicy locationPolicy) { this.locationPolicy = locationPolicy; return this; } /** * The minimum number of instances to create. If no min_count is specified then count is used as * the default value. If min_count instances cannot be created, then no instances will be created * and instances already created will be deleted. * @return value or {@code null} for none */ public java.lang.Long getMinCount() { return minCount; } /** * The minimum number of instances to create. If no min_count is specified then count is used as * the default value. If min_count instances cannot be created, then no instances will be created * and instances already created will be deleted. * @param minCount minCount or {@code null} for none */ public BulkInsertInstanceResource setMinCount(java.lang.Long minCount) { this.minCount = minCount; return this; } /** * The string pattern used for the names of the VMs. Either name_pattern or * per_instance_properties must be set. The pattern must contain one continuous sequence of * placeholder hash characters (#) with each character corresponding to one digit of the generated * instance name. Example: a name_pattern of inst-#### generates instance names such as inst-0001 * and inst-0002. If existing instances in the same project and zone have names that match the * name pattern then the generated instance numbers start after the biggest existing number. For * example, if there exists an instance with name inst-0050, then instance names generated using * the pattern inst-#### begin with inst-0051. The name pattern placeholder #...# can contain up * to 18 characters. * @return value or {@code null} for none */ public java.lang.String getNamePattern() { return namePattern; } /** * The string pattern used for the names of the VMs. Either name_pattern or * per_instance_properties must be set. The pattern must contain one continuous sequence of * placeholder hash characters (#) with each character corresponding to one digit of the generated * instance name. Example: a name_pattern of inst-#### generates instance names such as inst-0001 * and inst-0002. If existing instances in the same project and zone have names that match the * name pattern then the generated instance numbers start after the biggest existing number. For * example, if there exists an instance with name inst-0050, then instance names generated using * the pattern inst-#### begin with inst-0051. The name pattern placeholder #...# can contain up * to 18 characters. * @param namePattern namePattern or {@code null} for none */ public BulkInsertInstanceResource setNamePattern(java.lang.String namePattern) { this.namePattern = namePattern; return this; } /** * Per-instance properties to be set on individual instances. Keys of this map specify requested * instance names. Can be empty if name_pattern is used. * @return value or {@code null} for none */ public java.util.Map getPerInstanceProperties() { return perInstanceProperties; } /** * Per-instance properties to be set on individual instances. Keys of this map specify requested * instance names. Can be empty if name_pattern is used. * @param perInstanceProperties perInstanceProperties or {@code null} for none */ public BulkInsertInstanceResource setPerInstanceProperties(java.util.Map perInstanceProperties) { this.perInstanceProperties = perInstanceProperties; return this; } /** * Specifies the instance template from which to create instances. You may combine * sourceInstanceTemplate with instanceProperties to override specific values from an existing * instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC 7396. It * can be a full or partial URL. For example, the following are all valid URLs to an instance * template: - https://www.googleapis.com/compute/v1/projects/project * /global/instanceTemplates/instanceTemplate - * projects/project/global/instanceTemplates/instanceTemplate - * global/instanceTemplates/instanceTemplate This field is optional. * @return value or {@code null} for none */ public java.lang.String getSourceInstanceTemplate() { return sourceInstanceTemplate; } /** * Specifies the instance template from which to create instances. You may combine * sourceInstanceTemplate with instanceProperties to override specific values from an existing * instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC 7396. It * can be a full or partial URL. For example, the following are all valid URLs to an instance * template: - https://www.googleapis.com/compute/v1/projects/project * /global/instanceTemplates/instanceTemplate - * projects/project/global/instanceTemplates/instanceTemplate - * global/instanceTemplates/instanceTemplate This field is optional. * @param sourceInstanceTemplate sourceInstanceTemplate or {@code null} for none */ public BulkInsertInstanceResource setSourceInstanceTemplate(java.lang.String sourceInstanceTemplate) { this.sourceInstanceTemplate = sourceInstanceTemplate; return this; } @Override public BulkInsertInstanceResource set(String fieldName, Object value) { return (BulkInsertInstanceResource) super.set(fieldName, value); } @Override public BulkInsertInstanceResource clone() { return (BulkInsertInstanceResource) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy