lib/google_api/storage_transfer/v1/model/agent_pool.ex

# 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.StorageTransfer.V1.Model.AgentPool do
  @moduledoc """
  Represents an On-Premises Agent pool.

  ## Attributes

  *   `bandwidthLimit` (*type:* `GoogleApi.StorageTransfer.V1.Model.BandwidthLimit.t`, *default:* `nil`) - Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Specifies the client-specified AgentPool description.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id}/agentPools/{agent_pool_id}`
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. Specifies the state of the AgentPool.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bandwidthLimit => GoogleApi.StorageTransfer.V1.Model.BandwidthLimit.t() | nil,
          :displayName => String.t() | nil,
          :name => String.t() | nil,
          :state => String.t() | nil
        }

  field(:bandwidthLimit, as: GoogleApi.StorageTransfer.V1.Model.BandwidthLimit)
  field(:displayName)
  field(:name)
  field(:state)
end

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

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