
com.google.api.services.batch.v1.model.PlacementPolicy Maven / Gradle / Ivy
/*
* 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.batch.v1.model;
/**
* PlacementPolicy describes a group placement policy for the VMs controlled by this
* AllocationPolicy.
*
* 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 Batch 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 PlacementPolicy extends com.google.api.client.json.GenericJson {
/**
* UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be
* located close to each other for low network latency between the VMs. No placement policy will
* be generated when collocation is UNSPECIFIED.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String collocation;
/**
* When specified, causes the job to fail if more than max_distance logical switches are required
* between VMs. Batch uses the most compact possible placement of VMs even when max_distance is
* not specified. An explicit max_distance makes that level of compactness a strict requirement.
* Not yet implemented
* The value may be {@code null}.
*/
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
private java.lang.Long maxDistance;
/**
* UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be
* located close to each other for low network latency between the VMs. No placement policy will
* be generated when collocation is UNSPECIFIED.
* @return value or {@code null} for none
*/
public java.lang.String getCollocation() {
return collocation;
}
/**
* UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be
* located close to each other for low network latency between the VMs. No placement policy will
* be generated when collocation is UNSPECIFIED.
* @param collocation collocation or {@code null} for none
*/
public PlacementPolicy setCollocation(java.lang.String collocation) {
this.collocation = collocation;
return this;
}
/**
* When specified, causes the job to fail if more than max_distance logical switches are required
* between VMs. Batch uses the most compact possible placement of VMs even when max_distance is
* not specified. An explicit max_distance makes that level of compactness a strict requirement.
* Not yet implemented
* @return value or {@code null} for none
*/
public java.lang.Long getMaxDistance() {
return maxDistance;
}
/**
* When specified, causes the job to fail if more than max_distance logical switches are required
* between VMs. Batch uses the most compact possible placement of VMs even when max_distance is
* not specified. An explicit max_distance makes that level of compactness a strict requirement.
* Not yet implemented
* @param maxDistance maxDistance or {@code null} for none
*/
public PlacementPolicy setMaxDistance(java.lang.Long maxDistance) {
this.maxDistance = maxDistance;
return this;
}
@Override
public PlacementPolicy set(String fieldName, Object value) {
return (PlacementPolicy) super.set(fieldName, value);
}
@Override
public PlacementPolicy clone() {
return (PlacementPolicy) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy