lib/google_api/compute/v1/model/instance_properties.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.Compute.V1.Model.InstanceProperties do
  @moduledoc """


  ## Attributes

  *   `advancedMachineFeatures` (*type:* `GoogleApi.Compute.V1.Model.AdvancedMachineFeatures.t`, *default:* `nil`) - Controls for advanced machine-related behavior features.
  *   `canIpForward` (*type:* `boolean()`, *default:* `nil`) - Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
  *   `confidentialInstanceConfig` (*type:* `GoogleApi.Compute.V1.Model.ConfidentialInstanceConfig.t`, *default:* `nil`) - Specifies the Confidential Instance options.
  *   `description` (*type:* `String.t`, *default:* `nil`) - An optional text description for the instances that are created from these properties.
  *   `disks` (*type:* `list(GoogleApi.Compute.V1.Model.AttachedDisk.t)`, *default:* `nil`) - An array of disks that are associated with the instances that are created from these properties.
  *   `guestAccelerators` (*type:* `list(GoogleApi.Compute.V1.Model.AcceleratorConfig.t)`, *default:* `nil`) - A list of guest accelerator cards' type and count to use for instances created from these properties.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Labels to apply to instances that are created from these properties.
  *   `machineType` (*type:* `String.t`, *default:* `nil`) - The machine type to use for instances that are created from these properties.
  *   `metadata` (*type:* `GoogleApi.Compute.V1.Model.Metadata.t`, *default:* `nil`) - The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
  *   `minCpuPlatform` (*type:* `String.t`, *default:* `nil`) - Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
  *   `networkInterfaces` (*type:* `list(GoogleApi.Compute.V1.Model.NetworkInterface.t)`, *default:* `nil`) - An array of network access configurations for this interface.
  *   `privateIpv6GoogleAccess` (*type:* `String.t`, *default:* `nil`) - The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.
  *   `reservationAffinity` (*type:* `GoogleApi.Compute.V1.Model.ReservationAffinity.t`, *default:* `nil`) - Specifies the reservations that instances can consume from.
  *   `resourcePolicies` (*type:* `list(String.t)`, *default:* `nil`) - Resource policies (names, not ULRs) applied to instances created from these properties.
  *   `scheduling` (*type:* `GoogleApi.Compute.V1.Model.Scheduling.t`, *default:* `nil`) - Specifies the scheduling options for the instances that are created from these properties.
  *   `serviceAccounts` (*type:* `list(GoogleApi.Compute.V1.Model.ServiceAccount.t)`, *default:* `nil`) - A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.
  *   `shieldedInstanceConfig` (*type:* `GoogleApi.Compute.V1.Model.ShieldedInstanceConfig.t`, *default:* `nil`) - 
  *   `tags` (*type:* `GoogleApi.Compute.V1.Model.Tags.t`, *default:* `nil`) - A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :advancedMachineFeatures =>
            GoogleApi.Compute.V1.Model.AdvancedMachineFeatures.t() | nil,
          :canIpForward => boolean() | nil,
          :confidentialInstanceConfig =>
            GoogleApi.Compute.V1.Model.ConfidentialInstanceConfig.t() | nil,
          :description => String.t() | nil,
          :disks => list(GoogleApi.Compute.V1.Model.AttachedDisk.t()) | nil,
          :guestAccelerators => list(GoogleApi.Compute.V1.Model.AcceleratorConfig.t()) | nil,
          :labels => map() | nil,
          :machineType => String.t() | nil,
          :metadata => GoogleApi.Compute.V1.Model.Metadata.t() | nil,
          :minCpuPlatform => String.t() | nil,
          :networkInterfaces => list(GoogleApi.Compute.V1.Model.NetworkInterface.t()) | nil,
          :privateIpv6GoogleAccess => String.t() | nil,
          :reservationAffinity => GoogleApi.Compute.V1.Model.ReservationAffinity.t() | nil,
          :resourcePolicies => list(String.t()) | nil,
          :scheduling => GoogleApi.Compute.V1.Model.Scheduling.t() | nil,
          :serviceAccounts => list(GoogleApi.Compute.V1.Model.ServiceAccount.t()) | nil,
          :shieldedInstanceConfig => GoogleApi.Compute.V1.Model.ShieldedInstanceConfig.t() | nil,
          :tags => GoogleApi.Compute.V1.Model.Tags.t() | nil
        }

  field(:advancedMachineFeatures, as: GoogleApi.Compute.V1.Model.AdvancedMachineFeatures)
  field(:canIpForward)
  field(:confidentialInstanceConfig, as: GoogleApi.Compute.V1.Model.ConfidentialInstanceConfig)
  field(:description)
  field(:disks, as: GoogleApi.Compute.V1.Model.AttachedDisk, type: :list)
  field(:guestAccelerators, as: GoogleApi.Compute.V1.Model.AcceleratorConfig, type: :list)
  field(:labels, type: :map)
  field(:machineType)
  field(:metadata, as: GoogleApi.Compute.V1.Model.Metadata)
  field(:minCpuPlatform)
  field(:networkInterfaces, as: GoogleApi.Compute.V1.Model.NetworkInterface, type: :list)
  field(:privateIpv6GoogleAccess)
  field(:reservationAffinity, as: GoogleApi.Compute.V1.Model.ReservationAffinity)
  field(:resourcePolicies, type: :list)
  field(:scheduling, as: GoogleApi.Compute.V1.Model.Scheduling)
  field(:serviceAccounts, as: GoogleApi.Compute.V1.Model.ServiceAccount, type: :list)
  field(:shieldedInstanceConfig, as: GoogleApi.Compute.V1.Model.ShieldedInstanceConfig)
  field(:tags, as: GoogleApi.Compute.V1.Model.Tags)
end

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

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