<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dataform/v1beta1/dataform.proto

namespace Google\Cloud\Dataform\V1beta1\CompilationResultAction;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Represents a list of arbitrary database operations.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.CompilationResultAction.Operations</code>
 */
class Operations extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of actions that this action depends on.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataform.v1beta1.Target dependency_targets = 1;</code>
     */
    private $dependency_targets;
    /**
     * Whether this action is disabled (i.e. should not be run).
     *
     * Generated from protobuf field <code>bool disabled = 2;</code>
     */
    protected $disabled = false;
    /**
     * Arbitrary, user-defined tags on this action.
     *
     * Generated from protobuf field <code>repeated string tags = 3;</code>
     */
    private $tags;
    /**
     * Descriptor for any output relation and its columns. Only set if
     * `has_output` is true.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.RelationDescriptor relation_descriptor = 6;</code>
     */
    protected $relation_descriptor = null;
    /**
     * A list of arbitrary SQL statements that will be executed without
     * alteration.
     *
     * Generated from protobuf field <code>repeated string queries = 4;</code>
     */
    private $queries;
    /**
     * Whether these operations produce an output relation.
     *
     * Generated from protobuf field <code>bool has_output = 5;</code>
     */
    protected $has_output = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dataform\V1beta1\Target>|\Google\Protobuf\Internal\RepeatedField $dependency_targets
     *           A list of actions that this action depends on.
     *     @type bool $disabled
     *           Whether this action is disabled (i.e. should not be run).
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $tags
     *           Arbitrary, user-defined tags on this action.
     *     @type \Google\Cloud\Dataform\V1beta1\RelationDescriptor $relation_descriptor
     *           Descriptor for any output relation and its columns. Only set if
     *           `has_output` is true.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $queries
     *           A list of arbitrary SQL statements that will be executed without
     *           alteration.
     *     @type bool $has_output
     *           Whether these operations produce an output relation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of actions that this action depends on.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataform.v1beta1.Target dependency_targets = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDependencyTargets()
    {
        return $this->dependency_targets;
    }

    /**
     * A list of actions that this action depends on.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataform.v1beta1.Target dependency_targets = 1;</code>
     * @param array<\Google\Cloud\Dataform\V1beta1\Target>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDependencyTargets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataform\V1beta1\Target::class);
        $this->dependency_targets = $arr;

        return $this;
    }

    /**
     * Whether this action is disabled (i.e. should not be run).
     *
     * Generated from protobuf field <code>bool disabled = 2;</code>
     * @return bool
     */
    public function getDisabled()
    {
        return $this->disabled;
    }

    /**
     * Whether this action is disabled (i.e. should not be run).
     *
     * Generated from protobuf field <code>bool disabled = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setDisabled($var)
    {
        GPBUtil::checkBool($var);
        $this->disabled = $var;

        return $this;
    }

    /**
     * Arbitrary, user-defined tags on this action.
     *
     * Generated from protobuf field <code>repeated string tags = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Arbitrary, user-defined tags on this action.
     *
     * Generated from protobuf field <code>repeated string tags = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        return $this;
    }

    /**
     * Descriptor for any output relation and its columns. Only set if
     * `has_output` is true.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.RelationDescriptor relation_descriptor = 6;</code>
     * @return \Google\Cloud\Dataform\V1beta1\RelationDescriptor|null
     */
    public function getRelationDescriptor()
    {
        return $this->relation_descriptor;
    }

    public function hasRelationDescriptor()
    {
        return isset($this->relation_descriptor);
    }

    public function clearRelationDescriptor()
    {
        unset($this->relation_descriptor);
    }

    /**
     * Descriptor for any output relation and its columns. Only set if
     * `has_output` is true.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.RelationDescriptor relation_descriptor = 6;</code>
     * @param \Google\Cloud\Dataform\V1beta1\RelationDescriptor $var
     * @return $this
     */
    public function setRelationDescriptor($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1beta1\RelationDescriptor::class);
        $this->relation_descriptor = $var;

        return $this;
    }

    /**
     * A list of arbitrary SQL statements that will be executed without
     * alteration.
     *
     * Generated from protobuf field <code>repeated string queries = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getQueries()
    {
        return $this->queries;
    }

    /**
     * A list of arbitrary SQL statements that will be executed without
     * alteration.
     *
     * Generated from protobuf field <code>repeated string queries = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setQueries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->queries = $arr;

        return $this;
    }

    /**
     * Whether these operations produce an output relation.
     *
     * Generated from protobuf field <code>bool has_output = 5;</code>
     * @return bool
     */
    public function getHasOutput()
    {
        return $this->has_output;
    }

    /**
     * Whether these operations produce an output relation.
     *
     * Generated from protobuf field <code>bool has_output = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setHasOutput($var)
    {
        GPBUtil::checkBool($var);
        $this->has_output = $var;

        return $this;
    }

}


