# Copyright 2017 Google Inc. # # 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 class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Vault.V1.Model.Hold do @moduledoc """ Represents a hold within Vault. A hold restricts purging of artifacts based on the combination of the query and accounts restrictions. A hold can be configured to either apply to an explicitly configured set of accounts, or can be applied to all members of an organizational unit. ## Attributes - accounts ([HeldAccount]): If set, the hold applies to the enumerated accounts and org_unit must be empty. Defaults to: `null`. - corpus (String.t): The corpus to be searched. Defaults to: `null`. - Enum - one of [CORPUS_TYPE_UNSPECIFIED, DRIVE, MAIL, GROUPS, HANGOUTS_CHAT] - holdId (String.t): The unique immutable ID of the hold. Assigned during creation. Defaults to: `null`. - name (String.t): The name of the hold. Defaults to: `null`. - orgUnit (HeldOrgUnit): If set, the hold applies to all members of the organizational unit and accounts must be empty. This property is mutable. For groups holds, set the accounts field. Defaults to: `null`. - query (CorpusQuery): The corpus-specific query. If set, the corpusQuery must match corpus type. Defaults to: `null`. - updateTime (DateTime.t): The last time this hold was modified. Defaults to: `null`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :accounts => list(GoogleApi.Vault.V1.Model.HeldAccount.t()), :corpus => any(), :holdId => any(), :name => any(), :orgUnit => GoogleApi.Vault.V1.Model.HeldOrgUnit.t(), :query => GoogleApi.Vault.V1.Model.CorpusQuery.t(), :updateTime => DateTime.t() } field(:accounts, as: GoogleApi.Vault.V1.Model.HeldAccount, type: :list) field(:corpus) field(:holdId) field(:name) field(:orgUnit, as: GoogleApi.Vault.V1.Model.HeldOrgUnit) field(:query, as: GoogleApi.Vault.V1.Model.CorpusQuery) field(:updateTime, as: DateTime) end defimpl Poison.Decoder, for: GoogleApi.Vault.V1.Model.Hold do def decode(value, options) do GoogleApi.Vault.V1.Model.Hold.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Vault.V1.Model.Hold do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end