# 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.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ServerCapabilities do
  @moduledoc """
  A response message for Capabilities.GetCapabilities.

  ## Attributes

  *   `cacheCapabilities` (*type:* `GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2CacheCapabilities.t`, *default:* `nil`) - Capabilities of the remote cache system.
  *   `deprecatedApiVersion` (*type:* `GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer.t`, *default:* `nil`) - Earliest RE API version supported, including deprecated versions.
  *   `executionCapabilities` (*type:* `GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ExecutionCapabilities.t`, *default:* `nil`) - Capabilities of the remote execution system.
  *   `highApiVersion` (*type:* `GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer.t`, *default:* `nil`) - Latest RE API version supported.
  *   `lowApiVersion` (*type:* `GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer.t`, *default:* `nil`) - Earliest non-deprecated RE API version supported.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cacheCapabilities =>
            GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2CacheCapabilities.t()
            | nil,
          :deprecatedApiVersion =>
            GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer.t() | nil,
          :executionCapabilities =>
            GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ExecutionCapabilities.t()
            | nil,
          :highApiVersion =>
            GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer.t() | nil,
          :lowApiVersion =>
            GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer.t() | nil
        }

  field(:cacheCapabilities,
    as: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2CacheCapabilities
  )

  field(:deprecatedApiVersion, as: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer)

  field(:executionCapabilities,
    as: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ExecutionCapabilities
  )

  field(:highApiVersion, as: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer)
  field(:lowApiVersion, as: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelSemverSemVer)
end

defimpl Poison.Decoder,
  for: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ServerCapabilities do
  def decode(value, options) do
    GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ServerCapabilities.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2ServerCapabilities do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
