lib/google_api/os_config/v1/model/os_policy_resource_repository_resource_apt_repository.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.OSConfig.V1.Model.OSPolicyResourceRepositoryResourceAptRepository do
  @moduledoc """
  Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.

  ## Attributes

  *   `archiveType` (*type:* `String.t`, *default:* `nil`) - Required. Type of archive files in this repository.
  *   `components` (*type:* `list(String.t)`, *default:* `nil`) - Required. List of components for this repository. Must contain at least one item.
  *   `distribution` (*type:* `String.t`, *default:* `nil`) - Required. Distribution of this repository.
  *   `gpgKey` (*type:* `String.t`, *default:* `nil`) - URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
  *   `uri` (*type:* `String.t`, *default:* `nil`) - Required. URI for this repository.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :archiveType => String.t() | nil,
          :components => list(String.t()) | nil,
          :distribution => String.t() | nil,
          :gpgKey => String.t() | nil,
          :uri => String.t() | nil
        }

  field(:archiveType)
  field(:components, type: :list)
  field(:distribution)
  field(:gpgKey)
  field(:uri)
end

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

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