/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.recaptchaenterprise.v1.model;

/**
 * Policy config assessment.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the reCAPTCHA Enterprise API. For a detailed explanation
 * see:
 * <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>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment extends com.google.api.client.json.GenericJson {

  /**
   * If the processing of a policy config fails, an error will be populated and the firewall_policy
   * will be left empty.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleRpcStatus error;

  /**
   * Output only. The policy that matched the request. If more than one policy may match, this is
   * the first match. If no policy matches the incoming request, the policy field will be left
   * empty.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudRecaptchaenterpriseV1FirewallPolicy firewallPolicy;

  /**
   * If the processing of a policy config fails, an error will be populated and the firewall_policy
   * will be left empty.
   * @return value or {@code null} for none
   */
  public GoogleRpcStatus getError() {
    return error;
  }

  /**
   * If the processing of a policy config fails, an error will be populated and the firewall_policy
   * will be left empty.
   * @param error error or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment setError(GoogleRpcStatus error) {
    this.error = error;
    return this;
  }

  /**
   * Output only. The policy that matched the request. If more than one policy may match, this is
   * the first match. If no policy matches the incoming request, the policy field will be left
   * empty.
   * @return value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1FirewallPolicy getFirewallPolicy() {
    return firewallPolicy;
  }

  /**
   * Output only. The policy that matched the request. If more than one policy may match, this is
   * the first match. If no policy matches the incoming request, the policy field will be left
   * empty.
   * @param firewallPolicy firewallPolicy or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment setFirewallPolicy(GoogleCloudRecaptchaenterpriseV1FirewallPolicy firewallPolicy) {
    this.firewallPolicy = firewallPolicy;
    return this;
  }

  @Override
  public GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment set(String fieldName, Object value) {
    return (GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment clone() {
    return (GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment) super.clone();
  }

}
