|
| 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.recaptchaenterprise.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. |
| 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 reCAPTCHA Enterprise API. For a detailed explanation |
| 24 | + * 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 GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings extends com.google.api.client.json.GenericJson { |
| 32 | + |
| 33 | + /** |
| 34 | + * Optional. The action to score threshold map. The action name should be the same as the action |
| 35 | + * name passed in the `data-action` attribute (see |
| 36 | + * https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. |
| 37 | + * There is a maximum of 100 action settings. An action name has a maximum length of 100. |
| 38 | + * The value may be {@code null}. |
| 39 | + */ |
| 40 | + @com.google.api.client.util.Key |
| 41 | + private java.util.Map<String, GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings> actionSettings; |
| 42 | + |
| 43 | + static { |
| 44 | + // hack to force ProGuard to consider GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings used, since otherwise it would be stripped out |
| 45 | + // see https://github.com/google/google-api-java-client/issues/543 |
| 46 | + com.google.api.client.util.Data.nullOf(GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings.class); |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Required. Defines when a challenge is triggered (unless the default threshold is overridden for |
| 51 | + * the given action, see `action_settings`). |
| 52 | + * The value may be {@code null}. |
| 53 | + */ |
| 54 | + @com.google.api.client.util.Key |
| 55 | + private GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings defaultSettings; |
| 56 | + |
| 57 | + /** |
| 58 | + * Optional. The action to score threshold map. The action name should be the same as the action |
| 59 | + * name passed in the `data-action` attribute (see |
| 60 | + * https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. |
| 61 | + * There is a maximum of 100 action settings. An action name has a maximum length of 100. |
| 62 | + * @return value or {@code null} for none |
| 63 | + */ |
| 64 | + public java.util.Map<String, GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings> getActionSettings() { |
| 65 | + return actionSettings; |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Optional. The action to score threshold map. The action name should be the same as the action |
| 70 | + * name passed in the `data-action` attribute (see |
| 71 | + * https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. |
| 72 | + * There is a maximum of 100 action settings. An action name has a maximum length of 100. |
| 73 | + * @param actionSettings actionSettings or {@code null} for none |
| 74 | + */ |
| 75 | + public GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings setActionSettings(java.util.Map<String, GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings> actionSettings) { |
| 76 | + this.actionSettings = actionSettings; |
| 77 | + return this; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * Required. Defines when a challenge is triggered (unless the default threshold is overridden for |
| 82 | + * the given action, see `action_settings`). |
| 83 | + * @return value or {@code null} for none |
| 84 | + */ |
| 85 | + public GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings getDefaultSettings() { |
| 86 | + return defaultSettings; |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * Required. Defines when a challenge is triggered (unless the default threshold is overridden for |
| 91 | + * the given action, see `action_settings`). |
| 92 | + * @param defaultSettings defaultSettings or {@code null} for none |
| 93 | + */ |
| 94 | + public GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings setDefaultSettings(GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings defaultSettings) { |
| 95 | + this.defaultSettings = defaultSettings; |
| 96 | + return this; |
| 97 | + } |
| 98 | + |
| 99 | + @Override |
| 100 | + public GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings set(String fieldName, Object value) { |
| 101 | + return (GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings) super.set(fieldName, value); |
| 102 | + } |
| 103 | + |
| 104 | + @Override |
| 105 | + public GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings clone() { |
| 106 | + return (GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings) super.clone(); |
| 107 | + } |
| 108 | + |
| 109 | +} |
0 commit comments