# 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.Resource do
  @moduledoc """


  ## Attributes

  *   `accessControl` (*type:* `GoogleApi.DeploymentManager.V2.Model.ResourceAccessControl.t`, *default:* `nil`) - The Access Control Policy set on this resource.
  *   `finalProperties` (*type:* `String.t`, *default:* `nil`) - Output only. The evaluated properties of the resource with references expanded. Returned as serialized YAML.
  *   `id` (*type:* `String.t`, *default:* `nil`) - 
  *   `insertTime` (*type:* `String.t`, *default:* `nil`) - Output only. Creation timestamp in RFC3339 text format.
  *   `manifest` (*type:* `String.t`, *default:* `nil`) - Output only. URL of the manifest representing the current configuration of this resource.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the resource as it appears in the YAML config.
  *   `properties` (*type:* `String.t`, *default:* `nil`) - Output only. The current properties of the resource before any references have been filled in. Returned as serialized YAML.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Output only. The type of the resource, for example `compute.v1.instance`, or `cloudfunctions.v1beta1.function`.
  *   `update` (*type:* `GoogleApi.DeploymentManager.V2.Model.ResourceUpdate.t`, *default:* `nil`) - Output only. If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here.
  *   `updateTime` (*type:* `String.t`, *default:* `nil`) - Output only. Update timestamp in RFC3339 text format.
  *   `url` (*type:* `String.t`, *default:* `nil`) - Output only. The URL of the actual resource.
  *   `warnings` (*type:* `list(GoogleApi.DeploymentManager.V2.Model.ResourceWarnings.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,
          :finalProperties => String.t() | nil,
          :id => String.t() | nil,
          :insertTime => String.t() | nil,
          :manifest => String.t() | nil,
          :name => String.t() | nil,
          :properties => String.t() | nil,
          :type => String.t() | nil,
          :update => GoogleApi.DeploymentManager.V2.Model.ResourceUpdate.t() | nil,
          :updateTime => String.t() | nil,
          :url => String.t() | nil,
          :warnings => list(GoogleApi.DeploymentManager.V2.Model.ResourceWarnings.t()) | nil
        }

  field(:accessControl, as: GoogleApi.DeploymentManager.V2.Model.ResourceAccessControl)
  field(:finalProperties)
  field(:id)
  field(:insertTime)
  field(:manifest)
  field(:name)
  field(:properties)
  field(:type)
  field(:update, as: GoogleApi.DeploymentManager.V2.Model.ResourceUpdate)
  field(:updateTime)
  field(:url)
  field(:warnings, as: GoogleApi.DeploymentManager.V2.Model.ResourceWarnings, type: :list)
end

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

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