# 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.YouTube.V3.Model.ChannelToStoreLinkDetails do
  @moduledoc """
  Information specific to a store on a merchandising platform linked to a YouTube channel.

  ## Attributes

  *   `billingDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetailsBillingDetails.t`, *default:* `nil`) - Information specific to billing (read-only).
  *   `merchantAffiliateProgramDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetailsMerchantAffiliateProgramDetails.t`, *default:* `nil`) - Information specific to merchant affiliate program (read-only).
  *   `merchantId` (*type:* `String.t`, *default:* `nil`) - Google Merchant Center id of the store.
  *   `storeName` (*type:* `String.t`, *default:* `nil`) - Name of the store.
  *   `storeUrl` (*type:* `String.t`, *default:* `nil`) - Landing page of the store.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :billingDetails =>
            GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetailsBillingDetails.t() | nil,
          :merchantAffiliateProgramDetails =>
            GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetailsMerchantAffiliateProgramDetails.t()
            | nil,
          :merchantId => String.t() | nil,
          :storeName => String.t() | nil,
          :storeUrl => String.t() | nil
        }

  field(:billingDetails, as: GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetailsBillingDetails)

  field(:merchantAffiliateProgramDetails,
    as: GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetailsMerchantAffiliateProgramDetails
  )

  field(:merchantId)
  field(:storeName)
  field(:storeUrl)
end

defimpl Poison.Decoder, for: GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetails do
  def decode(value, options) do
    GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetails.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.YouTube.V3.Model.ChannelToStoreLinkDetails do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
