# 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.CloudSearch.V1.Model.EnterpriseTopazSidekickCardMetadata do
  @moduledoc """
  Card metadata.

  ## Attributes

  *   `cardCategory` (*type:* `String.t`, *default:* `nil`) - Declares a preference for how this card should be packed in MSCR. All cards in a response must correspond to a single category. As a result, cards may be dropped from the response if this field is set. Any card that does not match the category of the card with the highest priority in the response will be dropped.
  *   `cardId` (*type:* `String.t`, *default:* `nil`) - An ID to identify the card and match actions to it. Be thoughtful of new card IDs since actions will be associated to that ID. E.g., if two card IDs collide, the system will think that the actions have been applied to the same card. Similarly, if EAS can return multiple cards of the same type (e.g., Meetings), ensure that the card_id identifies a given instance of the card so that, e.g., dismissals only affect the dismissed card as opposed to affecting all meeting cards.
  *   `chronology` (*type:* `String.t`, *default:* `nil`) - Chronology.
  *   `debugInfo` (*type:* `String.t`, *default:* `nil`) - Debug info (only reported if request's debug_level > 0).
  *   `nlpMetadata` (*type:* `GoogleApi.CloudSearch.V1.Model.EnterpriseTopazSidekickNlpMetadata.t`, *default:* `nil`) - Information about the NLP done to get the card.
  *   `rankingParams` (*type:* `GoogleApi.CloudSearch.V1.Model.EnterpriseTopazSidekickRankingParams.t`, *default:* `nil`) - Ranking params.
  *   `renderMode` (*type:* `String.t`, *default:* `nil`) - Render mode.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cardCategory => String.t() | nil,
          :cardId => String.t() | nil,
          :chronology => String.t() | nil,
          :debugInfo => String.t() | nil,
          :nlpMetadata =>
            GoogleApi.CloudSearch.V1.Model.EnterpriseTopazSidekickNlpMetadata.t() | nil,
          :rankingParams =>
            GoogleApi.CloudSearch.V1.Model.EnterpriseTopazSidekickRankingParams.t() | nil,
          :renderMode => String.t() | nil
        }

  field(:cardCategory)
  field(:cardId)
  field(:chronology)
  field(:debugInfo)
  field(:nlpMetadata, as: GoogleApi.CloudSearch.V1.Model.EnterpriseTopazSidekickNlpMetadata)
  field(:rankingParams, as: GoogleApi.CloudSearch.V1.Model.EnterpriseTopazSidekickRankingParams)
  field(:renderMode)
end

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

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