lib/google_api/cloud_asset/v1/model/iam_policy_analysis_result.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.CloudAsset.V1.Model.IamPolicyAnalysisResult do
  @moduledoc """
  IAM Policy analysis result, consisting of one IAM policy binding and derived access control lists.

  ## Attributes

  *   `accessControlLists` (*type:* `list(GoogleApi.CloudAsset.V1.Model.GoogleCloudAssetV1AccessControlList.t)`, *default:* `nil`) - The access control lists derived from the iam_binding that match or potentially match resource and access selectors specified in the request.
  *   `attachedResourceFullName` (*type:* `String.t`, *default:* `nil`) - The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of the resource to which the iam_binding policy attaches.
  *   `fullyExplored` (*type:* `boolean()`, *default:* `nil`) - Represents whether all analyses on the iam_binding have successfully finished.
  *   `iamBinding` (*type:* `GoogleApi.CloudAsset.V1.Model.Binding.t`, *default:* `nil`) - The Cloud IAM policy binding under analysis.
  *   `identityList` (*type:* `GoogleApi.CloudAsset.V1.Model.GoogleCloudAssetV1IdentityList.t`, *default:* `nil`) - The identity list derived from members of the iam_binding that match or potentially match identity selector specified in the request.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessControlLists =>
            list(GoogleApi.CloudAsset.V1.Model.GoogleCloudAssetV1AccessControlList.t()) | nil,
          :attachedResourceFullName => String.t() | nil,
          :fullyExplored => boolean() | nil,
          :iamBinding => GoogleApi.CloudAsset.V1.Model.Binding.t() | nil,
          :identityList => GoogleApi.CloudAsset.V1.Model.GoogleCloudAssetV1IdentityList.t() | nil
        }

  field(:accessControlLists,
    as: GoogleApi.CloudAsset.V1.Model.GoogleCloudAssetV1AccessControlList,
    type: :list
  )

  field(:attachedResourceFullName)
  field(:fullyExplored)
  field(:iamBinding, as: GoogleApi.CloudAsset.V1.Model.Binding)
  field(:identityList, as: GoogleApi.CloudAsset.V1.Model.GoogleCloudAssetV1IdentityList)
end

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

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