# 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.Workstations.V1.Model.PrivateClusterConfig do
  @moduledoc """
  Configuration options for private workstation clusters.

  ## Attributes

  *   `allowedProjects` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.
  *   `clusterHostname` (*type:* `String.t`, *default:* `nil`) - Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the workstation cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.
  *   `enablePrivateEndpoint` (*type:* `boolean()`, *default:* `nil`) - Immutable. Whether Workstations endpoint is private.
  *   `serviceAttachmentUri` (*type:* `String.t`, *default:* `nil`) - Output only. Service attachment URI for the workstation cluster. The service attachment is created when private endpoint is enabled. To access workstations in the workstation cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allowedProjects => list(String.t()) | nil,
          :clusterHostname => String.t() | nil,
          :enablePrivateEndpoint => boolean() | nil,
          :serviceAttachmentUri => String.t() | nil
        }

  field(:allowedProjects, type: :list)
  field(:clusterHostname)
  field(:enablePrivateEndpoint)
  field(:serviceAttachmentUri)
end

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

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