|
| 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.orgpolicy.v2.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Currently used for Managed Constraints. This represents a subset of fields missing from |
| 21 | + * Constraint proto that are required to describe CustomConstraint |
| 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 Organization Policy API. For a detailed explanation |
| 25 | + * see: |
| 26 | + * <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> |
| 27 | + * </p> |
| 28 | + * |
| 29 | + * @author Google, Inc. |
| 30 | + */ |
| 31 | +@SuppressWarnings("javadoc") |
| 32 | +public final class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition extends com.google.api.client.json.GenericJson { |
| 33 | + |
| 34 | + /** |
| 35 | + * Allow or deny type. |
| 36 | + * The value may be {@code null}. |
| 37 | + */ |
| 38 | + @com.google.api.client.util.Key |
| 39 | + private java.lang.String actionType; |
| 40 | + |
| 41 | + /** |
| 42 | + * Org policy condition/expression. For example: |
| 43 | + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, |
| 44 | + * `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters. |
| 45 | + * The value may be {@code null}. |
| 46 | + */ |
| 47 | + @com.google.api.client.util.Key |
| 48 | + private java.lang.String condition; |
| 49 | + |
| 50 | + /** |
| 51 | + * All the operations being applied for this constraint. |
| 52 | + * The value may be {@code null}. |
| 53 | + */ |
| 54 | + @com.google.api.client.util.Key |
| 55 | + private java.util.List<java.lang.String> methodTypes; |
| 56 | + |
| 57 | + /** |
| 58 | + * Stores Structure of parameters used by Constraint condition. Key of map represents name of the |
| 59 | + * parameter. |
| 60 | + * The value may be {@code null}. |
| 61 | + */ |
| 62 | + @com.google.api.client.util.Key |
| 63 | + private java.util.Map<String, GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter> parameters; |
| 64 | + |
| 65 | + /** |
| 66 | + * The resource instance type on which this policy applies. Format will be of the form : `/` |
| 67 | + * Example: * `compute.googleapis.com/Instance`. |
| 68 | + * The value may be {@code null}. |
| 69 | + */ |
| 70 | + @com.google.api.client.util.Key |
| 71 | + private java.util.List<java.lang.String> resourceTypes; |
| 72 | + |
| 73 | + /** |
| 74 | + * Allow or deny type. |
| 75 | + * @return value or {@code null} for none |
| 76 | + */ |
| 77 | + public java.lang.String getActionType() { |
| 78 | + return actionType; |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * Allow or deny type. |
| 83 | + * @param actionType actionType or {@code null} for none |
| 84 | + */ |
| 85 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition setActionType(java.lang.String actionType) { |
| 86 | + this.actionType = actionType; |
| 87 | + return this; |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * Org policy condition/expression. For example: |
| 92 | + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, |
| 93 | + * `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters. |
| 94 | + * @return value or {@code null} for none |
| 95 | + */ |
| 96 | + public java.lang.String getCondition() { |
| 97 | + return condition; |
| 98 | + } |
| 99 | + |
| 100 | + /** |
| 101 | + * Org policy condition/expression. For example: |
| 102 | + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, |
| 103 | + * `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters. |
| 104 | + * @param condition condition or {@code null} for none |
| 105 | + */ |
| 106 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition setCondition(java.lang.String condition) { |
| 107 | + this.condition = condition; |
| 108 | + return this; |
| 109 | + } |
| 110 | + |
| 111 | + /** |
| 112 | + * All the operations being applied for this constraint. |
| 113 | + * @return value or {@code null} for none |
| 114 | + */ |
| 115 | + public java.util.List<java.lang.String> getMethodTypes() { |
| 116 | + return methodTypes; |
| 117 | + } |
| 118 | + |
| 119 | + /** |
| 120 | + * All the operations being applied for this constraint. |
| 121 | + * @param methodTypes methodTypes or {@code null} for none |
| 122 | + */ |
| 123 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition setMethodTypes(java.util.List<java.lang.String> methodTypes) { |
| 124 | + this.methodTypes = methodTypes; |
| 125 | + return this; |
| 126 | + } |
| 127 | + |
| 128 | + /** |
| 129 | + * Stores Structure of parameters used by Constraint condition. Key of map represents name of the |
| 130 | + * parameter. |
| 131 | + * @return value or {@code null} for none |
| 132 | + */ |
| 133 | + public java.util.Map<String, GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter> getParameters() { |
| 134 | + return parameters; |
| 135 | + } |
| 136 | + |
| 137 | + /** |
| 138 | + * Stores Structure of parameters used by Constraint condition. Key of map represents name of the |
| 139 | + * parameter. |
| 140 | + * @param parameters parameters or {@code null} for none |
| 141 | + */ |
| 142 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition setParameters(java.util.Map<String, GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter> parameters) { |
| 143 | + this.parameters = parameters; |
| 144 | + return this; |
| 145 | + } |
| 146 | + |
| 147 | + /** |
| 148 | + * The resource instance type on which this policy applies. Format will be of the form : `/` |
| 149 | + * Example: * `compute.googleapis.com/Instance`. |
| 150 | + * @return value or {@code null} for none |
| 151 | + */ |
| 152 | + public java.util.List<java.lang.String> getResourceTypes() { |
| 153 | + return resourceTypes; |
| 154 | + } |
| 155 | + |
| 156 | + /** |
| 157 | + * The resource instance type on which this policy applies. Format will be of the form : `/` |
| 158 | + * Example: * `compute.googleapis.com/Instance`. |
| 159 | + * @param resourceTypes resourceTypes or {@code null} for none |
| 160 | + */ |
| 161 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition setResourceTypes(java.util.List<java.lang.String> resourceTypes) { |
| 162 | + this.resourceTypes = resourceTypes; |
| 163 | + return this; |
| 164 | + } |
| 165 | + |
| 166 | + @Override |
| 167 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition set(String fieldName, Object value) { |
| 168 | + return (GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition) super.set(fieldName, value); |
| 169 | + } |
| 170 | + |
| 171 | + @Override |
| 172 | + public GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition clone() { |
| 173 | + return (GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition) super.clone(); |
| 174 | + } |
| 175 | + |
| 176 | +} |
0 commit comments