lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_intent_message_media_content_response_media_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.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject do
  @moduledoc """
  Response media object for media content card.

  ## Attributes

  *   `contentUrl` (*type:* `String.t`, *default:* `nil`) - Required. Url where the media is stored.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of media card.
  *   `icon` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageImage.t`, *default:* `nil`) - Optional. Icon to display above media content.
  *   `largeImage` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageImage.t`, *default:* `nil`) - Optional. Image to display above media content.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. Name of media card.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :contentUrl => String.t() | nil,
          :description => String.t() | nil,
          :icon =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageImage.t() | nil,
          :largeImage =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageImage.t() | nil,
          :name => String.t() | nil
        }

  field(:contentUrl)
  field(:description)
  field(:icon, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageImage)
  field(:largeImage, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageImage)
  field(:name)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject do
  def decode(value, options) do
    GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end