# 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.Books.V1.Model.VolumeUserInfoFamilySharing do
  @moduledoc """
  Information on the ability to share with the family.

  ## Attributes

  *   `familyRole` (*type:* `String.t`, *default:* `nil`) - The role of the user in the family.
  *   `isSharingAllowed` (*type:* `boolean()`, *default:* `nil`) - Whether or not this volume can be shared with the family by the user. This includes sharing eligibility of both the volume and the user. If the value is true, the user can initiate a family sharing action.
  *   `isSharingDisabledByFop` (*type:* `boolean()`, *default:* `nil`) - Whether or not sharing this volume is temporarily disabled due to issues with the Family Wallet.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :familyRole => String.t() | nil,
          :isSharingAllowed => boolean() | nil,
          :isSharingDisabledByFop => boolean() | nil
        }

  field(:familyRole)
  field(:isSharingAllowed)
  field(:isSharingDisabledByFop)
end

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

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