<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/logging/v2/logging_config.proto

namespace Google\Cloud\Logging\V2;

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

/**
 * The parameters to `CreateBucket`.
 *
 * Generated from protobuf message <code>google.logging.v2.CreateBucketRequest</code>
 */
class CreateBucketRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource in which to create the log bucket:
     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
     * For example:
     *   `"projects/my-project/locations/global"`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited
     * to 100 characters and can include only letters, digits, underscores,
     * hyphens, and periods.
     *
     * Generated from protobuf field <code>string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $bucket_id = '';
    /**
     * Required. The new bucket. The region specified in the new bucket must be compliant
     * with any Location Restriction Org Policy. The name field in the bucket is
     * ignored.
     *
     * Generated from protobuf field <code>.google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $bucket = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource in which to create the log bucket:
     *               "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
     *           For example:
     *             `"projects/my-project/locations/global"`
     *     @type string $bucket_id
     *           Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited
     *           to 100 characters and can include only letters, digits, underscores,
     *           hyphens, and periods.
     *     @type \Google\Cloud\Logging\V2\LogBucket $bucket
     *           Required. The new bucket. The region specified in the new bucket must be compliant
     *           with any Location Restriction Org Policy. The name field in the bucket is
     *           ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource in which to create the log bucket:
     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
     * For example:
     *   `"projects/my-project/locations/global"`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource in which to create the log bucket:
     *     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
     * For example:
     *   `"projects/my-project/locations/global"`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited
     * to 100 characters and can include only letters, digits, underscores,
     * hyphens, and periods.
     *
     * Generated from protobuf field <code>string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getBucketId()
    {
        return $this->bucket_id;
    }

    /**
     * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited
     * to 100 characters and can include only letters, digits, underscores,
     * hyphens, and periods.
     *
     * Generated from protobuf field <code>string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setBucketId($var)
    {
        GPBUtil::checkString($var, True);
        $this->bucket_id = $var;

        return $this;
    }

    /**
     * Required. The new bucket. The region specified in the new bucket must be compliant
     * with any Location Restriction Org Policy. The name field in the bucket is
     * ignored.
     *
     * Generated from protobuf field <code>.google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Logging\V2\LogBucket|null
     */
    public function getBucket()
    {
        return $this->bucket;
    }

    public function hasBucket()
    {
        return isset($this->bucket);
    }

    public function clearBucket()
    {
        unset($this->bucket);
    }

    /**
     * Required. The new bucket. The region specified in the new bucket must be compliant
     * with any Location Restriction Org Policy. The name field in the bucket is
     * ignored.
     *
     * Generated from protobuf field <code>.google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Logging\V2\LogBucket $var
     * @return $this
     */
    public function setBucket($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class);
        $this->bucket = $var;

        return $this;
    }

}

