/*
 * 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.compute.model;

/**
 * [Deprecated] All fields defined in a principal are ANDed.
 *
 * <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 Compute Engine 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 Principal extends com.google.api.client.json.GenericJson {

  /**
   * An expression to specify custom condition.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String condition;

  /**
   * The groups the principal belongs to. Exact match, prefix match, and suffix match are supported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> groups;

  /**
   * IPv4 or IPv6 address or range (In CIDR format)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> ips;

  /**
   * The namespaces. Exact match, prefix match, and suffix match are supported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> namespaces;

  /**
   * Negate of groups. Specifies exclusions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> notGroups;

  /**
   * Negate of IPs. Specifies exclusions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> notIps;

  /**
   * Negate of namespaces. Specifies exclusions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> notNamespaces;

  /**
   * Negate of users. Specifies exclusions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> notUsers;

  /**
   * A map of Istio attribute to expected values. Exact match, prefix match, and suffix match are
   * supported for values. For example, `request.headers[version]: "v1"`. The properties are ANDed
   * together.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, java.lang.String> properties;

  /**
   * The user names/IDs or service accounts. Exact match, prefix match, and suffix match are
   * supported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> users;

  /**
   * An expression to specify custom condition.
   * @return value or {@code null} for none
   */
  public java.lang.String getCondition() {
    return condition;
  }

  /**
   * An expression to specify custom condition.
   * @param condition condition or {@code null} for none
   */
  public Principal setCondition(java.lang.String condition) {
    this.condition = condition;
    return this;
  }

  /**
   * The groups the principal belongs to. Exact match, prefix match, and suffix match are supported.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getGroups() {
    return groups;
  }

  /**
   * The groups the principal belongs to. Exact match, prefix match, and suffix match are supported.
   * @param groups groups or {@code null} for none
   */
  public Principal setGroups(java.util.List<java.lang.String> groups) {
    this.groups = groups;
    return this;
  }

  /**
   * IPv4 or IPv6 address or range (In CIDR format)
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getIps() {
    return ips;
  }

  /**
   * IPv4 or IPv6 address or range (In CIDR format)
   * @param ips ips or {@code null} for none
   */
  public Principal setIps(java.util.List<java.lang.String> ips) {
    this.ips = ips;
    return this;
  }

  /**
   * The namespaces. Exact match, prefix match, and suffix match are supported.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getNamespaces() {
    return namespaces;
  }

  /**
   * The namespaces. Exact match, prefix match, and suffix match are supported.
   * @param namespaces namespaces or {@code null} for none
   */
  public Principal setNamespaces(java.util.List<java.lang.String> namespaces) {
    this.namespaces = namespaces;
    return this;
  }

  /**
   * Negate of groups. Specifies exclusions.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getNotGroups() {
    return notGroups;
  }

  /**
   * Negate of groups. Specifies exclusions.
   * @param notGroups notGroups or {@code null} for none
   */
  public Principal setNotGroups(java.util.List<java.lang.String> notGroups) {
    this.notGroups = notGroups;
    return this;
  }

  /**
   * Negate of IPs. Specifies exclusions.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getNotIps() {
    return notIps;
  }

  /**
   * Negate of IPs. Specifies exclusions.
   * @param notIps notIps or {@code null} for none
   */
  public Principal setNotIps(java.util.List<java.lang.String> notIps) {
    this.notIps = notIps;
    return this;
  }

  /**
   * Negate of namespaces. Specifies exclusions.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getNotNamespaces() {
    return notNamespaces;
  }

  /**
   * Negate of namespaces. Specifies exclusions.
   * @param notNamespaces notNamespaces or {@code null} for none
   */
  public Principal setNotNamespaces(java.util.List<java.lang.String> notNamespaces) {
    this.notNamespaces = notNamespaces;
    return this;
  }

  /**
   * Negate of users. Specifies exclusions.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getNotUsers() {
    return notUsers;
  }

  /**
   * Negate of users. Specifies exclusions.
   * @param notUsers notUsers or {@code null} for none
   */
  public Principal setNotUsers(java.util.List<java.lang.String> notUsers) {
    this.notUsers = notUsers;
    return this;
  }

  /**
   * A map of Istio attribute to expected values. Exact match, prefix match, and suffix match are
   * supported for values. For example, `request.headers[version]: "v1"`. The properties are ANDed
   * together.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.String> getProperties() {
    return properties;
  }

  /**
   * A map of Istio attribute to expected values. Exact match, prefix match, and suffix match are
   * supported for values. For example, `request.headers[version]: "v1"`. The properties are ANDed
   * together.
   * @param properties properties or {@code null} for none
   */
  public Principal setProperties(java.util.Map<String, java.lang.String> properties) {
    this.properties = properties;
    return this;
  }

  /**
   * The user names/IDs or service accounts. Exact match, prefix match, and suffix match are
   * supported.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getUsers() {
    return users;
  }

  /**
   * The user names/IDs or service accounts. Exact match, prefix match, and suffix match are
   * supported.
   * @param users users or {@code null} for none
   */
  public Principal setUsers(java.util.List<java.lang.String> users) {
    this.users = users;
    return this;
  }

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

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

}
