# 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.GKEHub.V1.Model.DefaultClusterConfig do
  @moduledoc """
  DefaultClusterConfig describes the default cluster configurations to be applied to all clusters born-in-fleet.

  ## Attributes

  *   `binaryAuthorizationConfig` (*type:* `GoogleApi.GKEHub.V1.Model.BinaryAuthorizationConfig.t`, *default:* `nil`) - Optional. Enable/Disable binary authorization features for the cluster.
  *   `compliancePostureConfig` (*type:* `GoogleApi.GKEHub.V1.Model.CompliancePostureConfig.t`, *default:* `nil`) - Optional. Enable/Disable Compliance Posture features for the cluster. Note that on UpdateFleet, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask.
  *   `securityPostureConfig` (*type:* `GoogleApi.GKEHub.V1.Model.SecurityPostureConfig.t`, *default:* `nil`) - Enable/Disable Security Posture features for the cluster.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :binaryAuthorizationConfig =>
            GoogleApi.GKEHub.V1.Model.BinaryAuthorizationConfig.t() | nil,
          :compliancePostureConfig => GoogleApi.GKEHub.V1.Model.CompliancePostureConfig.t() | nil,
          :securityPostureConfig => GoogleApi.GKEHub.V1.Model.SecurityPostureConfig.t() | nil
        }

  field(:binaryAuthorizationConfig, as: GoogleApi.GKEHub.V1.Model.BinaryAuthorizationConfig)
  field(:compliancePostureConfig, as: GoogleApi.GKEHub.V1.Model.CompliancePostureConfig)
  field(:securityPostureConfig, as: GoogleApi.GKEHub.V1.Model.SecurityPostureConfig)
end

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

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