# 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.VerifyLocationRequest do
  @moduledoc """
  Request message for Verifications.VerifyLocation.

  ## Attributes

  *   `context` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.ServiceBusinessContext.t`, *default:* `nil`) - Optional. Extra context information for the verification of service businesses. It is only required for the locations whose business type is CUSTOMER_LOCATION_ONLY. For ADDRESS verification, the address will be used to send out postcard. For other methods, it should be the same as the one that is passed to GetVerificationOptions. INVALID_ARGUMENT will be thrown if it is set for other types of business locations.
  *   `emailAddress` (*type:* `String.t`, *default:* `nil`) - Optional. The input for EMAIL method. Email address where the PIN should be sent to. An email address is accepted only if it is one of the addresses provided by FetchVerificationOptions. If the EmailVerificationData has is_user_name_editable set to true, the client may specify a different user name (local-part) but must match the domain name.
  *   `languageCode` (*type:* `String.t`, *default:* `nil`) - Optional. The BCP 47 language code representing the language that is to be used for the verification process.
  *   `mailerContact` (*type:* `String.t`, *default:* `nil`) - Optional. The input for ADDRESS method. Contact name the mail should be sent to.
  *   `method` (*type:* `String.t`, *default:* `nil`) - Required. Verification method.
  *   `phoneNumber` (*type:* `String.t`, *default:* `nil`) - Optional. The input for PHONE_CALL/SMS method The phone number that should be called or be sent SMS to. It must be one of the phone numbers in the eligible options.
  *   `token` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.VerificationToken.t`, *default:* `nil`) - Optional. The input for VETTED_PARTNER method available to select [partners.](https://support.google.com/business/answer/7674102) The input is not needed for a vetted account. Token that is associated to the location. Token that is associated to the location.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :context => GoogleApi.MyBusinessVerifications.V1.Model.ServiceBusinessContext.t() | nil,
          :emailAddress => String.t() | nil,
          :languageCode => String.t() | nil,
          :mailerContact => String.t() | nil,
          :method => String.t() | nil,
          :phoneNumber => String.t() | nil,
          :token => GoogleApi.MyBusinessVerifications.V1.Model.VerificationToken.t() | nil
        }

  field(:context, as: GoogleApi.MyBusinessVerifications.V1.Model.ServiceBusinessContext)
  field(:emailAddress)
  field(:languageCode)
  field(:mailerContact)
  field(:method)
  field(:phoneNumber)
  field(:token, as: GoogleApi.MyBusinessVerifications.V1.Model.VerificationToken)
end

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

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