lib/google_api/classroom/v1/model/feed.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.Classroom.V1.Model.Feed do
  @moduledoc """
  A class of notifications that an application can register to receive. For example: "all roster changes for a domain".

  ## Attributes

  *   `courseRosterChangesInfo` (*type:* `GoogleApi.Classroom.V1.Model.CourseRosterChangesInfo.t`, *default:* `nil`) - Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`.
  *   `courseWorkChangesInfo` (*type:* `GoogleApi.Classroom.V1.Model.CourseWorkChangesInfo.t`, *default:* `nil`) - Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`.
  *   `feedType` (*type:* `String.t`, *default:* `nil`) - The type of feed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :courseRosterChangesInfo =>
            GoogleApi.Classroom.V1.Model.CourseRosterChangesInfo.t() | nil,
          :courseWorkChangesInfo => GoogleApi.Classroom.V1.Model.CourseWorkChangesInfo.t() | nil,
          :feedType => String.t() | nil
        }

  field(:courseRosterChangesInfo, as: GoogleApi.Classroom.V1.Model.CourseRosterChangesInfo)
  field(:courseWorkChangesInfo, as: GoogleApi.Classroom.V1.Model.CourseWorkChangesInfo)
  field(:feedType)
end

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

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