View Javadoc
1   // Copyright (c) Microsoft Corporation. All rights reserved.
2   // Licensed under the MIT License.
3   // Code generated by Microsoft (R) AutoRest Code Generator
4   
5   package com.microsoft.azure.batch.protocol.models;
6   
7   import org.joda.time.Period;
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   
10  /**
11   * Options for enabling automatic scaling on a pool.
12   */
13  public class PoolEnableAutoScaleParameter {
14      /**
15       * The formula for the desired number of compute nodes in the pool.
16       * The formula is checked for validity before it is applied to the pool. If
17       * the formula is not valid, the Batch service rejects the request with
18       * detailed error information. For more information about specifying this
19       * formula, see Automatically scale compute nodes in an Azure Batch pool
20       * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
21       */
22      @JsonProperty(value = "autoScaleFormula")
23      private String autoScaleFormula;
24  
25      /**
26       * The time interval at which to automatically adjust the pool size
27       * according to the autoscale formula.
28       * The default value is 15 minutes. The minimum and maximum value are 5
29       * minutes and 168 hours respectively. If you specify a value less than 5
30       * minutes or greater than 168 hours, the Batch service rejects the request
31       * with an invalid property value error; if you are calling the REST API
32       * directly, the HTTP status code is 400 (Bad Request). If you specify a
33       * new interval, then the existing autoscale evaluation schedule will be
34       * stopped and a new autoscale evaluation schedule will be started, with
35       * its starting time being the time when this request was issued.
36       */
37      @JsonProperty(value = "autoScaleEvaluationInterval")
38      private Period autoScaleEvaluationInterval;
39  
40      /**
41       * Get the formula is checked for validity before it is applied to the pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
42       *
43       * @return the autoScaleFormula value
44       */
45      public String autoScaleFormula() {
46          return this.autoScaleFormula;
47      }
48  
49      /**
50       * Set the formula is checked for validity before it is applied to the pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
51       *
52       * @param autoScaleFormula the autoScaleFormula value to set
53       * @return the PoolEnableAutoScaleParameter object itself.
54       */
55      public PoolEnableAutoScaleParameter withAutoScaleFormula(String autoScaleFormula) {
56          this.autoScaleFormula = autoScaleFormula;
57          return this;
58      }
59  
60      /**
61       * Get the default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
62       *
63       * @return the autoScaleEvaluationInterval value
64       */
65      public Period autoScaleEvaluationInterval() {
66          return this.autoScaleEvaluationInterval;
67      }
68  
69      /**
70       * Set the default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
71       *
72       * @param autoScaleEvaluationInterval the autoScaleEvaluationInterval value to set
73       * @return the PoolEnableAutoScaleParameter object itself.
74       */
75      public PoolEnableAutoScaleParameter withAutoScaleEvaluationInterval(Period autoScaleEvaluationInterval) {
76          this.autoScaleEvaluationInterval = autoScaleEvaluationInterval;
77          return this;
78      }
79  
80  }