# 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.GoogleCloudSecuritycenterV2Kubernetes do
  @moduledoc """
  Kubernetes-related attributes.

  ## Attributes

  *   `accessReviews` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview.t)`, *default:* `nil`) - Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.
  *   `bindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding.t)`, *default:* `nil`) - Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
  *   `nodePools` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool.t)`, *default:* `nil`) - GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.
  *   `nodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.t)`, *default:* `nil`) - Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.
  *   `objects` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object.t)`, *default:* `nil`) - Kubernetes objects related to the finding.
  *   `pods` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod.t)`, *default:* `nil`) - Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.
  *   `roles` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.t)`, *default:* `nil`) - Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessReviews =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview.t())
            | nil,
          :bindings =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding.t()) | nil,
          :nodePools =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool.t()) | nil,
          :nodes =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.t()) | nil,
          :objects =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object.t()) | nil,
          :pods =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod.t()) | nil,
          :roles =>
            list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.t()) | nil
        }

  field(:accessReviews,
    as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview,
    type: :list
  )

  field(:bindings,
    as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding,
    type: :list
  )

  field(:nodePools,
    as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool,
    type: :list
  )

  field(:nodes, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node, type: :list)

  field(:objects,
    as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object,
    type: :list
  )

  field(:pods, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod, type: :list)

  field(:roles, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role, type: :list)
end

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

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