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

namespace Google\Cloud\DiscoveryEngine\V1\RecrawlUrisResponse;

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

/**
 * Details about why a particular URI failed to be crawled. Each FailureInfo
 * contains one FailureReason per CorpusType.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.RecrawlUrisResponse.FailureInfo</code>
 */
class FailureInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * URI that failed to be crawled.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     */
    protected $uri = '';
    /**
     * List of failure reasons by corpus type (e.g. desktop, mobile).
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2;</code>
     */
    private $failure_reasons;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $uri
     *           URI that failed to be crawled.
     *     @type array<\Google\Cloud\DiscoveryEngine\V1\RecrawlUrisResponse\FailureInfo\FailureReason>|\Google\Protobuf\Internal\RepeatedField $failure_reasons
     *           List of failure reasons by corpus type (e.g. desktop, mobile).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\SiteSearchEngineService::initOnce();
        parent::__construct($data);
    }

    /**
     * URI that failed to be crawled.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * URI that failed to be crawled.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * List of failure reasons by corpus type (e.g. desktop, mobile).
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFailureReasons()
    {
        return $this->failure_reasons;
    }

    /**
     * List of failure reasons by corpus type (e.g. desktop, mobile).
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2;</code>
     * @param array<\Google\Cloud\DiscoveryEngine\V1\RecrawlUrisResponse\FailureInfo\FailureReason>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFailureReasons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\RecrawlUrisResponse\FailureInfo\FailureReason::class);
        $this->failure_reasons = $arr;

        return $this;
    }

}


