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

/**
 * Telemetry data reported by a managed device.
 *
 * <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 Chrome Management 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 GoogleChromeManagementV1TelemetryEvent extends com.google.api.client.json.GenericJson {

  /**
   * Output only. Payload for audio severe underrun event. Present only when the `event_type` field
   * is `AUDIO_SEVERE_UNDERRUN`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleChromeManagementV1TelemetryAudioSevereUnderrunEvent audioSevereUnderrunEvent;

  /**
   * Output only. Information about the device associated with the event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleChromeManagementV1TelemetryDeviceInfo device;

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

  /**
   * Output only. Payload for HTTPS latency change event. Present only when `event_type` is
   * `NETWORK_HTTPS_LATENCY_CHANGE`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent httpsLatencyChangeEvent;

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

  /**
   * Timestamp that represents when the event was reported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String reportTime;

  /**
   * Output only. Payload for usb peripherals event. Present only when the `event_type` field is
   * either `USB_ADDED` or `USB_REMOVED`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleChromeManagementV1TelemetryUsbPeripheralsEvent usbPeripheralsEvent;

  /**
   * Output only. Information about the user associated with the event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleChromeManagementV1TelemetryUserInfo user;

  /**
   * Output only. Payload for audio severe underrun event. Present only when the `event_type` field
   * is `AUDIO_SEVERE_UNDERRUN`.
   * @return value or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryAudioSevereUnderrunEvent getAudioSevereUnderrunEvent() {
    return audioSevereUnderrunEvent;
  }

  /**
   * Output only. Payload for audio severe underrun event. Present only when the `event_type` field
   * is `AUDIO_SEVERE_UNDERRUN`.
   * @param audioSevereUnderrunEvent audioSevereUnderrunEvent or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setAudioSevereUnderrunEvent(GoogleChromeManagementV1TelemetryAudioSevereUnderrunEvent audioSevereUnderrunEvent) {
    this.audioSevereUnderrunEvent = audioSevereUnderrunEvent;
    return this;
  }

  /**
   * Output only. Information about the device associated with the event.
   * @return value or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryDeviceInfo getDevice() {
    return device;
  }

  /**
   * Output only. Information about the device associated with the event.
   * @param device device or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setDevice(GoogleChromeManagementV1TelemetryDeviceInfo device) {
    this.device = device;
    return this;
  }

  /**
   * The event type of the current event.
   * @return value or {@code null} for none
   */
  public java.lang.String getEventType() {
    return eventType;
  }

  /**
   * The event type of the current event.
   * @param eventType eventType or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setEventType(java.lang.String eventType) {
    this.eventType = eventType;
    return this;
  }

  /**
   * Output only. Payload for HTTPS latency change event. Present only when `event_type` is
   * `NETWORK_HTTPS_LATENCY_CHANGE`.
   * @return value or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent getHttpsLatencyChangeEvent() {
    return httpsLatencyChangeEvent;
  }

  /**
   * Output only. Payload for HTTPS latency change event. Present only when `event_type` is
   * `NETWORK_HTTPS_LATENCY_CHANGE`.
   * @param httpsLatencyChangeEvent httpsLatencyChangeEvent or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setHttpsLatencyChangeEvent(GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent httpsLatencyChangeEvent) {
    this.httpsLatencyChangeEvent = httpsLatencyChangeEvent;
    return this;
  }

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

  /**
   * Output only. Resource name of the event.
   * @param name name or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Timestamp that represents when the event was reported.
   * @return value or {@code null} for none
   */
  public String getReportTime() {
    return reportTime;
  }

  /**
   * Timestamp that represents when the event was reported.
   * @param reportTime reportTime or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setReportTime(String reportTime) {
    this.reportTime = reportTime;
    return this;
  }

  /**
   * Output only. Payload for usb peripherals event. Present only when the `event_type` field is
   * either `USB_ADDED` or `USB_REMOVED`.
   * @return value or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryUsbPeripheralsEvent getUsbPeripheralsEvent() {
    return usbPeripheralsEvent;
  }

  /**
   * Output only. Payload for usb peripherals event. Present only when the `event_type` field is
   * either `USB_ADDED` or `USB_REMOVED`.
   * @param usbPeripheralsEvent usbPeripheralsEvent or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setUsbPeripheralsEvent(GoogleChromeManagementV1TelemetryUsbPeripheralsEvent usbPeripheralsEvent) {
    this.usbPeripheralsEvent = usbPeripheralsEvent;
    return this;
  }

  /**
   * Output only. Information about the user associated with the event.
   * @return value or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryUserInfo getUser() {
    return user;
  }

  /**
   * Output only. Information about the user associated with the event.
   * @param user user or {@code null} for none
   */
  public GoogleChromeManagementV1TelemetryEvent setUser(GoogleChromeManagementV1TelemetryUserInfo user) {
    this.user = user;
    return this;
  }

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

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

}
