# 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.AlloyDB.V1.Model.QueryInsightsInstanceConfig do
  @moduledoc """
  QueryInsights Instance specific configuration.

  ## Attributes

  *   `queryPlansPerMinute` (*type:* `integer()`, *default:* `nil`) - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
  *   `queryStringLength` (*type:* `integer()`, *default:* `nil`) - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
  *   `recordApplicationTags` (*type:* `boolean()`, *default:* `nil`) - Record application tags for an instance. This flag is turned "on" by default.
  *   `recordClientAddress` (*type:* `boolean()`, *default:* `nil`) - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :queryPlansPerMinute => integer() | nil,
          :queryStringLength => integer() | nil,
          :recordApplicationTags => boolean() | nil,
          :recordClientAddress => boolean() | nil
        }

  field(:queryPlansPerMinute)
  field(:queryStringLength)
  field(:recordApplicationTags)
  field(:recordClientAddress)
end

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

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