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

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * Request message for
 * [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1.SchemaService.UpdateSchema]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.UpdateSchemaRequest</code>
 */
class UpdateSchemaRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $schema = null;
    /**
     * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is
     * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be
     * created. In this situation, `update_mask` is ignored.
     *
     * Generated from protobuf field <code>bool allow_missing = 3;</code>
     */
    protected $allow_missing = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DiscoveryEngine\V1\Schema $schema
     *           Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update.
     *     @type bool $allow_missing
     *           If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is
     *           not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be
     *           created. In this situation, `update_mask` is ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\SchemaService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\DiscoveryEngine\V1\Schema|null
     */
    public function getSchema()
    {
        return $this->schema;
    }

    public function hasSchema()
    {
        return isset($this->schema);
    }

    public function clearSchema()
    {
        unset($this->schema);
    }

    /**
     * Required. The [Schema][google.cloud.discoveryengine.v1.Schema] to update.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\Schema $var
     * @return $this
     */
    public function setSchema($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Schema::class);
        $this->schema = $var;

        return $this;
    }

    /**
     * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is
     * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be
     * created. In this situation, `update_mask` is ignored.
     *
     * Generated from protobuf field <code>bool allow_missing = 3;</code>
     * @return bool
     */
    public function getAllowMissing()
    {
        return $this->allow_missing;
    }

    /**
     * If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is
     * not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] will be
     * created. In this situation, `update_mask` is ignored.
     *
     * Generated from protobuf field <code>bool allow_missing = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowMissing($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_missing = $var;

        return $this;
    }

}

