# 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.Vault.V1.Model.CalendarOptions do
  @moduledoc """
  Additional options for Calendar search

  ## Attributes

  *   `locationQuery` (*type:* `list(String.t)`, *default:* `nil`) - Matches only those events whose location contains all of the words in the given set. If the string contains quoted phrases, this method only matches those events whose location contain the exact phrase. Entries in the set are considered in "and". Word splitting example: ["New Zealand"] vs ["New","Zealand"] "New Zealand": matched by both "New and better Zealand": only matched by the later
  *   `minusWords` (*type:* `list(String.t)`, *default:* `nil`) - Matches only those events that do not contain any of the words in the given set in title, description, location, or attendees. Entries in the set are considered in "or".
  *   `peopleQuery` (*type:* `list(String.t)`, *default:* `nil`) - Matches only those events whose attendees contain all of the words in the given set. Entries in the set are considered in "and".
  *   `responseStatuses` (*type:* `list(String.t)`, *default:* `nil`) - Matches only events for which the custodian gave one of these responses. If the set is empty or contains ATTENDEE_RESPONSE_UNSPECIFIED there will be no filtering on responses.
  *   `versionDate` (*type:* `DateTime.t`, *default:* `nil`) - Search the current version of the Calendar event, but export the contents of the last version saved before 12:00 AM UTC on the specified date. Enter the date in UTC.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :locationQuery => list(String.t()) | nil,
          :minusWords => list(String.t()) | nil,
          :peopleQuery => list(String.t()) | nil,
          :responseStatuses => list(String.t()) | nil,
          :versionDate => DateTime.t() | nil
        }

  field(:locationQuery, type: :list)
  field(:minusWords, type: :list)
  field(:peopleQuery, type: :list)
  field(:responseStatuses, type: :list)
  field(:versionDate, as: DateTime)
end

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

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