|
| 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.file.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Performance configuration. Used for setting the performance configuration. Defaults to |
| 21 | + * `iops_by_capacity` if unset in instance creation. |
| 22 | + * |
| 23 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 24 | + * transmitted over HTTP when working with the Cloud Filestore API. For a detailed explanation see: |
| 25 | + * <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> |
| 26 | + * </p> |
| 27 | + * |
| 28 | + * @author Google, Inc. |
| 29 | + */ |
| 30 | +@SuppressWarnings("javadoc") |
| 31 | +public final class PerformanceConfig extends com.google.api.client.json.GenericJson { |
| 32 | + |
| 33 | + /** |
| 34 | + * Choose a fixed provisioned IOPS value for the instance, which will remain constant regardless |
| 35 | + * of instance capacity. Value must be a multiple of 1000. If the chosen value is outside the |
| 36 | + * supported range for the instance's capacity during instance creation, instance creation will |
| 37 | + * fail with an `InvalidArgument` error. Similarly, if an instance capacity update would result in |
| 38 | + * a value outside the supported range, the update will fail with an `InvalidArgument` error. |
| 39 | + * The value may be {@code null}. |
| 40 | + */ |
| 41 | + @com.google.api.client.util.Key |
| 42 | + private FixedIOPS fixedIops; |
| 43 | + |
| 44 | + /** |
| 45 | + * Automatically provision maximum available IOPS based on the capacity of the instance. Larger |
| 46 | + * instances will be granted more IOPS. If instance capacity is increased or decreased, IOPS will |
| 47 | + * be automatically adjusted upwards or downwards accordingly. The maximum available IOPS for a |
| 48 | + * given capacity is defined in Filestore documentation. |
| 49 | + * The value may be {@code null}. |
| 50 | + */ |
| 51 | + @com.google.api.client.util.Key |
| 52 | + private java.lang.Boolean iopsByCapacity; |
| 53 | + |
| 54 | + /** |
| 55 | + * Provision IOPS dynamically based on the capacity of the instance. Provisioned read IOPS will be |
| 56 | + * calculated by by multiplying the capacity of the instance in GiB by the `iops_per_gb` value, |
| 57 | + * and rounding to the nearest 1000. For example, for a 1 TiB instance with an `iops_per_gb` value |
| 58 | + * of 15, the provisioned read IOPS would be `1024 * 15 = 15,360`, rounded to `15,000`. If the |
| 59 | + * calculated value is outside the supported range for the instance's capacity during instance |
| 60 | + * creation, instance creation will fail with an `InvalidArgument` error. Similarly, if an |
| 61 | + * instance capacity update would result in a value outside the supported range, the update will |
| 62 | + * fail with an `InvalidArgument` error. |
| 63 | + * The value may be {@code null}. |
| 64 | + */ |
| 65 | + @com.google.api.client.util.Key |
| 66 | + private IOPSPerGB iopsPerGb; |
| 67 | + |
| 68 | + /** |
| 69 | + * Choose a fixed provisioned IOPS value for the instance, which will remain constant regardless |
| 70 | + * of instance capacity. Value must be a multiple of 1000. If the chosen value is outside the |
| 71 | + * supported range for the instance's capacity during instance creation, instance creation will |
| 72 | + * fail with an `InvalidArgument` error. Similarly, if an instance capacity update would result in |
| 73 | + * a value outside the supported range, the update will fail with an `InvalidArgument` error. |
| 74 | + * @return value or {@code null} for none |
| 75 | + */ |
| 76 | + public FixedIOPS getFixedIops() { |
| 77 | + return fixedIops; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * Choose a fixed provisioned IOPS value for the instance, which will remain constant regardless |
| 82 | + * of instance capacity. Value must be a multiple of 1000. If the chosen value is outside the |
| 83 | + * supported range for the instance's capacity during instance creation, instance creation will |
| 84 | + * fail with an `InvalidArgument` error. Similarly, if an instance capacity update would result in |
| 85 | + * a value outside the supported range, the update will fail with an `InvalidArgument` error. |
| 86 | + * @param fixedIops fixedIops or {@code null} for none |
| 87 | + */ |
| 88 | + public PerformanceConfig setFixedIops(FixedIOPS fixedIops) { |
| 89 | + this.fixedIops = fixedIops; |
| 90 | + return this; |
| 91 | + } |
| 92 | + |
| 93 | + /** |
| 94 | + * Automatically provision maximum available IOPS based on the capacity of the instance. Larger |
| 95 | + * instances will be granted more IOPS. If instance capacity is increased or decreased, IOPS will |
| 96 | + * be automatically adjusted upwards or downwards accordingly. The maximum available IOPS for a |
| 97 | + * given capacity is defined in Filestore documentation. |
| 98 | + * @return value or {@code null} for none |
| 99 | + */ |
| 100 | + public java.lang.Boolean getIopsByCapacity() { |
| 101 | + return iopsByCapacity; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * Automatically provision maximum available IOPS based on the capacity of the instance. Larger |
| 106 | + * instances will be granted more IOPS. If instance capacity is increased or decreased, IOPS will |
| 107 | + * be automatically adjusted upwards or downwards accordingly. The maximum available IOPS for a |
| 108 | + * given capacity is defined in Filestore documentation. |
| 109 | + * @param iopsByCapacity iopsByCapacity or {@code null} for none |
| 110 | + */ |
| 111 | + public PerformanceConfig setIopsByCapacity(java.lang.Boolean iopsByCapacity) { |
| 112 | + this.iopsByCapacity = iopsByCapacity; |
| 113 | + return this; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * Provision IOPS dynamically based on the capacity of the instance. Provisioned read IOPS will be |
| 118 | + * calculated by by multiplying the capacity of the instance in GiB by the `iops_per_gb` value, |
| 119 | + * and rounding to the nearest 1000. For example, for a 1 TiB instance with an `iops_per_gb` value |
| 120 | + * of 15, the provisioned read IOPS would be `1024 * 15 = 15,360`, rounded to `15,000`. If the |
| 121 | + * calculated value is outside the supported range for the instance's capacity during instance |
| 122 | + * creation, instance creation will fail with an `InvalidArgument` error. Similarly, if an |
| 123 | + * instance capacity update would result in a value outside the supported range, the update will |
| 124 | + * fail with an `InvalidArgument` error. |
| 125 | + * @return value or {@code null} for none |
| 126 | + */ |
| 127 | + public IOPSPerGB getIopsPerGb() { |
| 128 | + return iopsPerGb; |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * Provision IOPS dynamically based on the capacity of the instance. Provisioned read IOPS will be |
| 133 | + * calculated by by multiplying the capacity of the instance in GiB by the `iops_per_gb` value, |
| 134 | + * and rounding to the nearest 1000. For example, for a 1 TiB instance with an `iops_per_gb` value |
| 135 | + * of 15, the provisioned read IOPS would be `1024 * 15 = 15,360`, rounded to `15,000`. If the |
| 136 | + * calculated value is outside the supported range for the instance's capacity during instance |
| 137 | + * creation, instance creation will fail with an `InvalidArgument` error. Similarly, if an |
| 138 | + * instance capacity update would result in a value outside the supported range, the update will |
| 139 | + * fail with an `InvalidArgument` error. |
| 140 | + * @param iopsPerGb iopsPerGb or {@code null} for none |
| 141 | + */ |
| 142 | + public PerformanceConfig setIopsPerGb(IOPSPerGB iopsPerGb) { |
| 143 | + this.iopsPerGb = iopsPerGb; |
| 144 | + return this; |
| 145 | + } |
| 146 | + |
| 147 | + @Override |
| 148 | + public PerformanceConfig set(String fieldName, Object value) { |
| 149 | + return (PerformanceConfig) super.set(fieldName, value); |
| 150 | + } |
| 151 | + |
| 152 | + @Override |
| 153 | + public PerformanceConfig clone() { |
| 154 | + return (PerformanceConfig) super.clone(); |
| 155 | + } |
| 156 | + |
| 157 | +} |
0 commit comments