<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/maps/fleetengine/v1/trip_api.proto

namespace Google\Maps\FleetEngine\V1;

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

/**
 * ReportBillableTrip request message.
 *
 * Generated from protobuf message <code>maps.fleetengine.v1.ReportBillableTripRequest</code>
 */
class ReportBillableTripRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Must be in the format
     * `providers/{provider}/billableTrips/{billable_trip}`. The
     * provider must be the Project ID (for example, `sample-cloud-project`) of
     * the Google Cloud Project of which the service account making this call is a
     * member.
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Required. Two letter country code of the country where the trip takes
     * place. Price is defined according to country code.
     *
     * Generated from protobuf field <code>string country_code = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $country_code = '';
    /**
     * The platform upon which the request was issued.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.BillingPlatformIdentifier platform = 5;</code>
     */
    protected $platform = 0;
    /**
     * The identifiers that are directly related to the trip being reported. These
     * are usually IDs (for example, session IDs) of pre-booking operations done
     * before the trip ID is available. The number of `related_ids` is
     * limited to 50.
     *
     * Generated from protobuf field <code>repeated string related_ids = 6;</code>
     */
    private $related_ids;
    /**
     * The type of GMP product solution (for example,
     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7;</code>
     */
    protected $solution_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Must be in the format
     *           `providers/{provider}/billableTrips/{billable_trip}`. The
     *           provider must be the Project ID (for example, `sample-cloud-project`) of
     *           the Google Cloud Project of which the service account making this call is a
     *           member.
     *     @type string $country_code
     *           Required. Two letter country code of the country where the trip takes
     *           place. Price is defined according to country code.
     *     @type int $platform
     *           The platform upon which the request was issued.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $related_ids
     *           The identifiers that are directly related to the trip being reported. These
     *           are usually IDs (for example, session IDs) of pre-booking operations done
     *           before the trip ID is available. The number of `related_ids` is
     *           limited to 50.
     *     @type int $solution_type
     *           The type of GMP product solution (for example,
     *           `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Maps\Fleetengine\V1\TripApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Must be in the format
     * `providers/{provider}/billableTrips/{billable_trip}`. The
     * provider must be the Project ID (for example, `sample-cloud-project`) of
     * the Google Cloud Project of which the service account making this call is a
     * member.
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Must be in the format
     * `providers/{provider}/billableTrips/{billable_trip}`. The
     * provider must be the Project ID (for example, `sample-cloud-project`) of
     * the Google Cloud Project of which the service account making this call is a
     * member.
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. Two letter country code of the country where the trip takes
     * place. Price is defined according to country code.
     *
     * Generated from protobuf field <code>string country_code = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCountryCode()
    {
        return $this->country_code;
    }

    /**
     * Required. Two letter country code of the country where the trip takes
     * place. Price is defined according to country code.
     *
     * Generated from protobuf field <code>string country_code = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->country_code = $var;

        return $this;
    }

    /**
     * The platform upon which the request was issued.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.BillingPlatformIdentifier platform = 5;</code>
     * @return int
     */
    public function getPlatform()
    {
        return $this->platform;
    }

    /**
     * The platform upon which the request was issued.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.BillingPlatformIdentifier platform = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setPlatform($var)
    {
        GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\V1\BillingPlatformIdentifier::class);
        $this->platform = $var;

        return $this;
    }

    /**
     * The identifiers that are directly related to the trip being reported. These
     * are usually IDs (for example, session IDs) of pre-booking operations done
     * before the trip ID is available. The number of `related_ids` is
     * limited to 50.
     *
     * Generated from protobuf field <code>repeated string related_ids = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRelatedIds()
    {
        return $this->related_ids;
    }

    /**
     * The identifiers that are directly related to the trip being reported. These
     * are usually IDs (for example, session IDs) of pre-booking operations done
     * before the trip ID is available. The number of `related_ids` is
     * limited to 50.
     *
     * Generated from protobuf field <code>repeated string related_ids = 6;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRelatedIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->related_ids = $arr;

        return $this;
    }

    /**
     * The type of GMP product solution (for example,
     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7;</code>
     * @return int
     */
    public function getSolutionType()
    {
        return $this->solution_type;
    }

    /**
     * The type of GMP product solution (for example,
     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setSolutionType($var)
    {
        GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\V1\ReportBillableTripRequest\SolutionType::class);
        $this->solution_type = $var;

        return $this;
    }

}

