lib/google_api/chat/v1/model/common_event_object.ex

# 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.Chat.V1.Model.CommonEventObject do
  @moduledoc """
  Next available ID = 8

  ## Attributes

  *   `formInputs` (*type:* `%{optional(String.t) => GoogleApi.Chat.V1.Model.Inputs.t}`, *default:* `nil`) - The keys are the string IDs associated with the widget and the values are inputs with a widget in the card.
  *   `hostApp` (*type:* `String.t`, *default:* `nil`) - The hostApp enum which indicates the app the add-on is invoked from
  *   `invokedFunction` (*type:* `String.t`, *default:* `nil`) - Name of the invoked function associated with the widget. This field is currently only set for chat.
  *   `parameters` (*type:* `map()`, *default:* `nil`) - Any additional parameters.
  *   `platform` (*type:* `String.t`, *default:* `nil`) - The platform enum which indicates the platform where the add-on is running.
  *   `timeZone` (*type:* `GoogleApi.Chat.V1.Model.TimeZone.t`, *default:* `nil`) - 
  *   `userLocale` (*type:* `String.t`, *default:* `nil`) - The full locale.displayName in the format of [ISO 639 language code]-[ISO 3166 country/region code] such as "en-US"
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :formInputs => %{optional(String.t()) => GoogleApi.Chat.V1.Model.Inputs.t()} | nil,
          :hostApp => String.t() | nil,
          :invokedFunction => String.t() | nil,
          :parameters => map() | nil,
          :platform => String.t() | nil,
          :timeZone => GoogleApi.Chat.V1.Model.TimeZone.t() | nil,
          :userLocale => String.t() | nil
        }

  field(:formInputs, as: GoogleApi.Chat.V1.Model.Inputs, type: :map)
  field(:hostApp)
  field(:invokedFunction)
  field(:parameters, type: :map)
  field(:platform)
  field(:timeZone, as: GoogleApi.Chat.V1.Model.TimeZone)
  field(:userLocale)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.CommonEventObject do
  def decode(value, options) do
    GoogleApi.Chat.V1.Model.CommonEventObject.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.CommonEventObject do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end