lib/google_api/iam/v1/model/permission.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.IAM.V1.Model.Permission do
  @moduledoc """
  A permission which can be included by a role.

  ## Attributes

  *   `apiDisabled` (*type:* `boolean()`, *default:* `nil`) - The service API associated with the permission is not enabled.
  *   `customRolesSupportLevel` (*type:* `String.t`, *default:* `nil`) - The current custom role support level.
  *   `description` (*type:* `String.t`, *default:* `nil`) - A brief description of what this Permission is used for. This permission can ONLY be used in predefined roles.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of this Permission.
  *   `onlyInPredefinedRoles` (*type:* `boolean()`, *default:* `nil`) - 
  *   `primaryPermission` (*type:* `String.t`, *default:* `nil`) - The preferred name for this permission. If present, then this permission is an alias of, and equivalent to, the listed primary_permission.
  *   `stage` (*type:* `String.t`, *default:* `nil`) - The current launch stage of the permission.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The title of this Permission.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apiDisabled => boolean() | nil,
          :customRolesSupportLevel => String.t() | nil,
          :description => String.t() | nil,
          :name => String.t() | nil,
          :onlyInPredefinedRoles => boolean() | nil,
          :primaryPermission => String.t() | nil,
          :stage => String.t() | nil,
          :title => String.t() | nil
        }

  field(:apiDisabled)
  field(:customRolesSupportLevel)
  field(:description)
  field(:name)
  field(:onlyInPredefinedRoles)
  field(:primaryPermission)
  field(:stage)
  field(:title)
end

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

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