/clients/google-api-services-sqladmin/v1beta4/1.30.1/com/google/api/services/sqladmin/model/Flag.java

https://github.com/googleapis/google-api-java-client-services · Java · 294 lines · 102 code · 35 blank · 157 comment · 0 complexity · 6d2b03b1f41fcf38d8ee7bb8be128a09 MD5 · raw file

  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. package com.google.api.services.sqladmin.model;
  17. /**
  18. * A flag resource.
  19. *
  20. * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
  21. * transmitted over HTTP when working with the Cloud SQL Admin API. For a detailed explanation see:
  22. * <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>
  23. * </p>
  24. *
  25. * @author Google, Inc.
  26. */
  27. @SuppressWarnings("javadoc")
  28. public final class Flag extends com.google.api.client.json.GenericJson {
  29. /**
  30. * Use this field if only certain integers are accepted. Can be combined with min_value and
  31. * max_value to add additional values.
  32. * The value may be {@code null}.
  33. */
  34. @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  35. private java.util.List<java.lang.Long> allowedIntValues;
  36. /**
  37. * For *STRING* flags, a list of strings that the value can be set to.
  38. * The value may be {@code null}.
  39. */
  40. @com.google.api.client.util.Key
  41. private java.util.List<java.lang.String> allowedStringValues;
  42. /**
  43. * The database version this flag applies to. Can be *MYSQL_8_0*, *MYSQL_5_6*, or *MYSQL_5_7*.
  44. * The value may be {@code null}.
  45. */
  46. @com.google.api.client.util.Key
  47. private java.util.List<java.lang.String> appliesTo;
  48. /**
  49. * Whether or not the flag is considered in beta.
  50. * The value may be {@code null}.
  51. */
  52. @com.google.api.client.util.Key
  53. private java.lang.Boolean inBeta;
  54. /**
  55. * This is always *sql#flag*.
  56. * The value may be {@code null}.
  57. */
  58. @com.google.api.client.util.Key
  59. private java.lang.String kind;
  60. /**
  61. * For *INTEGER* flags, the maximum allowed value.
  62. * The value may be {@code null}.
  63. */
  64. @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  65. private java.lang.Long maxValue;
  66. /**
  67. * For *INTEGER* flags, the minimum allowed value.
  68. * The value may be {@code null}.
  69. */
  70. @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  71. private java.lang.Long minValue;
  72. /**
  73. * This is the name of the flag. Flag names always use underscores, not hyphens, for example:
  74. * *max_allowed_packet*
  75. * The value may be {@code null}.
  76. */
  77. @com.google.api.client.util.Key
  78. private java.lang.String name;
  79. /**
  80. * Indicates whether changing this flag will trigger a database restart. Only applicable to Second
  81. * Generation instances.
  82. * The value may be {@code null}.
  83. */
  84. @com.google.api.client.util.Key
  85. private java.lang.Boolean requiresRestart;
  86. /**
  87. * The type of the flag. Flags are typed to being *BOOLEAN*, *STRING*, *INTEGER* or *NONE*. *NONE*
  88. * is used for flags which do not take a value, such as *skip_grant_tables*.
  89. * The value may be {@code null}.
  90. */
  91. @com.google.api.client.util.Key
  92. private java.lang.String type;
  93. /**
  94. * Use this field if only certain integers are accepted. Can be combined with min_value and
  95. * max_value to add additional values.
  96. * @return value or {@code null} for none
  97. */
  98. public java.util.List<java.lang.Long> getAllowedIntValues() {
  99. return allowedIntValues;
  100. }
  101. /**
  102. * Use this field if only certain integers are accepted. Can be combined with min_value and
  103. * max_value to add additional values.
  104. * @param allowedIntValues allowedIntValues or {@code null} for none
  105. */
  106. public Flag setAllowedIntValues(java.util.List<java.lang.Long> allowedIntValues) {
  107. this.allowedIntValues = allowedIntValues;
  108. return this;
  109. }
  110. /**
  111. * For *STRING* flags, a list of strings that the value can be set to.
  112. * @return value or {@code null} for none
  113. */
  114. public java.util.List<java.lang.String> getAllowedStringValues() {
  115. return allowedStringValues;
  116. }
  117. /**
  118. * For *STRING* flags, a list of strings that the value can be set to.
  119. * @param allowedStringValues allowedStringValues or {@code null} for none
  120. */
  121. public Flag setAllowedStringValues(java.util.List<java.lang.String> allowedStringValues) {
  122. this.allowedStringValues = allowedStringValues;
  123. return this;
  124. }
  125. /**
  126. * The database version this flag applies to. Can be *MYSQL_8_0*, *MYSQL_5_6*, or *MYSQL_5_7*.
  127. * @return value or {@code null} for none
  128. */
  129. public java.util.List<java.lang.String> getAppliesTo() {
  130. return appliesTo;
  131. }
  132. /**
  133. * The database version this flag applies to. Can be *MYSQL_8_0*, *MYSQL_5_6*, or *MYSQL_5_7*.
  134. * @param appliesTo appliesTo or {@code null} for none
  135. */
  136. public Flag setAppliesTo(java.util.List<java.lang.String> appliesTo) {
  137. this.appliesTo = appliesTo;
  138. return this;
  139. }
  140. /**
  141. * Whether or not the flag is considered in beta.
  142. * @return value or {@code null} for none
  143. */
  144. public java.lang.Boolean getInBeta() {
  145. return inBeta;
  146. }
  147. /**
  148. * Whether or not the flag is considered in beta.
  149. * @param inBeta inBeta or {@code null} for none
  150. */
  151. public Flag setInBeta(java.lang.Boolean inBeta) {
  152. this.inBeta = inBeta;
  153. return this;
  154. }
  155. /**
  156. * This is always *sql#flag*.
  157. * @return value or {@code null} for none
  158. */
  159. public java.lang.String getKind() {
  160. return kind;
  161. }
  162. /**
  163. * This is always *sql#flag*.
  164. * @param kind kind or {@code null} for none
  165. */
  166. public Flag setKind(java.lang.String kind) {
  167. this.kind = kind;
  168. return this;
  169. }
  170. /**
  171. * For *INTEGER* flags, the maximum allowed value.
  172. * @return value or {@code null} for none
  173. */
  174. public java.lang.Long getMaxValue() {
  175. return maxValue;
  176. }
  177. /**
  178. * For *INTEGER* flags, the maximum allowed value.
  179. * @param maxValue maxValue or {@code null} for none
  180. */
  181. public Flag setMaxValue(java.lang.Long maxValue) {
  182. this.maxValue = maxValue;
  183. return this;
  184. }
  185. /**
  186. * For *INTEGER* flags, the minimum allowed value.
  187. * @return value or {@code null} for none
  188. */
  189. public java.lang.Long getMinValue() {
  190. return minValue;
  191. }
  192. /**
  193. * For *INTEGER* flags, the minimum allowed value.
  194. * @param minValue minValue or {@code null} for none
  195. */
  196. public Flag setMinValue(java.lang.Long minValue) {
  197. this.minValue = minValue;
  198. return this;
  199. }
  200. /**
  201. * This is the name of the flag. Flag names always use underscores, not hyphens, for example:
  202. * *max_allowed_packet*
  203. * @return value or {@code null} for none
  204. */
  205. public java.lang.String getName() {
  206. return name;
  207. }
  208. /**
  209. * This is the name of the flag. Flag names always use underscores, not hyphens, for example:
  210. * *max_allowed_packet*
  211. * @param name name or {@code null} for none
  212. */
  213. public Flag setName(java.lang.String name) {
  214. this.name = name;
  215. return this;
  216. }
  217. /**
  218. * Indicates whether changing this flag will trigger a database restart. Only applicable to Second
  219. * Generation instances.
  220. * @return value or {@code null} for none
  221. */
  222. public java.lang.Boolean getRequiresRestart() {
  223. return requiresRestart;
  224. }
  225. /**
  226. * Indicates whether changing this flag will trigger a database restart. Only applicable to Second
  227. * Generation instances.
  228. * @param requiresRestart requiresRestart or {@code null} for none
  229. */
  230. public Flag setRequiresRestart(java.lang.Boolean requiresRestart) {
  231. this.requiresRestart = requiresRestart;
  232. return this;
  233. }
  234. /**
  235. * The type of the flag. Flags are typed to being *BOOLEAN*, *STRING*, *INTEGER* or *NONE*. *NONE*
  236. * is used for flags which do not take a value, such as *skip_grant_tables*.
  237. * @return value or {@code null} for none
  238. */
  239. public java.lang.String getType() {
  240. return type;
  241. }
  242. /**
  243. * The type of the flag. Flags are typed to being *BOOLEAN*, *STRING*, *INTEGER* or *NONE*. *NONE*
  244. * is used for flags which do not take a value, such as *skip_grant_tables*.
  245. * @param type type or {@code null} for none
  246. */
  247. public Flag setType(java.lang.String type) {
  248. this.type = type;
  249. return this;
  250. }
  251. @Override
  252. public Flag set(String fieldName, Object value) {
  253. return (Flag) super.set(fieldName, value);
  254. }
  255. @Override
  256. public Flag clone() {
  257. return (Flag) super.clone();
  258. }
  259. }