<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/artifactregistry/v1beta2/settings.proto

namespace Google\Cloud\ArtifactRegistry\V1beta2;

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

/**
 * The Artifact Registry settings that apply to a Project.
 *
 * Generated from protobuf message <code>google.devtools.artifactregistry.v1beta2.ProjectSettings</code>
 */
class ProjectSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the project's settings.
     * Always of the form:
     * projects/{project-id}/projectSettings
     * In update request: never set
     * In response: always set
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The redirection state of the legacy repositories in this project.
     *
     * Generated from protobuf field <code>.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState legacy_redirection_state = 2;</code>
     */
    private $legacy_redirection_state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the project's settings.
     *           Always of the form:
     *           projects/{project-id}/projectSettings
     *           In update request: never set
     *           In response: always set
     *     @type int $legacy_redirection_state
     *           The redirection state of the legacy repositories in this project.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Artifactregistry\V1Beta2\Settings::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the project's settings.
     * Always of the form:
     * projects/{project-id}/projectSettings
     * In update request: never set
     * In response: always set
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the project's settings.
     * Always of the form:
     * projects/{project-id}/projectSettings
     * In update request: never set
     * In response: always set
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The redirection state of the legacy repositories in this project.
     *
     * Generated from protobuf field <code>.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState legacy_redirection_state = 2;</code>
     * @return int
     */
    public function getLegacyRedirectionState()
    {
        return $this->legacy_redirection_state;
    }

    /**
     * The redirection state of the legacy repositories in this project.
     *
     * Generated from protobuf field <code>.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState legacy_redirection_state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setLegacyRedirectionState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ArtifactRegistry\V1beta2\ProjectSettings\RedirectionState::class);
        $this->legacy_redirection_state = $var;

        return $this;
    }

}

