# 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.MyBusinessVerifications.V1.Model.VoiceOfMerchantState do
  @moduledoc """
  Response message for VoiceOfMerchant.GetVoiceOfMerchantState.

  ## Attributes

  *   `complyWithGuidelines` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.ComplyWithGuidelines.t`, *default:* `nil`) - The location fails to comply with our [guidelines](https://support.google.com/business/answer/3038177) and requires additional steps for reinstatement. To fix this issue, consult the [Help Center Article](https://support.google.com/business/answer/4569145).
  *   `hasBusinessAuthority` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the location has the authority (ownership) over the business on Google. If true, another location cannot take over and become the dominant listing on Maps. However, edits will not become live unless Voice of Merchant is gained (i.e. has_voice_of_merchant is true).
  *   `hasVoiceOfMerchant` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the location is in good standing and has control over the business on Google. Any edits made to the location will propagate to Maps after passing the review phase.
  *   `resolveOwnershipConflict` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.ResolveOwnershipConflict.t`, *default:* `nil`) - This location duplicates another location that is in good standing. If you have access to the location in good standing, use that location's id to perform operations. Otherwise, request access from the current owner.
  *   `verify` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.Verify.t`, *default:* `nil`) - Start or continue the verification process.
  *   `waitForVoiceOfMerchant` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.WaitForVoiceOfMerchant.t`, *default:* `nil`) - Wait to gain Voice of Merchant. The location is under review for quality purposes.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :complyWithGuidelines =>
            GoogleApi.MyBusinessVerifications.V1.Model.ComplyWithGuidelines.t() | nil,
          :hasBusinessAuthority => boolean() | nil,
          :hasVoiceOfMerchant => boolean() | nil,
          :resolveOwnershipConflict =>
            GoogleApi.MyBusinessVerifications.V1.Model.ResolveOwnershipConflict.t() | nil,
          :verify => GoogleApi.MyBusinessVerifications.V1.Model.Verify.t() | nil,
          :waitForVoiceOfMerchant =>
            GoogleApi.MyBusinessVerifications.V1.Model.WaitForVoiceOfMerchant.t() | nil
        }

  field(:complyWithGuidelines, as: GoogleApi.MyBusinessVerifications.V1.Model.ComplyWithGuidelines)

  field(:hasBusinessAuthority)
  field(:hasVoiceOfMerchant)

  field(:resolveOwnershipConflict,
    as: GoogleApi.MyBusinessVerifications.V1.Model.ResolveOwnershipConflict
  )

  field(:verify, as: GoogleApi.MyBusinessVerifications.V1.Model.Verify)

  field(:waitForVoiceOfMerchant,
    as: GoogleApi.MyBusinessVerifications.V1.Model.WaitForVoiceOfMerchant
  )
end

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

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