lib/google_api/compute/v1/model/public_delegated_prefix_public_delegated_sub_prefix.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.Compute.V1.Model.PublicDelegatedPrefixPublicDelegatedSubPrefix do
  @moduledoc """
  Represents a sub PublicDelegatedPrefix.

  ## Attributes

  *   `delegateeProject` (*type:* `String.t`, *default:* `nil`) - Name of the project scoping this PublicDelegatedSubPrefix.
  *   `description` (*type:* `String.t`, *default:* `nil`) - An optional description of this resource. Provide this property when you create the resource.
  *   `ipCidrRange` (*type:* `String.t`, *default:* `nil`) - The IPv4 address range, in CIDR format, represented by this sub public delegated prefix.
  *   `isAddress` (*type:* `boolean()`, *default:* `nil`) - Whether the sub prefix is delegated to create Address resources in the delegatee project.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the sub public delegated prefix.
  *   `region` (*type:* `String.t`, *default:* `nil`) - [Output Only] The region of the sub public delegated prefix if it is regional. If absent, the sub prefix is global.
  *   `status` (*type:* `String.t`, *default:* `nil`) - [Output Only] The status of the sub public delegated prefix.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :delegateeProject => String.t() | nil,
          :description => String.t() | nil,
          :ipCidrRange => String.t() | nil,
          :isAddress => boolean() | nil,
          :name => String.t() | nil,
          :region => String.t() | nil,
          :status => String.t() | nil
        }

  field(:delegateeProject)
  field(:description)
  field(:ipCidrRange)
  field(:isAddress)
  field(:name)
  field(:region)
  field(:status)
end

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

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