lib/google_api/memcache/v1/model/google_cloud_saasaccelerator_management_providers_v1_maintenance_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.Memcache.V1.Model.GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule do
  @moduledoc """
  Maintenance schedule which is exposed to customer and potentially end user, indicating published upcoming future maintenance schedule

  ## Attributes

  *   `canReschedule` (*type:* `boolean()`, *default:* `nil`) - This field is deprecated, and will be always set to true since reschedule can happen multiple times now. This field should not be removed until all service producers remove this for their customers.
  *   `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The scheduled end time for the maintenance.
  *   `rolloutManagementPolicy` (*type:* `String.t`, *default:* `nil`) - The rollout management policy this maintenance schedule is associated with. When doing reschedule update request, the reschedule should be against this given policy.
  *   `scheduleDeadlineTime` (*type:* `DateTime.t`, *default:* `nil`) - schedule_deadline_time is the time deadline any schedule start time cannot go beyond, including reschedule. It's normally the initial schedule start time plus maintenance window length (1 day or 1 week). Maintenance cannot be scheduled to start beyond this deadline.
  *   `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The scheduled start time for the maintenance.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :canReschedule => boolean() | nil,
          :endTime => DateTime.t() | nil,
          :rolloutManagementPolicy => String.t() | nil,
          :scheduleDeadlineTime => DateTime.t() | nil,
          :startTime => DateTime.t() | nil
        }

  field(:canReschedule)
  field(:endTime, as: DateTime)
  field(:rolloutManagementPolicy)
  field(:scheduleDeadlineTime, as: DateTime)
  field(:startTime, as: DateTime)
end

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

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