<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v20/common/asset_types.proto

namespace Google\Ads\GoogleAds\V20\Common;

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

/**
 * A location asset.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.common.LocationAsset</code>
 */
class LocationAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * Place IDs uniquely identify a place in the Google Places database and on
     * Google Maps.
     * This field is unique for a given customer ID and asset type. See
     * https://developers.google.com/places/web-service/place-id to learn more
     * about Place ID.
     *
     * Generated from protobuf field <code>string place_id = 1;</code>
     */
    protected $place_id = '';
    /**
     * The list of business locations for the customer.
     * This will only be returned if the Location Asset is syncing from the
     * Business Profile account. It is possible to have multiple Business Profile
     * listings under the same account that point to the same Place ID.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.common.BusinessProfileLocation business_profile_locations = 2;</code>
     */
    private $business_profile_locations;
    /**
     * The type of location ownership.
     * If the type is BUSINESS_OWNER, it will be served as a location extension.
     * If the type is AFFILIATE, it will be served as an affiliate location.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.enums.LocationOwnershipTypeEnum.LocationOwnershipType location_ownership_type = 3;</code>
     */
    protected $location_ownership_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $place_id
     *           Place IDs uniquely identify a place in the Google Places database and on
     *           Google Maps.
     *           This field is unique for a given customer ID and asset type. See
     *           https://developers.google.com/places/web-service/place-id to learn more
     *           about Place ID.
     *     @type array<\Google\Ads\GoogleAds\V20\Common\BusinessProfileLocation>|\Google\Protobuf\Internal\RepeatedField $business_profile_locations
     *           The list of business locations for the customer.
     *           This will only be returned if the Location Asset is syncing from the
     *           Business Profile account. It is possible to have multiple Business Profile
     *           listings under the same account that point to the same Place ID.
     *     @type int $location_ownership_type
     *           The type of location ownership.
     *           If the type is BUSINESS_OWNER, it will be served as a location extension.
     *           If the type is AFFILIATE, it will be served as an affiliate location.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Common\AssetTypes::initOnce();
        parent::__construct($data);
    }

    /**
     * Place IDs uniquely identify a place in the Google Places database and on
     * Google Maps.
     * This field is unique for a given customer ID and asset type. See
     * https://developers.google.com/places/web-service/place-id to learn more
     * about Place ID.
     *
     * Generated from protobuf field <code>string place_id = 1;</code>
     * @return string
     */
    public function getPlaceId()
    {
        return $this->place_id;
    }

    /**
     * Place IDs uniquely identify a place in the Google Places database and on
     * Google Maps.
     * This field is unique for a given customer ID and asset type. See
     * https://developers.google.com/places/web-service/place-id to learn more
     * about Place ID.
     *
     * Generated from protobuf field <code>string place_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPlaceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->place_id = $var;

        return $this;
    }

    /**
     * The list of business locations for the customer.
     * This will only be returned if the Location Asset is syncing from the
     * Business Profile account. It is possible to have multiple Business Profile
     * listings under the same account that point to the same Place ID.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.common.BusinessProfileLocation business_profile_locations = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBusinessProfileLocations()
    {
        return $this->business_profile_locations;
    }

    /**
     * The list of business locations for the customer.
     * This will only be returned if the Location Asset is syncing from the
     * Business Profile account. It is possible to have multiple Business Profile
     * listings under the same account that point to the same Place ID.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.common.BusinessProfileLocation business_profile_locations = 2;</code>
     * @param array<\Google\Ads\GoogleAds\V20\Common\BusinessProfileLocation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBusinessProfileLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V20\Common\BusinessProfileLocation::class);
        $this->business_profile_locations = $arr;

        return $this;
    }

    /**
     * The type of location ownership.
     * If the type is BUSINESS_OWNER, it will be served as a location extension.
     * If the type is AFFILIATE, it will be served as an affiliate location.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.enums.LocationOwnershipTypeEnum.LocationOwnershipType location_ownership_type = 3;</code>
     * @return int
     */
    public function getLocationOwnershipType()
    {
        return $this->location_ownership_type;
    }

    /**
     * The type of location ownership.
     * If the type is BUSINESS_OWNER, it will be served as a location extension.
     * If the type is AFFILIATE, it will be served as an affiliate location.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.enums.LocationOwnershipTypeEnum.LocationOwnershipType location_ownership_type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setLocationOwnershipType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V20\Enums\LocationOwnershipTypeEnum\LocationOwnershipType::class);
        $this->location_ownership_type = $var;

        return $this;
    }

}

