lib/google_api/os_config/v1/model/monthly_schedule.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.OSConfig.V1.Model.MonthlySchedule do
  @moduledoc """
  Represents a monthly schedule. An example of a valid monthly schedule is "on the third Tuesday of the month" or "on the 15th of the month".

  ## Attributes

  *   `monthDay` (*type:* `integer()`, *default:* `nil`) - Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 indicates the last day of the month. Months without the target day will be skipped. For example, a schedule to run "every month on the 31st" will not run in February, April, June, etc.
  *   `weekDayOfMonth` (*type:* `GoogleApi.OSConfig.V1.Model.WeekDayOfMonth.t`, *default:* `nil`) - Required. Week day in a month.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :monthDay => integer() | nil,
          :weekDayOfMonth => GoogleApi.OSConfig.V1.Model.WeekDayOfMonth.t() | nil
        }

  field(:monthDay)
  field(:weekDayOfMonth, as: GoogleApi.OSConfig.V1.Model.WeekDayOfMonth)
end

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

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