# 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.PageElement do
  @moduledoc """
  A visual element rendered on a page.

  ## Attributes

  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of the page element. Combined with title to display alt text. The field is not supported for Group elements.
  *   `elementGroup` (*type:* `GoogleApi.Slides.V1.Model.Group.t`, *default:* `nil`) - A collection of page elements joined as a single unit.
  *   `image` (*type:* `GoogleApi.Slides.V1.Model.Image.t`, *default:* `nil`) - An image page element.
  *   `line` (*type:* `GoogleApi.Slides.V1.Model.Line.t`, *default:* `nil`) - A line page element.
  *   `objectId` (*type:* `String.t`, *default:* `nil`) - The object ID for this page element. Object IDs used by google.apps.slides.v1.Page and google.apps.slides.v1.PageElement share the same namespace.
  *   `shape` (*type:* `GoogleApi.Slides.V1.Model.Shape.t`, *default:* `nil`) - A generic shape.
  *   `sheetsChart` (*type:* `GoogleApi.Slides.V1.Model.SheetsChart.t`, *default:* `nil`) - A linked chart embedded from Google Sheets. Unlinked charts are represented as images.
  *   `size` (*type:* `GoogleApi.Slides.V1.Model.Size.t`, *default:* `nil`) - The size of the page element.
  *   `speakerSpotlight` (*type:* `GoogleApi.Slides.V1.Model.SpeakerSpotlight.t`, *default:* `nil`) - A Speaker Spotlight.
  *   `table` (*type:* `GoogleApi.Slides.V1.Model.Table.t`, *default:* `nil`) - A table page element.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The title of the page element. Combined with description to display alt text. The field is not supported for Group elements.
  *   `transform` (*type:* `GoogleApi.Slides.V1.Model.AffineTransform.t`, *default:* `nil`) - The transform of the page element. The visual appearance of the page element is determined by its absolute transform. To compute the absolute transform, preconcatenate a page element's transform with the transforms of all of its parent groups. If the page element is not in a group, its absolute transform is the same as the value in this field. The initial transform for the newly created Group is always the identity transform.
  *   `video` (*type:* `GoogleApi.Slides.V1.Model.Video.t`, *default:* `nil`) - A video page element.
  *   `wordArt` (*type:* `GoogleApi.Slides.V1.Model.WordArt.t`, *default:* `nil`) - A word art page element.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :description => String.t() | nil,
          :elementGroup => GoogleApi.Slides.V1.Model.Group.t() | nil,
          :image => GoogleApi.Slides.V1.Model.Image.t() | nil,
          :line => GoogleApi.Slides.V1.Model.Line.t() | nil,
          :objectId => String.t() | nil,
          :shape => GoogleApi.Slides.V1.Model.Shape.t() | nil,
          :sheetsChart => GoogleApi.Slides.V1.Model.SheetsChart.t() | nil,
          :size => GoogleApi.Slides.V1.Model.Size.t() | nil,
          :speakerSpotlight => GoogleApi.Slides.V1.Model.SpeakerSpotlight.t() | nil,
          :table => GoogleApi.Slides.V1.Model.Table.t() | nil,
          :title => String.t() | nil,
          :transform => GoogleApi.Slides.V1.Model.AffineTransform.t() | nil,
          :video => GoogleApi.Slides.V1.Model.Video.t() | nil,
          :wordArt => GoogleApi.Slides.V1.Model.WordArt.t() | nil
        }

  field(:description)
  field(:elementGroup, as: GoogleApi.Slides.V1.Model.Group)
  field(:image, as: GoogleApi.Slides.V1.Model.Image)
  field(:line, as: GoogleApi.Slides.V1.Model.Line)
  field(:objectId)
  field(:shape, as: GoogleApi.Slides.V1.Model.Shape)
  field(:sheetsChart, as: GoogleApi.Slides.V1.Model.SheetsChart)
  field(:size, as: GoogleApi.Slides.V1.Model.Size)
  field(:speakerSpotlight, as: GoogleApi.Slides.V1.Model.SpeakerSpotlight)
  field(:table, as: GoogleApi.Slides.V1.Model.Table)
  field(:title)
  field(:transform, as: GoogleApi.Slides.V1.Model.AffineTransform)
  field(:video, as: GoogleApi.Slides.V1.Model.Video)
  field(:wordArt, as: GoogleApi.Slides.V1.Model.WordArt)
end

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

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