# 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.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoTaskEntity do
  @moduledoc """
  Contains a task's metadata and associated information. Next available id: 7

  ## Attributes

  *   `disabledForVpcSc` (*type:* `boolean()`, *default:* `nil`) - True if the task has conflict with vpcsc
  *   `metadata` (*type:* `GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoTaskMetadata.t`, *default:* `nil`) - Metadata inclueds the task name, author and so on.
  *   `paramSpecs` (*type:* `GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoParamSpecsMessage.t`, *default:* `nil`) - Declarations for inputs/outputs for a TypedTask. This is also associated with the METADATA mask.
  *   `stats` (*type:* `GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusStats.t`, *default:* `nil`) - Deprecated - statistics from the Monarch query.
  *   `taskType` (*type:* `String.t`, *default:* `nil`) - Defines the type of the task
  *   `uiConfig` (*type:* `GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoTaskUiConfig.t`, *default:* `nil`) - UI configuration for this task Also associated with the METADATA mask.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :disabledForVpcSc => boolean() | nil,
          :metadata =>
            GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoTaskMetadata.t() | nil,
          :paramSpecs =>
            GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoParamSpecsMessage.t()
            | nil,
          :stats => GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusStats.t() | nil,
          :taskType => String.t() | nil,
          :uiConfig =>
            GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoTaskUiConfig.t() | nil
        }

  field(:disabledForVpcSc)
  field(:metadata, as: GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoTaskMetadata)

  field(:paramSpecs,
    as: GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoParamSpecsMessage
  )

  field(:stats, as: GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusStats)
  field(:taskType)
  field(:uiConfig, as: GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoTaskUiConfig)
end

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

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