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

namespace Google\Cloud\Config\V1;

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

/**
 * A property drift represents a drift to a property in the state file.
 *
 * Generated from protobuf message <code>google.cloud.config.v1.PropertyDrift</code>
 */
class PropertyDrift extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The path of the property drift.
     *
     * Generated from protobuf field <code>string path = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $path = '';
    /**
     * Output only. The paths of sensitive fields in `before`. Paths are relative
     * to `path`.
     *
     * Generated from protobuf field <code>repeated string before_sensitive_paths = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $before_sensitive_paths;
    /**
     * Output only. Representations of the object value before the actions.
     *
     * Generated from protobuf field <code>.google.protobuf.Value before = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $before = null;
    /**
     * Output only. The paths of sensitive fields in `after`. Paths are relative
     * to `path`.
     *
     * Generated from protobuf field <code>repeated string after_sensitive_paths = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $after_sensitive_paths;
    /**
     * Output only. Representations of the object value after the actions.
     *
     * Generated from protobuf field <code>.google.protobuf.Value after = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $after = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $path
     *           Output only. The path of the property drift.
     *     @type string[] $before_sensitive_paths
     *           Output only. The paths of sensitive fields in `before`. Paths are relative
     *           to `path`.
     *     @type \Google\Protobuf\Value $before
     *           Output only. Representations of the object value before the actions.
     *     @type string[] $after_sensitive_paths
     *           Output only. The paths of sensitive fields in `after`. Paths are relative
     *           to `path`.
     *     @type \Google\Protobuf\Value $after
     *           Output only. Representations of the object value after the actions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The path of the property drift.
     *
     * Generated from protobuf field <code>string path = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * Output only. The path of the property drift.
     *
     * Generated from protobuf field <code>string path = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->path = $var;

        return $this;
    }

    /**
     * Output only. The paths of sensitive fields in `before`. Paths are relative
     * to `path`.
     *
     * Generated from protobuf field <code>repeated string before_sensitive_paths = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<string>
     */
    public function getBeforeSensitivePaths()
    {
        return $this->before_sensitive_paths;
    }

    /**
     * Output only. The paths of sensitive fields in `before`. Paths are relative
     * to `path`.
     *
     * Generated from protobuf field <code>repeated string before_sensitive_paths = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string[] $var
     * @return $this
     */
    public function setBeforeSensitivePaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->before_sensitive_paths = $arr;

        return $this;
    }

    /**
     * Output only. Representations of the object value before the actions.
     *
     * Generated from protobuf field <code>.google.protobuf.Value before = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Value|null
     */
    public function getBefore()
    {
        return $this->before;
    }

    public function hasBefore()
    {
        return isset($this->before);
    }

    public function clearBefore()
    {
        unset($this->before);
    }

    /**
     * Output only. Representations of the object value before the actions.
     *
     * Generated from protobuf field <code>.google.protobuf.Value before = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Value $var
     * @return $this
     */
    public function setBefore($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Value::class);
        $this->before = $var;

        return $this;
    }

    /**
     * Output only. The paths of sensitive fields in `after`. Paths are relative
     * to `path`.
     *
     * Generated from protobuf field <code>repeated string after_sensitive_paths = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<string>
     */
    public function getAfterSensitivePaths()
    {
        return $this->after_sensitive_paths;
    }

    /**
     * Output only. The paths of sensitive fields in `after`. Paths are relative
     * to `path`.
     *
     * Generated from protobuf field <code>repeated string after_sensitive_paths = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string[] $var
     * @return $this
     */
    public function setAfterSensitivePaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->after_sensitive_paths = $arr;

        return $this;
    }

    /**
     * Output only. Representations of the object value after the actions.
     *
     * Generated from protobuf field <code>.google.protobuf.Value after = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Value|null
     */
    public function getAfter()
    {
        return $this->after;
    }

    public function hasAfter()
    {
        return isset($this->after);
    }

    public function clearAfter()
    {
        unset($this->after);
    }

    /**
     * Output only. Representations of the object value after the actions.
     *
     * Generated from protobuf field <code>.google.protobuf.Value after = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Value $var
     * @return $this
     */
    public function setAfter($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Value::class);
        $this->after = $var;

        return $this;
    }

}

