lib/google_api/testing/v1/model/test_execution.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.Testing.V1.Model.TestExecution do
  @moduledoc """
  A single test executed in a single environment.

  ## Attributes

  *   `environment` (*type:* `GoogleApi.Testing.V1.Model.Environment.t`, *default:* `nil`) - Output only. How the host machine(s) are configured.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. Unique id set by the service.
  *   `matrixId` (*type:* `String.t`, *default:* `nil`) - Output only. Id of the containing TestMatrix.
  *   `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. The cloud project that owns the test execution.
  *   `shard` (*type:* `GoogleApi.Testing.V1.Model.Shard.t`, *default:* `nil`) - Output only. Details about the shard.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. Indicates the current progress of the test execution (e.g., FINISHED).
  *   `testDetails` (*type:* `GoogleApi.Testing.V1.Model.TestDetails.t`, *default:* `nil`) - Output only. Additional details about the running test.
  *   `testSpecification` (*type:* `GoogleApi.Testing.V1.Model.TestSpecification.t`, *default:* `nil`) - Output only. How to run the test.
  *   `timestamp` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this test execution was initially created.
  *   `toolResultsStep` (*type:* `GoogleApi.Testing.V1.Model.ToolResultsStep.t`, *default:* `nil`) - Output only. Where the results for this execution are written.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :environment => GoogleApi.Testing.V1.Model.Environment.t() | nil,
          :id => String.t() | nil,
          :matrixId => String.t() | nil,
          :projectId => String.t() | nil,
          :shard => GoogleApi.Testing.V1.Model.Shard.t() | nil,
          :state => String.t() | nil,
          :testDetails => GoogleApi.Testing.V1.Model.TestDetails.t() | nil,
          :testSpecification => GoogleApi.Testing.V1.Model.TestSpecification.t() | nil,
          :timestamp => DateTime.t() | nil,
          :toolResultsStep => GoogleApi.Testing.V1.Model.ToolResultsStep.t() | nil
        }

  field(:environment, as: GoogleApi.Testing.V1.Model.Environment)
  field(:id)
  field(:matrixId)
  field(:projectId)
  field(:shard, as: GoogleApi.Testing.V1.Model.Shard)
  field(:state)
  field(:testDetails, as: GoogleApi.Testing.V1.Model.TestDetails)
  field(:testSpecification, as: GoogleApi.Testing.V1.Model.TestSpecification)
  field(:timestamp, as: DateTime)
  field(:toolResultsStep, as: GoogleApi.Testing.V1.Model.ToolResultsStep)
end

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

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