# 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.Slides.V1.Model.LayoutPlaceholderIdMapping do
  @moduledoc """
  The user-specified ID mapping for a placeholder that will be created on a slide from a specified layout.

  ## Attributes

  *   `layoutPlaceholder` (*type:* `GoogleApi.Slides.V1.Model.Placeholder.t`, *default:* `nil`) - The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a predefined `TITLE_AND_BODY` layout may usually have a TITLE placeholder with index 0 and a BODY placeholder with index 0.
  *   `layoutPlaceholderObjectId` (*type:* `String.t`, *default:* `nil`) - The object ID of the placeholder on a layout that will be applied to a slide.
  *   `objectId` (*type:* `String.t`, *default:* `nil`) - A user-supplied object ID for the placeholder identified above that to be created onto a slide. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :layoutPlaceholder => GoogleApi.Slides.V1.Model.Placeholder.t() | nil,
          :layoutPlaceholderObjectId => String.t() | nil,
          :objectId => String.t() | nil
        }

  field(:layoutPlaceholder, as: GoogleApi.Slides.V1.Model.Placeholder)
  field(:layoutPlaceholderObjectId)
  field(:objectId)
end

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

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