# 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.DeploymentManager.V2.Model.ResourceUpdate do
  @moduledoc """


  ## Attributes

  *   `accessControl` (*type:* `GoogleApi.DeploymentManager.V2.Model.ResourceAccessControl.t`, *default:* `nil`) - The Access Control Policy to set on this resource after updating the resource itself.
  *   `error` (*type:* `GoogleApi.DeploymentManager.V2.Model.ResourceUpdateError.t`, *default:* `nil`) - Output only. If errors are generated during update of the resource, this field will be populated.
  *   `finalProperties` (*type:* `String.t`, *default:* `nil`) - Output only. The expanded properties of the resource with reference values expanded. Returned as serialized YAML.
  *   `intent` (*type:* `String.t`, *default:* `nil`) - Output only. The intent of the resource: `PREVIEW`, `UPDATE`, or `CANCEL`.
  *   `manifest` (*type:* `String.t`, *default:* `nil`) - Output only. URL of the manifest representing the update configuration of this resource.
  *   `properties` (*type:* `String.t`, *default:* `nil`) - Output only. The set of updated properties for this resource, before references are expanded. Returned as serialized YAML.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the resource.
  *   `warnings` (*type:* `list(GoogleApi.DeploymentManager.V2.Model.ResourceUpdateWarnings.t)`, *default:* `nil`) - Output only. If warning messages are generated during processing of this resource, this field will be populated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessControl => GoogleApi.DeploymentManager.V2.Model.ResourceAccessControl.t() | nil,
          :error => GoogleApi.DeploymentManager.V2.Model.ResourceUpdateError.t() | nil,
          :finalProperties => String.t() | nil,
          :intent => String.t() | nil,
          :manifest => String.t() | nil,
          :properties => String.t() | nil,
          :state => String.t() | nil,
          :warnings => list(GoogleApi.DeploymentManager.V2.Model.ResourceUpdateWarnings.t()) | nil
        }

  field(:accessControl, as: GoogleApi.DeploymentManager.V2.Model.ResourceAccessControl)
  field(:error, as: GoogleApi.DeploymentManager.V2.Model.ResourceUpdateError)
  field(:finalProperties)
  field(:intent)
  field(:manifest)
  field(:properties)
  field(:state)
  field(:warnings, as: GoogleApi.DeploymentManager.V2.Model.ResourceUpdateWarnings, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.DeploymentManager.V2.Model.ResourceUpdate do
  def decode(value, options) do
    GoogleApi.DeploymentManager.V2.Model.ResourceUpdate.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DeploymentManager.V2.Model.ResourceUpdate do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
