# 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.BlockchainNodeEngine.V1.Model.EthereumDetails do
  @moduledoc """
  Ethereum-specific blockchain node details.

  ## Attributes

  *   `additionalEndpoints` (*type:* `GoogleApi.BlockchainNodeEngine.V1.Model.EthereumEndpoints.t`, *default:* `nil`) - Output only. Ethereum-specific endpoint information.
  *   `apiEnableAdmin` (*type:* `boolean()`, *default:* `nil`) - Immutable. Enables JSON-RPC access to functions in the `admin` namespace. Defaults to `false`.
  *   `apiEnableDebug` (*type:* `boolean()`, *default:* `nil`) - Immutable. Enables JSON-RPC access to functions in the `debug` namespace. Defaults to `false`.
  *   `consensusClient` (*type:* `String.t`, *default:* `nil`) - Immutable. The consensus client.
  *   `executionClient` (*type:* `String.t`, *default:* `nil`) - Immutable. The execution client
  *   `gethDetails` (*type:* `GoogleApi.BlockchainNodeEngine.V1.Model.GethDetails.t`, *default:* `nil`) - Details for the Geth execution client.
  *   `network` (*type:* `String.t`, *default:* `nil`) - Immutable. The Ethereum environment being accessed.
  *   `nodeType` (*type:* `String.t`, *default:* `nil`) - Immutable. The type of Ethereum node.
  *   `validatorConfig` (*type:* `GoogleApi.BlockchainNodeEngine.V1.Model.ValidatorConfig.t`, *default:* `nil`) - Configuration for validator-related parameters on the beacon client, and for any GCP-managed validator client.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalEndpoints =>
            GoogleApi.BlockchainNodeEngine.V1.Model.EthereumEndpoints.t() | nil,
          :apiEnableAdmin => boolean() | nil,
          :apiEnableDebug => boolean() | nil,
          :consensusClient => String.t() | nil,
          :executionClient => String.t() | nil,
          :gethDetails => GoogleApi.BlockchainNodeEngine.V1.Model.GethDetails.t() | nil,
          :network => String.t() | nil,
          :nodeType => String.t() | nil,
          :validatorConfig => GoogleApi.BlockchainNodeEngine.V1.Model.ValidatorConfig.t() | nil
        }

  field(:additionalEndpoints, as: GoogleApi.BlockchainNodeEngine.V1.Model.EthereumEndpoints)
  field(:apiEnableAdmin)
  field(:apiEnableDebug)
  field(:consensusClient)
  field(:executionClient)
  field(:gethDetails, as: GoogleApi.BlockchainNodeEngine.V1.Model.GethDetails)
  field(:network)
  field(:nodeType)
  field(:validatorConfig, as: GoogleApi.BlockchainNodeEngine.V1.Model.ValidatorConfig)
end

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

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