# 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.CloudSearch.V1.Model.UpdateDataSourceRequest do
  @moduledoc """


  ## Attributes

  *   `debugOptions` (*type:* `GoogleApi.CloudSearch.V1.Model.DebugOptions.t`, *default:* `nil`) - Common debug options.
  *   `source` (*type:* `GoogleApi.CloudSearch.V1.Model.DataSource.t`, *default:* `nil`) - 
  *   `updateMask` (*type:* `String.t`, *default:* `nil`) - Only applies to [`settings.datasources.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.datasources/patch). Update mask to control which fields to update. Example field paths: `name`, `displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the source, that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :debugOptions => GoogleApi.CloudSearch.V1.Model.DebugOptions.t() | nil,
          :source => GoogleApi.CloudSearch.V1.Model.DataSource.t() | nil,
          :updateMask => String.t() | nil
        }

  field(:debugOptions, as: GoogleApi.CloudSearch.V1.Model.DebugOptions)
  field(:source, as: GoogleApi.CloudSearch.V1.Model.DataSource)
  field(:updateMask)
end

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

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