# 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.SecurityCenter.V1.Model.AzureMetadata do
  @moduledoc """
  Azure metadata associated with the resource, only applicable if the finding's cloud provider is Microsoft Azure.

  ## Attributes

  *   `managementGroups` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AzureManagementGroup.t)`, *default:* `nil`) - A list of Azure management groups associated with the resource, ordered from lowest level (closest to the subscription) to highest level.
  *   `resourceGroup` (*type:* `GoogleApi.SecurityCenter.V1.Model.AzureResourceGroup.t`, *default:* `nil`) - The Azure resource group associated with the resource.
  *   `subscription` (*type:* `GoogleApi.SecurityCenter.V1.Model.AzureSubscription.t`, *default:* `nil`) - The Azure subscription associated with the resource.
  *   `tenant` (*type:* `GoogleApi.SecurityCenter.V1.Model.AzureTenant.t`, *default:* `nil`) - The Azure Entra tenant associated with the resource.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :managementGroups =>
            list(GoogleApi.SecurityCenter.V1.Model.AzureManagementGroup.t()) | nil,
          :resourceGroup => GoogleApi.SecurityCenter.V1.Model.AzureResourceGroup.t() | nil,
          :subscription => GoogleApi.SecurityCenter.V1.Model.AzureSubscription.t() | nil,
          :tenant => GoogleApi.SecurityCenter.V1.Model.AzureTenant.t() | nil
        }

  field(:managementGroups, as: GoogleApi.SecurityCenter.V1.Model.AzureManagementGroup, type: :list)

  field(:resourceGroup, as: GoogleApi.SecurityCenter.V1.Model.AzureResourceGroup)
  field(:subscription, as: GoogleApi.SecurityCenter.V1.Model.AzureSubscription)
  field(:tenant, as: GoogleApi.SecurityCenter.V1.Model.AzureTenant)
end

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

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