# Copyright 2019 Google LLC
#
# 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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Admin.Reports_v1.Model.ActivityEvents do
  @moduledoc """


  ## Attributes

  *   `name` (*type:* `String.t`, *default:* `nil`) - Name of the event. This is the specific name of the activity reported by the API. And each `eventName` is related to a specific Google Workspace service or feature which the API organizes into types of events. For `eventName` request parameters in general: - If no `eventName` is given, the report returns all possible instances of an `eventName`. - When you request an `eventName`, the API's response returns all activities which contain that `eventName`. For more information about `eventName` properties, see the list of event names for various applications above in `applicationName`.
  *   `parameters` (*type:* `list(GoogleApi.Admin.Reports_v1.Model.ActivityEventsParameters.t)`, *default:* `nil`) - Parameter value pairs for various applications. For more information about `eventName` parameters, see the list of event names for various applications above in `applicationName`.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Type of event. The Google Workspace service or feature that an administrator changes is identified in the `type` property which identifies an event using the `eventName` property. For a full list of the API's `type` categories, see the list of event names for various applications above in `applicationName`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :name => String.t() | nil,
          :parameters =>
            list(GoogleApi.Admin.Reports_v1.Model.ActivityEventsParameters.t()) | nil,
          :type => String.t() | nil
        }

  field(:name)
  field(:parameters, as: GoogleApi.Admin.Reports_v1.Model.ActivityEventsParameters, type: :list)
  field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Reports_v1.Model.ActivityEvents do
  def decode(value, options) do
    GoogleApi.Admin.Reports_v1.Model.ActivityEvents.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Reports_v1.Model.ActivityEvents do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
