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

/**
 * JSON template for the activity resource.
 *
 * <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 Admin Reports 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 Activity extends com.google.api.client.json.GenericJson {

  /**
   * User doing the action.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Actor actor;

  /**
   * ETag of the entry.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String etag;

  /**
   * Activity events.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Events> events;

  static {
    // hack to force ProGuard to consider Events used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(Events.class);
  }

  /**
   * Unique identifier for each activity record.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Id id;

  /**
   * IP Address of the user doing the action.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ipAddress;

  /**
   * Kind of resource this is.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String kind;

  /**
   * Domain of source customer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ownerDomain;

  /**
   * User doing the action.
   * @return value or {@code null} for none
   */
  public Actor getActor() {
    return actor;
  }

  /**
   * User doing the action.
   * @param actor actor or {@code null} for none
   */
  public Activity setActor(Actor actor) {
    this.actor = actor;
    return this;
  }

  /**
   * ETag of the entry.
   * @return value or {@code null} for none
   */
  public java.lang.String getEtag() {
    return etag;
  }

  /**
   * ETag of the entry.
   * @param etag etag or {@code null} for none
   */
  public Activity setEtag(java.lang.String etag) {
    this.etag = etag;
    return this;
  }

  /**
   * Activity events.
   * @return value or {@code null} for none
   */
  public java.util.List<Events> getEvents() {
    return events;
  }

  /**
   * Activity events.
   * @param events events or {@code null} for none
   */
  public Activity setEvents(java.util.List<Events> events) {
    this.events = events;
    return this;
  }

  /**
   * Unique identifier for each activity record.
   * @return value or {@code null} for none
   */
  public Id getId() {
    return id;
  }

  /**
   * Unique identifier for each activity record.
   * @param id id or {@code null} for none
   */
  public Activity setId(Id id) {
    this.id = id;
    return this;
  }

  /**
   * IP Address of the user doing the action.
   * @return value or {@code null} for none
   */
  public java.lang.String getIpAddress() {
    return ipAddress;
  }

  /**
   * IP Address of the user doing the action.
   * @param ipAddress ipAddress or {@code null} for none
   */
  public Activity setIpAddress(java.lang.String ipAddress) {
    this.ipAddress = ipAddress;
    return this;
  }

  /**
   * Kind of resource this is.
   * @return value or {@code null} for none
   */
  public java.lang.String getKind() {
    return kind;
  }

  /**
   * Kind of resource this is.
   * @param kind kind or {@code null} for none
   */
  public Activity setKind(java.lang.String kind) {
    this.kind = kind;
    return this;
  }

  /**
   * Domain of source customer.
   * @return value or {@code null} for none
   */
  public java.lang.String getOwnerDomain() {
    return ownerDomain;
  }

  /**
   * Domain of source customer.
   * @param ownerDomain ownerDomain or {@code null} for none
   */
  public Activity setOwnerDomain(java.lang.String ownerDomain) {
    this.ownerDomain = ownerDomain;
    return this;
  }

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

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

  /**
   * User doing the action.
   */
  public static final class Actor extends com.google.api.client.json.GenericJson {

    /**
     * User or OAuth 2LO request.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String callerType;

    /**
     * Email address of the user.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String email;

    /**
     * For OAuth 2LO API requests, consumer_key of the requestor.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String key;

    /**
     * Obfuscated user id of the user.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String profileId;

    /**
     * User or OAuth 2LO request.
     * @return value or {@code null} for none
     */
    public java.lang.String getCallerType() {
      return callerType;
    }

    /**
     * User or OAuth 2LO request.
     * @param callerType callerType or {@code null} for none
     */
    public Actor setCallerType(java.lang.String callerType) {
      this.callerType = callerType;
      return this;
    }

    /**
     * Email address of the user.
     * @return value or {@code null} for none
     */
    public java.lang.String getEmail() {
      return email;
    }

    /**
     * Email address of the user.
     * @param email email or {@code null} for none
     */
    public Actor setEmail(java.lang.String email) {
      this.email = email;
      return this;
    }

    /**
     * For OAuth 2LO API requests, consumer_key of the requestor.
     * @return value or {@code null} for none
     */
    public java.lang.String getKey() {
      return key;
    }

    /**
     * For OAuth 2LO API requests, consumer_key of the requestor.
     * @param key key or {@code null} for none
     */
    public Actor setKey(java.lang.String key) {
      this.key = key;
      return this;
    }

    /**
     * Obfuscated user id of the user.
     * @return value or {@code null} for none
     */
    public java.lang.String getProfileId() {
      return profileId;
    }

    /**
     * Obfuscated user id of the user.
     * @param profileId profileId or {@code null} for none
     */
    public Actor setProfileId(java.lang.String profileId) {
      this.profileId = profileId;
      return this;
    }

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

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

  }

  /**
   * Model definition for ActivityEvents.
   */
  public static final class Events extends com.google.api.client.json.GenericJson {

    /**
     * Name of event.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String name;

    /**
     * Parameter value pairs for various applications.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.util.List<Parameters> parameters;

    static {
      // hack to force ProGuard to consider Parameters used, since otherwise it would be stripped out
      // see https://github.com/google/google-api-java-client/issues/543
      com.google.api.client.util.Data.nullOf(Parameters.class);
    }

    /**
     * Type of event.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String type;

    /**
     * Name of event.
     * @return value or {@code null} for none
     */
    public java.lang.String getName() {
      return name;
    }

    /**
     * Name of event.
     * @param name name or {@code null} for none
     */
    public Events setName(java.lang.String name) {
      this.name = name;
      return this;
    }

    /**
     * Parameter value pairs for various applications.
     * @return value or {@code null} for none
     */
    public java.util.List<Parameters> getParameters() {
      return parameters;
    }

    /**
     * Parameter value pairs for various applications.
     * @param parameters parameters or {@code null} for none
     */
    public Events setParameters(java.util.List<Parameters> parameters) {
      this.parameters = parameters;
      return this;
    }

    /**
     * Type of event.
     * @return value or {@code null} for none
     */
    public java.lang.String getType() {
      return type;
    }

    /**
     * Type of event.
     * @param type type or {@code null} for none
     */
    public Events setType(java.lang.String type) {
      this.type = type;
      return this;
    }

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

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

    /**
     * Model definition for ActivityEventsParameters.
     */
    public static final class Parameters extends com.google.api.client.json.GenericJson {

      /**
       * Boolean value of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key
      private java.lang.Boolean boolValue;

      /**
       * Integral value of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key @com.google.api.client.json.JsonString
      private java.lang.Long intValue;

      /**
       * Nested value of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key
      private MessageValue messageValue;

      /**
       * Multi-int value of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key @com.google.api.client.json.JsonString
      private java.util.List<java.lang.Long> multiIntValue;

      /**
       * Nested values of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key
      private java.util.List<MultiMessageValue> multiMessageValue;

      static {
        // hack to force ProGuard to consider MultiMessageValue used, since otherwise it would be stripped out
        // see https://github.com/google/google-api-java-client/issues/543
        com.google.api.client.util.Data.nullOf(MultiMessageValue.class);
      }

      /**
       * Multi-string value of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key
      private java.util.List<java.lang.String> multiValue;

      /**
       * The name of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /**
       * String value of the parameter.
       * The value may be {@code null}.
       */
      @com.google.api.client.util.Key
      private java.lang.String value;

      /**
       * Boolean value of the parameter.
       * @return value or {@code null} for none
       */
      public java.lang.Boolean getBoolValue() {
        return boolValue;
      }

      /**
       * Boolean value of the parameter.
       * @param boolValue boolValue or {@code null} for none
       */
      public Parameters setBoolValue(java.lang.Boolean boolValue) {
        this.boolValue = boolValue;
        return this;
      }

      /**
       * Integral value of the parameter.
       * @return value or {@code null} for none
       */
      public java.lang.Long getIntValue() {
        return intValue;
      }

      /**
       * Integral value of the parameter.
       * @param intValue intValue or {@code null} for none
       */
      public Parameters setIntValue(java.lang.Long intValue) {
        this.intValue = intValue;
        return this;
      }

      /**
       * Nested value of the parameter.
       * @return value or {@code null} for none
       */
      public MessageValue getMessageValue() {
        return messageValue;
      }

      /**
       * Nested value of the parameter.
       * @param messageValue messageValue or {@code null} for none
       */
      public Parameters setMessageValue(MessageValue messageValue) {
        this.messageValue = messageValue;
        return this;
      }

      /**
       * Multi-int value of the parameter.
       * @return value or {@code null} for none
       */
      public java.util.List<java.lang.Long> getMultiIntValue() {
        return multiIntValue;
      }

      /**
       * Multi-int value of the parameter.
       * @param multiIntValue multiIntValue or {@code null} for none
       */
      public Parameters setMultiIntValue(java.util.List<java.lang.Long> multiIntValue) {
        this.multiIntValue = multiIntValue;
        return this;
      }

      /**
       * Nested values of the parameter.
       * @return value or {@code null} for none
       */
      public java.util.List<MultiMessageValue> getMultiMessageValue() {
        return multiMessageValue;
      }

      /**
       * Nested values of the parameter.
       * @param multiMessageValue multiMessageValue or {@code null} for none
       */
      public Parameters setMultiMessageValue(java.util.List<MultiMessageValue> multiMessageValue) {
        this.multiMessageValue = multiMessageValue;
        return this;
      }

      /**
       * Multi-string value of the parameter.
       * @return value or {@code null} for none
       */
      public java.util.List<java.lang.String> getMultiValue() {
        return multiValue;
      }

      /**
       * Multi-string value of the parameter.
       * @param multiValue multiValue or {@code null} for none
       */
      public Parameters setMultiValue(java.util.List<java.lang.String> multiValue) {
        this.multiValue = multiValue;
        return this;
      }

      /**
       * The name of the parameter.
       * @return value or {@code null} for none
       */
      public java.lang.String getName() {
        return name;
      }

      /**
       * The name of the parameter.
       * @param name name or {@code null} for none
       */
      public Parameters setName(java.lang.String name) {
        this.name = name;
        return this;
      }

      /**
       * String value of the parameter.
       * @return value or {@code null} for none
       */
      public java.lang.String getValue() {
        return value;
      }

      /**
       * String value of the parameter.
       * @param value value or {@code null} for none
       */
      public Parameters setValue(java.lang.String value) {
        this.value = value;
        return this;
      }

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

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

      /**
       * Nested value of the parameter.
       */
      public static final class MessageValue extends com.google.api.client.json.GenericJson {

        /**
         * Looping to get parameter values.
         * The value may be {@code null}.
         */
        @com.google.api.client.util.Key
        private java.util.List<NestedParameter> parameter;

        /**
         * Looping to get parameter values.
         * @return value or {@code null} for none
         */
        public java.util.List<NestedParameter> getParameter() {
          return parameter;
        }

        /**
         * Looping to get parameter values.
         * @param parameter parameter or {@code null} for none
         */
        public MessageValue setParameter(java.util.List<NestedParameter> parameter) {
          this.parameter = parameter;
          return this;
        }

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

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

      }
      /**
       * Model definition for ActivityEventsParametersMultiMessageValue.
       */
      public static final class MultiMessageValue extends com.google.api.client.json.GenericJson {

        /**
         * Parameter value.
         * The value may be {@code null}.
         */
        @com.google.api.client.util.Key
        private java.util.List<NestedParameter> parameter;

        /**
         * Parameter value.
         * @return value or {@code null} for none
         */
        public java.util.List<NestedParameter> getParameter() {
          return parameter;
        }

        /**
         * Parameter value.
         * @param parameter parameter or {@code null} for none
         */
        public MultiMessageValue setParameter(java.util.List<NestedParameter> parameter) {
          this.parameter = parameter;
          return this;
        }

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

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

      }
    }
  }

  /**
   * Unique identifier for each activity record.
   */
  public static final class Id extends com.google.api.client.json.GenericJson {

    /**
     * Application name to which the event belongs.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String applicationName;

    /**
     * Obfuscated customer ID of the source customer.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private java.lang.String customerId;

    /**
     * Time of occurrence of the activity.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key
    private com.google.api.client.util.DateTime time;

    /**
     * Unique qualifier if multiple events have the same time.
     * The value may be {@code null}.
     */
    @com.google.api.client.util.Key @com.google.api.client.json.JsonString
    private java.lang.Long uniqueQualifier;

    /**
     * Application name to which the event belongs.
     * @return value or {@code null} for none
     */
    public java.lang.String getApplicationName() {
      return applicationName;
    }

    /**
     * Application name to which the event belongs.
     * @param applicationName applicationName or {@code null} for none
     */
    public Id setApplicationName(java.lang.String applicationName) {
      this.applicationName = applicationName;
      return this;
    }

    /**
     * Obfuscated customer ID of the source customer.
     * @return value or {@code null} for none
     */
    public java.lang.String getCustomerId() {
      return customerId;
    }

    /**
     * Obfuscated customer ID of the source customer.
     * @param customerId customerId or {@code null} for none
     */
    public Id setCustomerId(java.lang.String customerId) {
      this.customerId = customerId;
      return this;
    }

    /**
     * Time of occurrence of the activity.
     * @return value or {@code null} for none
     */
    public com.google.api.client.util.DateTime getTime() {
      return time;
    }

    /**
     * Time of occurrence of the activity.
     * @param time time or {@code null} for none
     */
    public Id setTime(com.google.api.client.util.DateTime time) {
      this.time = time;
      return this;
    }

    /**
     * Unique qualifier if multiple events have the same time.
     * @return value or {@code null} for none
     */
    public java.lang.Long getUniqueQualifier() {
      return uniqueQualifier;
    }

    /**
     * Unique qualifier if multiple events have the same time.
     * @param uniqueQualifier uniqueQualifier or {@code null} for none
     */
    public Id setUniqueQualifier(java.lang.Long uniqueQualifier) {
      this.uniqueQualifier = uniqueQualifier;
      return this;
    }

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

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

  }

}
