|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 3 | + * in compliance with the License. You may obtain a copy of the License at |
| 4 | + * |
| 5 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 8 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 9 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 10 | + * the License. |
| 11 | + */ |
| 12 | +/* |
| 13 | + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ |
| 14 | + * Modify at your own risk. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.google.api.services.dataproc.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Describes an autoscaling policy for Dataproc cluster autoscaler. |
| 21 | + * |
| 22 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 23 | + * transmitted over HTTP when working with the Cloud Dataproc API. For a detailed explanation see: |
| 24 | + * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> |
| 25 | + * </p> |
| 26 | + * |
| 27 | + * @author Google, Inc. |
| 28 | + */ |
| 29 | +@SuppressWarnings("javadoc") |
| 30 | +public final class AutoscalingPolicy extends com.google.api.client.json.GenericJson { |
| 31 | + |
| 32 | + /** |
| 33 | + * The value may be {@code null}. |
| 34 | + */ |
| 35 | + @com.google.api.client.util.Key |
| 36 | + private BasicAutoscalingAlgorithm basicAlgorithm; |
| 37 | + |
| 38 | + /** |
| 39 | + * Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores |
| 40 | + * (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 |
| 41 | + * and 50 characters. |
| 42 | + * The value may be {@code null}. |
| 43 | + */ |
| 44 | + @com.google.api.client.util.Key |
| 45 | + private java.lang.String id; |
| 46 | + |
| 47 | + /** |
| 48 | + * Output only. The "resource name" of the autoscaling policy, as described in |
| 49 | + * https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, |
| 50 | + * the resource name of the policy has the following format: |
| 51 | + * projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For |
| 52 | + * projects.locations.autoscalingPolicies, the resource name of the policy has the following |
| 53 | + * format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} |
| 54 | + * The value may be {@code null}. |
| 55 | + */ |
| 56 | + @com.google.api.client.util.Key |
| 57 | + private java.lang.String name; |
| 58 | + |
| 59 | + /** |
| 60 | + * Optional. Describes how the autoscaler will operate for secondary workers. |
| 61 | + * The value may be {@code null}. |
| 62 | + */ |
| 63 | + @com.google.api.client.util.Key |
| 64 | + private InstanceGroupAutoscalingPolicyConfig secondaryWorkerConfig; |
| 65 | + |
| 66 | + /** |
| 67 | + * Required. Describes how the autoscaler will operate for primary workers. |
| 68 | + * The value may be {@code null}. |
| 69 | + */ |
| 70 | + @com.google.api.client.util.Key |
| 71 | + private InstanceGroupAutoscalingPolicyConfig workerConfig; |
| 72 | + |
| 73 | + /** |
| 74 | + * @return value or {@code null} for none |
| 75 | + */ |
| 76 | + public BasicAutoscalingAlgorithm getBasicAlgorithm() { |
| 77 | + return basicAlgorithm; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * @param basicAlgorithm basicAlgorithm or {@code null} for none |
| 82 | + */ |
| 83 | + public AutoscalingPolicy setBasicAlgorithm(BasicAutoscalingAlgorithm basicAlgorithm) { |
| 84 | + this.basicAlgorithm = basicAlgorithm; |
| 85 | + return this; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores |
| 90 | + * (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 |
| 91 | + * and 50 characters. |
| 92 | + * @return value or {@code null} for none |
| 93 | + */ |
| 94 | + public java.lang.String getId() { |
| 95 | + return id; |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores |
| 100 | + * (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 |
| 101 | + * and 50 characters. |
| 102 | + * @param id id or {@code null} for none |
| 103 | + */ |
| 104 | + public AutoscalingPolicy setId(java.lang.String id) { |
| 105 | + this.id = id; |
| 106 | + return this; |
| 107 | + } |
| 108 | + |
| 109 | + /** |
| 110 | + * Output only. The "resource name" of the autoscaling policy, as described in |
| 111 | + * https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, |
| 112 | + * the resource name of the policy has the following format: |
| 113 | + * projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For |
| 114 | + * projects.locations.autoscalingPolicies, the resource name of the policy has the following |
| 115 | + * format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} |
| 116 | + * @return value or {@code null} for none |
| 117 | + */ |
| 118 | + public java.lang.String getName() { |
| 119 | + return name; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * Output only. The "resource name" of the autoscaling policy, as described in |
| 124 | + * https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, |
| 125 | + * the resource name of the policy has the following format: |
| 126 | + * projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For |
| 127 | + * projects.locations.autoscalingPolicies, the resource name of the policy has the following |
| 128 | + * format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} |
| 129 | + * @param name name or {@code null} for none |
| 130 | + */ |
| 131 | + public AutoscalingPolicy setName(java.lang.String name) { |
| 132 | + this.name = name; |
| 133 | + return this; |
| 134 | + } |
| 135 | + |
| 136 | + /** |
| 137 | + * Optional. Describes how the autoscaler will operate for secondary workers. |
| 138 | + * @return value or {@code null} for none |
| 139 | + */ |
| 140 | + public InstanceGroupAutoscalingPolicyConfig getSecondaryWorkerConfig() { |
| 141 | + return secondaryWorkerConfig; |
| 142 | + } |
| 143 | + |
| 144 | + /** |
| 145 | + * Optional. Describes how the autoscaler will operate for secondary workers. |
| 146 | + * @param secondaryWorkerConfig secondaryWorkerConfig or {@code null} for none |
| 147 | + */ |
| 148 | + public AutoscalingPolicy setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig secondaryWorkerConfig) { |
| 149 | + this.secondaryWorkerConfig = secondaryWorkerConfig; |
| 150 | + return this; |
| 151 | + } |
| 152 | + |
| 153 | + /** |
| 154 | + * Required. Describes how the autoscaler will operate for primary workers. |
| 155 | + * @return value or {@code null} for none |
| 156 | + */ |
| 157 | + public InstanceGroupAutoscalingPolicyConfig getWorkerConfig() { |
| 158 | + return workerConfig; |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * Required. Describes how the autoscaler will operate for primary workers. |
| 163 | + * @param workerConfig workerConfig or {@code null} for none |
| 164 | + */ |
| 165 | + public AutoscalingPolicy setWorkerConfig(InstanceGroupAutoscalingPolicyConfig workerConfig) { |
| 166 | + this.workerConfig = workerConfig; |
| 167 | + return this; |
| 168 | + } |
| 169 | + |
| 170 | + @Override |
| 171 | + public AutoscalingPolicy set(String fieldName, Object value) { |
| 172 | + return (AutoscalingPolicy) super.set(fieldName, value); |
| 173 | + } |
| 174 | + |
| 175 | + @Override |
| 176 | + public AutoscalingPolicy clone() { |
| 177 | + return (AutoscalingPolicy) super.clone(); |
| 178 | + } |
| 179 | + |
| 180 | +} |
0 commit comments