lib/google_api/cloud_asset/v1/model/saved_query.ex

# 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.CloudAsset.V1.Model.SavedQuery do
  @moduledoc """
  A saved query which can be shared with others or used later.

  ## Attributes

  *   `content` (*type:* `GoogleApi.CloudAsset.V1.Model.QueryContent.t`, *default:* `nil`) - The query content.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The create time of this saved query.
  *   `creator` (*type:* `String.t`, *default:* `nil`) - Output only. The account's email address who has created this saved query.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of this saved query. This value should be fewer than 255 characters.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Labels applied on the resource. This value should not contain more than 10 entries. The key and value of each entry must be non-empty and fewer than 64 characters.
  *   `lastUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last update time of this saved query.
  *   `lastUpdater` (*type:* `String.t`, *default:* `nil`) - Output only. The account's email address who has updated this saved query most recently.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the saved query. The format must be: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :content => GoogleApi.CloudAsset.V1.Model.QueryContent.t() | nil,
          :createTime => DateTime.t() | nil,
          :creator => String.t() | nil,
          :description => String.t() | nil,
          :labels => map() | nil,
          :lastUpdateTime => DateTime.t() | nil,
          :lastUpdater => String.t() | nil,
          :name => String.t() | nil
        }

  field(:content, as: GoogleApi.CloudAsset.V1.Model.QueryContent)
  field(:createTime, as: DateTime)
  field(:creator)
  field(:description)
  field(:labels, type: :map)
  field(:lastUpdateTime, as: DateTime)
  field(:lastUpdater)
  field(:name)
end

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

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