lib/google_api/genomics/v1/model/disk.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.Genomics.V1.Model.Disk do
  @moduledoc """
  Carries information about a disk that can be attached to a VM. See https://cloud.google.com/compute/docs/disks/performance for more information about disk type, size, and performance considerations. Specify either `Volume` or `Disk`, but not both.

  ## Attributes

  *   `name` (*type:* `String.t`, *default:* `nil`) - A user-supplied name for the disk. Used when mounting the disk into actions. The name must contain only upper and lowercase alphanumeric characters and hyphens and cannot start with a hyphen.
  *   `sizeGb` (*type:* `integer()`, *default:* `nil`) - The size, in GB, of the disk to attach. If the size is not specified, a default is chosen to ensure reasonable I/O performance. If the disk type is specified as `local-ssd`, multiple local drives are automatically combined to provide the requested size. Note, however, that each physical SSD is 375GB in size, and no more than 8 drives can be attached to a single instance.
  *   `sourceImage` (*type:* `String.t`, *default:* `nil`) - An optional image to put on the disk before attaching it to the VM.
  *   `type` (*type:* `String.t`, *default:* `nil`) - The Compute Engine disk type. If unspecified, `pd-standard` is used.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :name => String.t() | nil,
          :sizeGb => integer() | nil,
          :sourceImage => String.t() | nil,
          :type => String.t() | nil
        }

  field(:name)
  field(:sizeGb)
  field(:sourceImage)
  field(:type)
end

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

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