|
| 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.discoveryengine.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * `Distribution` contains summary statistics for a population of values. It optionally contains a |
| 21 | + * histogram representing the distribution of those values across a set of buckets. The summary |
| 22 | + * statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the |
| 23 | + * maximum of the set of population of values. The histogram is based on a sequence of buckets and |
| 24 | + * gives a count of values that fall into each bucket. The boundaries of the buckets are given |
| 25 | + * either explicitly or by formulas for buckets of fixed or exponentially increasing widths. |
| 26 | + * Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities |
| 27 | + * or NaNs) in the population of values, as this will render the `mean` and |
| 28 | + * `sum_of_squared_deviation` fields meaningless. |
| 29 | + * |
| 30 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 31 | + * transmitted over HTTP when working with the Discovery Engine API. For a detailed explanation see: |
| 32 | + * <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> |
| 33 | + * </p> |
| 34 | + * |
| 35 | + * @author Google, Inc. |
| 36 | + */ |
| 37 | +@SuppressWarnings("javadoc") |
| 38 | +public final class GoogleApiDistribution extends com.google.api.client.json.GenericJson { |
| 39 | + |
| 40 | + /** |
| 41 | + * The number of values in each bucket of the histogram, as described in `bucket_options`. If the |
| 42 | + * distribution does not have a histogram, then omit this field. If there is a histogram, then the |
| 43 | + * sum of the values in `bucket_counts` must equal the value in the `count` field of the |
| 44 | + * distribution. If present, `bucket_counts` should contain N values, where N is the number of |
| 45 | + * buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values |
| 46 | + * are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering |
| 47 | + * schemes described for the three bucket types. The first value must be the count for the |
| 48 | + * underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number |
| 49 | + * 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number |
| 50 | + * N-1). |
| 51 | + * The value may be {@code null}. |
| 52 | + */ |
| 53 | + @com.google.api.client.util.Key @com.google.api.client.json.JsonString |
| 54 | + private java.util.List<java.lang.Long> bucketCounts; |
| 55 | + |
| 56 | + /** |
| 57 | + * Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then |
| 58 | + * omit this field. |
| 59 | + * The value may be {@code null}. |
| 60 | + */ |
| 61 | + @com.google.api.client.util.Key |
| 62 | + private GoogleApiDistributionBucketOptions bucketOptions; |
| 63 | + |
| 64 | + /** |
| 65 | + * The number of values in the population. Must be non-negative. This value must equal the sum of |
| 66 | + * the values in `bucket_counts` if a histogram is provided. |
| 67 | + * The value may be {@code null}. |
| 68 | + */ |
| 69 | + @com.google.api.client.util.Key @com.google.api.client.json.JsonString |
| 70 | + private java.lang.Long count; |
| 71 | + |
| 72 | + /** |
| 73 | + * Must be in increasing order of `value` field. |
| 74 | + * The value may be {@code null}. |
| 75 | + */ |
| 76 | + @com.google.api.client.util.Key |
| 77 | + private java.util.List<GoogleApiDistributionExemplar> exemplars; |
| 78 | + |
| 79 | + /** |
| 80 | + * The arithmetic mean of the values in the population. If `count` is zero then this field must be |
| 81 | + * zero. |
| 82 | + * The value may be {@code null}. |
| 83 | + */ |
| 84 | + @com.google.api.client.util.Key |
| 85 | + private java.lang.Double mean; |
| 86 | + |
| 87 | + /** |
| 88 | + * If specified, contains the range of the population values. The field must not be present if the |
| 89 | + * `count` is zero. |
| 90 | + * The value may be {@code null}. |
| 91 | + */ |
| 92 | + @com.google.api.client.util.Key |
| 93 | + private GoogleApiDistributionRange range; |
| 94 | + |
| 95 | + /** |
| 96 | + * The sum of squared deviations from the mean of the values in the population. For values x_i |
| 97 | + * this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The Art of Computer Programming", Vol. 2, page |
| 98 | + * 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` |
| 99 | + * is zero then this field must be zero. |
| 100 | + * The value may be {@code null}. |
| 101 | + */ |
| 102 | + @com.google.api.client.util.Key |
| 103 | + private java.lang.Double sumOfSquaredDeviation; |
| 104 | + |
| 105 | + /** |
| 106 | + * The number of values in each bucket of the histogram, as described in `bucket_options`. If the |
| 107 | + * distribution does not have a histogram, then omit this field. If there is a histogram, then the |
| 108 | + * sum of the values in `bucket_counts` must equal the value in the `count` field of the |
| 109 | + * distribution. If present, `bucket_counts` should contain N values, where N is the number of |
| 110 | + * buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values |
| 111 | + * are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering |
| 112 | + * schemes described for the three bucket types. The first value must be the count for the |
| 113 | + * underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number |
| 114 | + * 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number |
| 115 | + * N-1). |
| 116 | + * @return value or {@code null} for none |
| 117 | + */ |
| 118 | + public java.util.List<java.lang.Long> getBucketCounts() { |
| 119 | + return bucketCounts; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * The number of values in each bucket of the histogram, as described in `bucket_options`. If the |
| 124 | + * distribution does not have a histogram, then omit this field. If there is a histogram, then the |
| 125 | + * sum of the values in `bucket_counts` must equal the value in the `count` field of the |
| 126 | + * distribution. If present, `bucket_counts` should contain N values, where N is the number of |
| 127 | + * buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values |
| 128 | + * are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering |
| 129 | + * schemes described for the three bucket types. The first value must be the count for the |
| 130 | + * underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number |
| 131 | + * 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number |
| 132 | + * N-1). |
| 133 | + * @param bucketCounts bucketCounts or {@code null} for none |
| 134 | + */ |
| 135 | + public GoogleApiDistribution setBucketCounts(java.util.List<java.lang.Long> bucketCounts) { |
| 136 | + this.bucketCounts = bucketCounts; |
| 137 | + return this; |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then |
| 142 | + * omit this field. |
| 143 | + * @return value or {@code null} for none |
| 144 | + */ |
| 145 | + public GoogleApiDistributionBucketOptions getBucketOptions() { |
| 146 | + return bucketOptions; |
| 147 | + } |
| 148 | + |
| 149 | + /** |
| 150 | + * Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then |
| 151 | + * omit this field. |
| 152 | + * @param bucketOptions bucketOptions or {@code null} for none |
| 153 | + */ |
| 154 | + public GoogleApiDistribution setBucketOptions(GoogleApiDistributionBucketOptions bucketOptions) { |
| 155 | + this.bucketOptions = bucketOptions; |
| 156 | + return this; |
| 157 | + } |
| 158 | + |
| 159 | + /** |
| 160 | + * The number of values in the population. Must be non-negative. This value must equal the sum of |
| 161 | + * the values in `bucket_counts` if a histogram is provided. |
| 162 | + * @return value or {@code null} for none |
| 163 | + */ |
| 164 | + public java.lang.Long getCount() { |
| 165 | + return count; |
| 166 | + } |
| 167 | + |
| 168 | + /** |
| 169 | + * The number of values in the population. Must be non-negative. This value must equal the sum of |
| 170 | + * the values in `bucket_counts` if a histogram is provided. |
| 171 | + * @param count count or {@code null} for none |
| 172 | + */ |
| 173 | + public GoogleApiDistribution setCount(java.lang.Long count) { |
| 174 | + this.count = count; |
| 175 | + return this; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * Must be in increasing order of `value` field. |
| 180 | + * @return value or {@code null} for none |
| 181 | + */ |
| 182 | + public java.util.List<GoogleApiDistributionExemplar> getExemplars() { |
| 183 | + return exemplars; |
| 184 | + } |
| 185 | + |
| 186 | + /** |
| 187 | + * Must be in increasing order of `value` field. |
| 188 | + * @param exemplars exemplars or {@code null} for none |
| 189 | + */ |
| 190 | + public GoogleApiDistribution setExemplars(java.util.List<GoogleApiDistributionExemplar> exemplars) { |
| 191 | + this.exemplars = exemplars; |
| 192 | + return this; |
| 193 | + } |
| 194 | + |
| 195 | + /** |
| 196 | + * The arithmetic mean of the values in the population. If `count` is zero then this field must be |
| 197 | + * zero. |
| 198 | + * @return value or {@code null} for none |
| 199 | + */ |
| 200 | + public java.lang.Double getMean() { |
| 201 | + return mean; |
| 202 | + } |
| 203 | + |
| 204 | + /** |
| 205 | + * The arithmetic mean of the values in the population. If `count` is zero then this field must be |
| 206 | + * zero. |
| 207 | + * @param mean mean or {@code null} for none |
| 208 | + */ |
| 209 | + public GoogleApiDistribution setMean(java.lang.Double mean) { |
| 210 | + this.mean = mean; |
| 211 | + return this; |
| 212 | + } |
| 213 | + |
| 214 | + /** |
| 215 | + * If specified, contains the range of the population values. The field must not be present if the |
| 216 | + * `count` is zero. |
| 217 | + * @return value or {@code null} for none |
| 218 | + */ |
| 219 | + public GoogleApiDistributionRange getRange() { |
| 220 | + return range; |
| 221 | + } |
| 222 | + |
| 223 | + /** |
| 224 | + * If specified, contains the range of the population values. The field must not be present if the |
| 225 | + * `count` is zero. |
| 226 | + * @param range range or {@code null} for none |
| 227 | + */ |
| 228 | + public GoogleApiDistribution setRange(GoogleApiDistributionRange range) { |
| 229 | + this.range = range; |
| 230 | + return this; |
| 231 | + } |
| 232 | + |
| 233 | + /** |
| 234 | + * The sum of squared deviations from the mean of the values in the population. For values x_i |
| 235 | + * this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The Art of Computer Programming", Vol. 2, page |
| 236 | + * 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` |
| 237 | + * is zero then this field must be zero. |
| 238 | + * @return value or {@code null} for none |
| 239 | + */ |
| 240 | + public java.lang.Double getSumOfSquaredDeviation() { |
| 241 | + return sumOfSquaredDeviation; |
| 242 | + } |
| 243 | + |
| 244 | + /** |
| 245 | + * The sum of squared deviations from the mean of the values in the population. For values x_i |
| 246 | + * this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The Art of Computer Programming", Vol. 2, page |
| 247 | + * 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` |
| 248 | + * is zero then this field must be zero. |
| 249 | + * @param sumOfSquaredDeviation sumOfSquaredDeviation or {@code null} for none |
| 250 | + */ |
| 251 | + public GoogleApiDistribution setSumOfSquaredDeviation(java.lang.Double sumOfSquaredDeviation) { |
| 252 | + this.sumOfSquaredDeviation = sumOfSquaredDeviation; |
| 253 | + return this; |
| 254 | + } |
| 255 | + |
| 256 | + @Override |
| 257 | + public GoogleApiDistribution set(String fieldName, Object value) { |
| 258 | + return (GoogleApiDistribution) super.set(fieldName, value); |
| 259 | + } |
| 260 | + |
| 261 | + @Override |
| 262 | + public GoogleApiDistribution clone() { |
| 263 | + return (GoogleApiDistribution) super.clone(); |
| 264 | + } |
| 265 | + |
| 266 | +} |
0 commit comments