From ab8e9897af2eea766cc0a29582cb4393e991eda5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 24 Sep 2024 01:58:59 +0000 Subject: [PATCH 1/2] feat: Add support for generating route tokens feat: A new field `route_token` is added to message `.google.maps.routeoptimization.v1.ShipmentRoute.Transition` docs: A comment for method `BatchOptimizeTours` in service `RouteOptimization` is changed docs: A comment for field `populate_transition_polylines` in message `.google.maps.routeoptimization.v1.OptimizeToursRequest` is changed docs: A comment for field `code` in message `.google.maps.routeoptimization.v1.OptimizeToursValidationError` is changed PiperOrigin-RevId: 677952232 Source-Link: https://github.com/googleapis/googleapis/commit/534e49c0ca0b9297f4ede6f119a0db054b35dd1e Source-Link: https://github.com/googleapis/googleapis-gen/commit/da6e35d31b0de9ddbaa97bd964899fbb9b1c000c Copy-Tag: eyJwIjoiTWFwc1JvdXRlT3B0aW1pemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJkYTZlMzVkMzFiMGRlOWRkYmFhOTdiZDk2NDg5OWZiYjliMWMwMDBjIn0= --- .../V1/RouteOptimizationService.php | Bin 0 -> 17393 bytes .../V1/AggregatedMetrics.php | 454 ++++++ .../V1/BatchOptimizeToursMetadata.php | 33 + .../V1/BatchOptimizeToursRequest.php | 125 ++ .../AsyncModelConfig.php | 162 ++ .../V1/BatchOptimizeToursResponse.php | 34 + .../Maps/RouteOptimization/V1/BreakRule.php | 113 ++ .../V1/BreakRule/BreakRequest.php | 172 ++ .../V1/BreakRule/FrequencyConstraint.php | 166 ++ .../Maps/RouteOptimization/V1/DataFormat.php | 62 + .../RouteOptimization/V1/DistanceLimit.php | 284 ++++ .../RouteOptimization/V1/GcsDestination.php | 68 + .../Maps/RouteOptimization/V1/GcsSource.php | 71 + .../V1/InjectedSolutionConstraint.php | 156 ++ .../ConstraintRelaxation.php | 151 ++ .../ConstraintRelaxation/Relaxation.php | 204 +++ .../ConstraintRelaxation/Relaxation/Level.php | 83 + .../Maps/RouteOptimization/V1/InputConfig.php | 110 ++ .../Maps/RouteOptimization/V1/Location.php | 133 ++ .../V1/OptimizeToursRequest.php | 1178 ++++++++++++++ .../V1/OptimizeToursRequest/SearchMode.php | 65 + .../V1/OptimizeToursRequest/SolvingMode.php | 84 + .../V1/OptimizeToursResponse.php | 243 +++ .../V1/OptimizeToursResponse/Metrics.php | 372 +++++ .../V1/OptimizeToursValidationError.php | 316 ++++ .../FieldReference.php | 197 +++ .../RouteOptimization/V1/OutputConfig.php | 111 ++ .../RouteOptimization/V1/RouteModifiers.php | 204 +++ .../Maps/RouteOptimization/V1/Shipment.php | 841 ++++++++++ .../RouteOptimization/V1/Shipment/Load.php | 81 + .../V1/Shipment/VisitRequest.php | 615 +++++++ .../RouteOptimization/V1/ShipmentModel.php | 1010 ++++++++++++ .../ShipmentModel/DurationDistanceMatrix.php | 137 ++ .../DurationDistanceMatrix/Row.php | 116 ++ .../V1/ShipmentModel/PrecedenceRule.php | 243 +++ .../RouteOptimization/V1/ShipmentRoute.php | 706 ++++++++ .../V1/ShipmentRoute/EncodedPolyline.php | 73 + .../V1/ShipmentRoute/PBBreak.php | 124 ++ .../V1/ShipmentRoute/Transition.php | 639 ++++++++ .../V1/ShipmentRoute/VehicleLoad.php | 80 + .../V1/ShipmentRoute/Visit.php | 433 +++++ .../V1/ShipmentTypeIncompatibility.php | 107 ++ .../IncompatibilityMode.php | 72 + .../V1/ShipmentTypeRequirement.php | 156 ++ .../RequirementMode.php | 80 + .../RouteOptimization/V1/SkippedShipment.php | 157 ++ .../V1/SkippedShipment/Reason.php | 181 +++ .../V1/SkippedShipment/Reason/Code.php | 115 ++ .../Maps/RouteOptimization/V1/TimeWindow.php | 389 +++++ .../V1/TransitionAttributes.php | 412 +++++ .../Maps/RouteOptimization/V1/Vehicle.php | 1423 +++++++++++++++++ .../V1/Vehicle/DurationLimit.php | 359 +++++ .../V1/Vehicle/LoadLimit.php | 270 ++++ .../V1/Vehicle/LoadLimit/Interval.php | 150 ++ .../V1/Vehicle/TravelMode.php | 67 + .../V1/Vehicle/UnloadingPolicy.php | 68 + .../Maps/RouteOptimization/V1/Waypoint.php | 166 ++ .../batch_optimize_tours.php | 133 ++ .../optimize_tours.php | 89 ++ .../src/V1/Client/RouteOptimizationClient.php | 323 ++++ .../v1/src/V1/gapic_metadata.json | 28 + .../route_optimization_client_config.json | 44 + .../route_optimization_descriptor_config.php | 59 + .../route_optimization_rest_client_config.php | 80 + .../V1/Client/RouteOptimizationClientTest.php | 327 ++++ 65 files changed, 15704 insertions(+) create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php new file mode 100644 index 0000000000000000000000000000000000000000..debefc2ef34e4d83c84bc87abc669dd3c1aa4075 GIT binary patch literal 17393 zcmcg!+ix3JdJm}^`BB%AFEo7#O~)JCNvKGf|6I(FU2Bo8g?uxYFu>uqPnwmPn1wO#Yr{9JcU ztF>~n${%X}rDnE`zj`uh8*ayLz0dYd1itY8+8@BiY}?$= zwptc(!D=~~O!rJ(5@$_ZZ<Q%S(`Ytw#*uzvTK4!;i&pEu|r+CgD8a zcD-B3clg}#m-ePsO_WDhKW>jdw|d$(_KUjPY#k1s#H8ho4^1H(*+#o#{U9OrNYKE{jFw{;t(HXcfb?nHAFzsZJ`BbYn38b(vATdf20(20kW6L(^3#WY{! zY&NCOTqvD&PFwXYqPotAvXv759)iW*H_8>5ZJ18Gsh?_O^13?{2n70hWWHMr&x_DG^~IIgXusftIK?0hi#1O>4@qFjfIbSkr9 z*todf(C~Z*2WCAUW3LmSw5@gr&5NP6t>$UdY#B~`mc6?T*S&W*3yCnkcZbcfVedj( zZ#J!GxUPL@;7RocQNcf)wuxlfj_nSj6uLCic^aQ*^KQVUj$>$t2Fj0P)-^N`u8vT{ zi7&AC`>#U6dwFaivT!ssvIwE@K#lk!4hn6)^e3T^l7frJ`g83Bfeqp(TE?(#%XZ>Z zIA&@yL}TV)it#1BgwLX>ClJF6BTZmpwghu|btAi5tZJ1~aZg=*Nx?^Z*xGSin#VO3AXZkZyX9?dBU`EB3O69JUfQngBK2&ssAc!Eg<_T#s1~-= z#c=LAT0oaI>HD!XmH5utd7>I3ZE*?m+}Ob23;>v`*1Y1z{&SKF;PiMlpUBsPTFSOiIdri zt$lP(f@KtRatmqn07NG7Zxb*h{#JG&t{)!S#v#QTT>Uk<9Qo(i+FPTS%X$liOTzMnM{Xoy3s-tLz7AOhEIM1Q+3O6$x_ihek|8H+nWXMv6t=X zbt0y=T>Df}09*w81a};lU27=uI)HCP3?`l$ryPioaX{(n7>s41O!&P}>R$lnr1X)A zXe#$1+7)E3EB8ikS<*mOMFfi___{lK_8z}9B?-%<*E$AeCx*N#QYW%+%m%&#ONULX zhDY{Y;OIMe3l_vQ@8Y-;47+u73}TYRw2aTpIv*hvMW2keS@|9$y!X<$qj@47K_eew zm%cHY2a<#A7CbDJ7v5rv=sj2N!p$?*dagNkU2}EByySJGLx(m{lG#ua$tWuCMW5r- zU0kY$alV7jlO*=t(VMS&elzRMRu150DM=ckdvuYMZ9vymGn?pSnFpo??vGwTa)-jO zLV(Pv@*PM7*C9J?+6DnaCqBo{@cZXmf`SY|0ny|l0+G7WFwkpjcBhH^o@YeIFv)V? z{8o27I%Oo2_*DolNzmJK(T`!$ww^htxMSLk;6j6`rpwkdj8T?)Y@mL~3_>)q4ihxu zb%;tKlN%TU*5_dw4Lzb3Brwl7TV6PRrhOl}zDSEWF|e~!HsaeAK5=FSK&tZiUc%su7qi0(rm*O%ck!_Gec zjGSinaSDZIiiDE+NM>7wc%nZ;c~Wk|mA+SWEo?SLMN`TJUSokq&$K8WCbo9A3@P8nD1zN{U=IWl#KIJ(45feoGhoJ8 z=o0NBdWu$}3aXoV*s^Q`4I9dP;(sS$HXtT%z@l#3COUepY1LVrz%(wlwk&U#jB&cC zyT#U_lJ5?Grk}Pg3JQ5{VhpeUNX$@HKxr75j=_W_o>wl*!}o#9Zulp73zNvi*3Pr= zEKD*-Mq(6Iaxlv{{tV@VtS3oOZ0&V^C&I*Wj);K=%gff9mhTa8T=Z=ATL=w!@Wi^Dl=w)OU* z{Na&#c!YM-5oigW2Y-$=J)7_WM?>h7`D3zemd&70gc8`H)GwD|M#f#e&?QNxL@7WF z!-5mcrXQnZGAA;>_V(x-5meI{6yRiHK9X8s*%zY3k0+eWo1@9~u;n$F=b_&?ZYC!O ze+3tF7iKAF^p@k%=0LCZZ9ddnjK`Sg@n;y(i@=s5If6G)Wf3AQYNaO>P7EZC1{`(DnuRfr9Ln552=mCx(nz9Wu+jvAK9T7hquL|6_L+MV(%k{$P){7df+r!u zcm`sPTrk!cqXf_=cr4!dF5DVNZv$)J39fxMQ&}E-9iZBUD_G5{ma}_maS$Yo!A!nf z*eh&5Ks1g2d6X?ar2m9dHCX8NO^7gew~M809!F?9rD9?INl$U?A}kfLDn@{Oqfo{_ zO1o4dy95gVZ{T@2cNMNsZ8KoMrKe5(Z~~9f4Q10Fn4n4pFT)H=c)u=y294%YKWsGS z)S0q$kq9$B!;2xS!m3HoF-Gxa6<+aVo(X%+Kqnwfo^NroK>}u^;bw4(Pb0mR37iSl zz#8oBuILY0B=-uWdIk<4o%$J>BH;$PJG%@(rbuK;=_-Vozb3fod&>+xPf_^~;$aHx z)1f-Fv{a0Rq0KOre+Q2rmD&p(yffn=fG@ zFoIo2Se`H&Omn07j1uVB520CvFA-Z%M9pJAN}Rf=CBW!^{9M2Zy`TQI}L=%rwKb?eV7ZUBjyuehvh%VFN@0|lzr8zlH0JCiuvFQYx z!CH07ILmevnHnFXyzT8Sy&(y8+gcL;8iLutf*-)LS4Q^Poso8xx29!aNz{;ib4OZP zKKE?|GG?ob6L@0vY~kW9YCpkL(tv|08BmBCzYY)P@MDaiiD~XQSt^Dodnxe4jG&PE z!D6@K%tCtvz;h>}YL96OSs?O1<}EE;|K9~gj`lH<1JGga>TOt*^8zklxW7_ingt-T z0qdR7;wqD7>~K7zi!D-=N)dKX7KJnCrPVc^$}PBhq&u?93Gd^;(4B5wmC6+ngzED= zf|R{XtXXQT&X3?BRIIq7CB}H0bxtYB6(&8hLVRwnFulUsgV&Nm#f=y25vf9qpORd@ zgN;v=^B+U|gGXeywcc&5KnKLB`Wh@)ET8zR37BF5BPHV;ks+mulqb1M5XD%Yr=*#6 zj3`%OnaL4WrC9r_7*C2kgXTo{9 zamWl@gp0E`Wn_gbD4V=pbeL@R+Z5SzkaV@fEmoLIf(L5#mK;qfg5{Pz={wNNc?ybrum=BLn_~TrHyggkb?c1f+V)& zVT}XZbB*WtO$jz1N}$0HL>v_TF5iM1atwwy2KE$TN?6A)qfG3YU!Z68* zUVz2*{)XClfbEj6rgsZo&Z}G5?YyQwURTw8MZVM4vpd;!EEX$_Mb?7^{gaOFlSzN_h)b z#+i-X!rG(4cE0qevN)|=hGlsQIwf`%mmXpN@eJ!1mTV7PP3jkuu+-mmiUuA#urbMS zOwp(G@VwiUlxJ#?TN$M%N}stNh2p;ww|Y^Tb5C#n#oz=9iaUdbBc zyNbTMOK<7VeO9{(bAbn6tHnMXQ8IcgDocN1LxG?C2@)wst#V=sGbGSlt zi^XD$)L({RiW8@Vvr4(`;71y_;bvJaW*=*Ng-W5y+7c>ScB876wd!VBt!$QxdCW_% zL3+S2^gI=8q)^Fm^v((6$2nK{9QLtC56OwtA5XxwK+F4H&!-D4k0;#pR9~MZPYZkp zrrAe~QhLWI2@YE`&Ax6e8`w^P`6Yvr5$t0d%!)dWe#oOVmV3l*Q_Lq&J)5;v@vm{B ziJxN|Y!3}QM)#{g%wr0?Bj5oR4H=kZsY^`XeHZ)iJ2mV}#V<2iSP@(M-JXfsUKv2q zu%wC~38elu1To*&hDsLTu3JwKTbbh z9w%X47U!^3RxSe5d>g5M!mOPCJ4VEC3$#o8xXLxD@yOz3!`RvwttGhCe0SdOaKD&W z_iZS39ikprsGQlcO%Bo7=~5|}5ALLY%snhnb(wHu7{}B2z``)k*ZIuBZ;ckgvNnng=rrsTV zz#wC4eIH8`cUDsO22cJXGjKwp`eioBLT$llCMDvC_!YU6#;-Vjl}#VHZrjPMtUP=6 ztmoy5-f@rcV{@z1cmvB4E@^-6&%#v4JC>|Evllmay-z~L&pqtW?=S3xK7Gt6OF~F< z<k|;_V?lB1NNH~h$8WG`o4Xn_g24@L-zUaR`4IL5JJru zwU57C@!Rk%PAHQhN|{U_sZ3^XwKk0s?pklX>ismp>-<+Bd_Nk2DQ;{P81RD;Y$X3- KhcDm@fd2=v>Qx;8 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php new file mode 100644 index 000000000000..a4e7c9fdc222 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php @@ -0,0 +1,454 @@ +google.maps.routeoptimization.v1.AggregatedMetrics + */ +class AggregatedMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + */ + protected $performed_shipment_count = 0; + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + */ + protected $travel_duration = null; + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + */ + protected $wait_duration = null; + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + */ + protected $delay_duration = null; + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + */ + protected $break_duration = null; + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + */ + protected $visit_duration = null; + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + */ + protected $total_duration = null; + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + */ + protected $travel_distance_meters = 0.0; + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + */ + private $max_loads; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $performed_shipment_count + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * @type \Google\Protobuf\Duration $travel_duration + * Total travel duration for a route or a solution. + * @type \Google\Protobuf\Duration $wait_duration + * Total wait duration for a route or a solution. + * @type \Google\Protobuf\Duration $delay_duration + * Total delay duration for a route or a solution. + * @type \Google\Protobuf\Duration $break_duration + * Total break duration for a route or a solution. + * @type \Google\Protobuf\Duration $visit_duration + * Total visit duration for a route or a solution. + * @type \Google\Protobuf\Duration $total_duration + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * @type float $travel_distance_meters + * Total travel distance for a route or a solution. + * @type array|\Google\Protobuf\Internal\MapField $max_loads + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + * @return int + */ + public function getPerformedShipmentCount() + { + return $this->performed_shipment_count; + } + + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + * @param int $var + * @return $this + */ + public function setPerformedShipmentCount($var) + { + GPBUtil::checkInt32($var); + $this->performed_shipment_count = $var; + + return $this; + } + + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDelayDuration() + { + return $this->delay_duration; + } + + public function hasDelayDuration() + { + return isset($this->delay_duration); + } + + public function clearDelayDuration() + { + unset($this->delay_duration); + } + + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelayDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay_duration = $var; + + return $this; + } + + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getBreakDuration() + { + return $this->break_duration; + } + + public function hasBreakDuration() + { + return isset($this->break_duration); + } + + public function clearBreakDuration() + { + unset($this->break_duration); + } + + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->break_duration = $var; + + return $this; + } + + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getVisitDuration() + { + return $this->visit_duration; + } + + public function hasVisitDuration() + { + return isset($this->visit_duration); + } + + public function clearVisitDuration() + { + unset($this->visit_duration); + } + + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVisitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->visit_duration = $var; + + return $this; + } + + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + * @return float + */ + public function getTravelDistanceMeters() + { + return $this->travel_distance_meters; + } + + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + * @param float $var + * @return $this + */ + public function setTravelDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->travel_distance_meters = $var; + + return $this; + } + + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMaxLoads() + { + return $this->max_loads; + } + + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMaxLoads($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); + $this->max_loads = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php new file mode 100644 index 000000000000..50b825aa8a7e --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php @@ -0,0 +1,33 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursMetadata + */ +class BatchOptimizeToursMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php new file mode 100644 index 000000000000..3c9fbf3f7c0d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php @@ -0,0 +1,125 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursRequest + */ +class BatchOptimizeToursRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $model_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * @type array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $model_configs + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModelConfigs() + { + return $this->model_configs; + } + + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModelConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig::class); + $this->model_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php new file mode 100644 index 000000000000..9f323a5cd726 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php @@ -0,0 +1,162 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig + */ +class AsyncModelConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * @type \Google\Maps\RouteOptimization\V1\InputConfig $input_config + * Required. Information about the input model. + * @type \Google\Maps\RouteOptimization\V1\OutputConfig $output_config + * Required. The desired output location information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\RouteOptimization\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\RouteOptimization\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\RouteOptimization\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\RouteOptimization\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AsyncModelConfig::class, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest_AsyncModelConfig::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php new file mode 100644 index 000000000000..2b0e02bf139a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php @@ -0,0 +1,34 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursResponse + */ +class BatchOptimizeToursResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php new file mode 100644 index 000000000000..500ac900d732 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php @@ -0,0 +1,113 @@ +google.maps.routeoptimization.v1.BreakRule + */ +class BreakRule extends \Google\Protobuf\Internal\Message +{ + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; + */ + private $break_requests; + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + */ + private $frequency_constraints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests + * Sequence of breaks. See the `BreakRequest` message. + * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreakRequests() + { + return $this->break_requests; + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; + * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreakRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest::class); + $this->break_requests = $arr; + + return $this; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrequencyConstraints() + { + return $this->frequency_constraints; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrequencyConstraints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint::class); + $this->frequency_constraints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php new file mode 100644 index 000000000000..3defefe05194 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php @@ -0,0 +1,172 @@ +google.maps.routeoptimization.v1.BreakRule.BreakRequest + */ +class BreakRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $earliest_start_time = null; + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $latest_start_time = null; + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $earliest_start_time + * Required. Lower bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Timestamp $latest_start_time + * Required. Upper bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Duration $min_duration + * Required. Minimum duration of the break. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestStartTime() + { + return $this->earliest_start_time; + } + + public function hasEarliestStartTime() + { + return isset($this->earliest_start_time); + } + + public function clearEarliestStartTime() + { + unset($this->earliest_start_time); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_start_time = $var; + + return $this; + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestStartTime() + { + return $this->latest_start_time; + } + + public function hasLatestStartTime() + { + return isset($this->latest_start_time); + } + + public function clearLatestStartTime() + { + unset($this->latest_start_time); + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_start_time = $var; + + return $this; + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinDuration() + { + return $this->min_duration; + } + + public function hasMinDuration() + { + return isset($this->min_duration); + } + + public function clearMinDuration() + { + unset($this->min_duration); + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakRequest::class, \Google\Maps\RouteOptimization\V1\BreakRule_BreakRequest::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php new file mode 100644 index 000000000000..3a9cd80a9e6d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php @@ -0,0 +1,166 @@ +google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint + */ +class FrequencyConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_break_duration = null; + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_inter_break_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $min_break_duration + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * @type \Google\Protobuf\Duration $max_inter_break_duration + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBreakDuration() + { + return $this->min_break_duration; + } + + public function hasMinBreakDuration() + { + return isset($this->min_break_duration); + } + + public function clearMinBreakDuration() + { + unset($this->min_break_duration); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_break_duration = $var; + + return $this; + } + + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxInterBreakDuration() + { + return $this->max_inter_break_duration; + } + + public function hasMaxInterBreakDuration() + { + return isset($this->max_inter_break_duration); + } + + public function clearMaxInterBreakDuration() + { + unset($this->max_inter_break_duration); + } + + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxInterBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_inter_break_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FrequencyConstraint::class, \Google\Maps\RouteOptimization\V1\BreakRule_FrequencyConstraint::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php new file mode 100644 index 000000000000..76303e93fb37 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php @@ -0,0 +1,62 @@ +google.maps.routeoptimization.v1.DataFormat + */ +class DataFormat +{ + /** + * Invalid value, format must not be UNSPECIFIED. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * JavaScript Object Notation. + * + * Generated from protobuf enum JSON = 1; + */ + const JSON = 1; + /** + * Protocol Buffers text format. See + * https://protobuf.dev/reference/protobuf/textformat-spec/ + * + * Generated from protobuf enum PROTO_TEXT = 2; + */ + const PROTO_TEXT = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::JSON => 'JSON', + self::PROTO_TEXT => 'PROTO_TEXT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php new file mode 100644 index 000000000000..a2ec284f830a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php @@ -0,0 +1,284 @@ +google.maps.routeoptimization.v1.DistanceLimit + */ +class DistanceLimit extends \Google\Protobuf\Internal\Message +{ + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + */ + protected $max_meters = null; + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + */ + protected $soft_max_meters = null; + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + */ + protected $cost_per_kilometer_below_soft_max = null; + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + */ + protected $cost_per_kilometer_above_soft_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_meters + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * @type int|string $soft_max_meters + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * @type float $cost_per_kilometer_below_soft_max + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * @type float $cost_per_kilometer_above_soft_max + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + * @return int|string + */ + public function getMaxMeters() + { + return isset($this->max_meters) ? $this->max_meters : 0; + } + + public function hasMaxMeters() + { + return isset($this->max_meters); + } + + public function clearMaxMeters() + { + unset($this->max_meters); + } + + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + * @param int|string $var + * @return $this + */ + public function setMaxMeters($var) + { + GPBUtil::checkInt64($var); + $this->max_meters = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + * @return int|string + */ + public function getSoftMaxMeters() + { + return isset($this->soft_max_meters) ? $this->soft_max_meters : 0; + } + + public function hasSoftMaxMeters() + { + return isset($this->soft_max_meters); + } + + public function clearSoftMaxMeters() + { + unset($this->soft_max_meters); + } + + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + * @param int|string $var + * @return $this + */ + public function setSoftMaxMeters($var) + { + GPBUtil::checkInt64($var); + $this->soft_max_meters = $var; + + return $this; + } + + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + * @return float + */ + public function getCostPerKilometerBelowSoftMax() + { + return isset($this->cost_per_kilometer_below_soft_max) ? $this->cost_per_kilometer_below_soft_max : 0.0; + } + + public function hasCostPerKilometerBelowSoftMax() + { + return isset($this->cost_per_kilometer_below_soft_max); + } + + public function clearCostPerKilometerBelowSoftMax() + { + unset($this->cost_per_kilometer_below_soft_max); + } + + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + * @param float $var + * @return $this + */ + public function setCostPerKilometerBelowSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer_below_soft_max = $var; + + return $this; + } + + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + * @return float + */ + public function getCostPerKilometerAboveSoftMax() + { + return isset($this->cost_per_kilometer_above_soft_max) ? $this->cost_per_kilometer_above_soft_max : 0.0; + } + + public function hasCostPerKilometerAboveSoftMax() + { + return isset($this->cost_per_kilometer_above_soft_max); + } + + public function clearCostPerKilometerAboveSoftMax() + { + unset($this->cost_per_kilometer_above_soft_max); + } + + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerKilometerAboveSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer_above_soft_max = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php new file mode 100644 index 000000000000..593d35570a86 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php @@ -0,0 +1,68 @@ +google.maps.routeoptimization.v1.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Storage URI. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. Google Cloud Storage URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Storage URI. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. Google Cloud Storage URI. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php new file mode 100644 index 000000000000..a4b7083b7252 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php @@ -0,0 +1,71 @@ +google.maps.routeoptimization.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php new file mode 100644 index 000000000000..bfb8197f0531 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php @@ -0,0 +1,156 @@ +google.maps.routeoptimization.v1.InjectedSolutionConstraint + */ +class InjectedSolutionConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + */ + private $routes; + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; + */ + private $skipped_shipments; + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + */ + private $constraint_relaxations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $constraint_relaxations + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->routes = $arr; + + return $this; + } + + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkippedShipments() + { + return $this->skipped_shipments; + } + + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; + * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkippedShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); + $this->skipped_shipments = $arr; + + return $this; + } + + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConstraintRelaxations() + { + return $this->constraint_relaxations; + } + + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConstraintRelaxations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation::class); + $this->constraint_relaxations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php new file mode 100644 index 000000000000..9f6a431bd350 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php @@ -0,0 +1,151 @@ +google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation + */ +class ConstraintRelaxation extends \Google\Protobuf\Internal\Message +{ + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + */ + private $relaxations; + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + */ + private $vehicle_indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $relaxations + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * @type array|\Google\Protobuf\Internal\RepeatedField $vehicle_indices + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelaxations() + { + return $this->relaxations; + } + + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelaxations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation::class); + $this->relaxations = $arr; + + return $this; + } + + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVehicleIndices() + { + return $this->vehicle_indices; + } + + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->vehicle_indices = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConstraintRelaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php new file mode 100644 index 000000000000..f8cb219682a8 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php @@ -0,0 +1,204 @@ += relaxations(i).threshold_time` AND + * * `j + 1 >= relaxations(i).threshold_visit_count` + * Similarly, the vehicle start is relaxed to `relaxations(i).level` if it + * satisfies: + * * `vehicle_start_time >= relaxations(i).threshold_time` AND + * * `relaxations(i).threshold_visit_count == 0` + * and the vehicle end is relaxed to `relaxations(i).level` if it satisfies: + * * `vehicle_end_time >= relaxations(i).threshold_time` AND + * * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count` + * To apply a relaxation level if a visit meets the `threshold_visit_count` + * OR the `threshold_time` add two `relaxations` with the same `level`: + * one with only `threshold_visit_count` set and the other with only + * `threshold_time` set. If a visit satisfies the conditions of multiple + * `relaxations`, the most relaxed level applies. As a result, from the + * vehicle start through the route visits in order to the vehicle end, the + * relaxation level becomes more relaxed: i.e., the relaxation level is + * non-decreasing as the route progresses. + * The timing and sequence of route visits that do not satisfy the + * threshold conditions of any `relaxations` are fully constrained + * and no visits may be inserted into these sequences. Also, if a + * vehicle start or end does not satisfy the conditions of any + * relaxation the time is fixed, unless the vehicle is empty. + * + * Generated from protobuf message google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation + */ +class Relaxation extends \Google\Protobuf\Internal\Message +{ + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + */ + protected $level = 0; + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + */ + protected $threshold_time = null; + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + */ + protected $threshold_visit_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $level + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * @type \Google\Protobuf\Timestamp $threshold_time + * The time at or after which the relaxation `level` may be applied. + * @type int $threshold_visit_count + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + * @param int $var + * @return $this + */ + public function setLevel($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation\Level::class); + $this->level = $var; + + return $this; + } + + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getThresholdTime() + { + return $this->threshold_time; + } + + public function hasThresholdTime() + { + return isset($this->threshold_time); + } + + public function clearThresholdTime() + { + unset($this->threshold_time); + } + + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setThresholdTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->threshold_time = $var; + + return $this; + } + + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + * @return int + */ + public function getThresholdVisitCount() + { + return $this->threshold_visit_count; + } + + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + * @param int $var + * @return $this + */ + public function setThresholdVisitCount($var) + { + GPBUtil::checkInt32($var); + $this->threshold_visit_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Relaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php new file mode 100644 index 000000000000..718a0dba2366 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php @@ -0,0 +1,83 @@ +google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level + */ +class Level +{ + /** + * Implicit default relaxation level: no constraints are relaxed, + * i.e., all visits are fully constrained. + * This value must not be explicitly used in `level`. + * + * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; + */ + const LEVEL_UNSPECIFIED = 0; + /** + * Visit start times and vehicle start/end times will be relaxed, but + * each visit remains bound to the same vehicle and the visit sequence + * must be observed: no visit can be inserted between them or before + * them. + * + * Generated from protobuf enum RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; + */ + const RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; + /** + * Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence + * is also relaxed: visits can only be performed by this vehicle, but + * can potentially become unperformed. + * + * Generated from protobuf enum RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; + */ + const RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; + /** + * Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the + * vehicle is also relaxed: visits are completely free at or after the + * threshold time and can potentially become unperformed. + * + * Generated from protobuf enum RELAX_ALL_AFTER_THRESHOLD = 3; + */ + const RELAX_ALL_AFTER_THRESHOLD = 3; + + private static $valueToName = [ + self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', + self::RELAX_VISIT_TIMES_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AFTER_THRESHOLD', + self::RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD', + self::RELAX_ALL_AFTER_THRESHOLD => 'RELAX_ALL_AFTER_THRESHOLD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Level::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation_Level::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php new file mode 100644 index 000000000000..1ce8d31e1dbd --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php @@ -0,0 +1,110 @@ +google.maps.routeoptimization.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The input data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_format = 0; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\GcsSource $gcs_source + * A Google Cloud Storage location. This must be a single object (file). + * @type int $data_format + * Required. The input data format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A Google Cloud Storage location. This must be a single object (file). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; + * @return \Google\Maps\RouteOptimization\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * A Google Cloud Storage location. This must be a single object (file). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; + * @param \Google\Maps\RouteOptimization\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Required. The input data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Required. The input data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php new file mode 100644 index 000000000000..fd6c1e3bb48d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php @@ -0,0 +1,133 @@ +google.maps.routeoptimization.v1.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + */ + protected $lat_lng = null; + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + */ + protected $heading = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $lat_lng + * The waypoint's geographic coordinates. + * @type int $heading + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + * @return int + */ + public function getHeading() + { + return isset($this->heading) ? $this->heading : 0; + } + + public function hasHeading() + { + return isset($this->heading); + } + + public function clearHeading() + { + unset($this->heading); + } + + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + * @param int $var + * @return $this + */ + public function setHeading($var) + { + GPBUtil::checkInt32($var); + $this->heading = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php new file mode 100644 index 000000000000..a7a94c081cf6 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php @@ -0,0 +1,1178 @@ +google.maps.routeoptimization.v1.OptimizeToursRequest + */ +class OptimizeToursRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + */ + protected $timeout = null; + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; + */ + protected $model = null; + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + */ + protected $solving_mode = 0; + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + */ + protected $search_mode = 0; + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; + */ + private $injected_first_solution_routes; + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + */ + protected $injected_solution_constraint = null; + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; + */ + private $refresh_details_routes; + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + */ + protected $interpret_injected_solutions_using_labels = false; + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + */ + protected $consider_road_traffic = false; + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + */ + protected $populate_polylines = false; + /** + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + */ + protected $populate_transition_polylines = false; + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + */ + protected $allow_large_deadline_despite_interruption_risk = false; + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + */ + protected $use_geodesic_distances = false; + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + */ + protected $geodesic_meters_per_second = null; + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + */ + protected $max_validation_errors = null; + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * @type \Google\Protobuf\Duration $timeout + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * @type \Google\Maps\RouteOptimization\V1\ShipmentModel $model + * Shipment model to solve. + * @type int $solving_mode + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * @type int $search_mode + * Search mode used to solve the request. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $injected_first_solution_routes + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * @type \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $injected_solution_constraint + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $refresh_details_routes + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * @type bool $interpret_injected_solutions_using_labels + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * @type bool $consider_road_traffic + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * @type bool $populate_polylines + * If true, polylines will be populated in response `ShipmentRoute`s. + * @type bool $populate_transition_polylines + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * @type bool $allow_large_deadline_despite_interruption_risk + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * @type bool $use_geodesic_distances + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * @type float $geodesic_meters_per_second + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * @type int $max_validation_errors + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * @type string $label + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; + * @return \Google\Maps\RouteOptimization\V1\ShipmentModel|null + */ + public function getModel() + { + return $this->model; + } + + public function hasModel() + { + return isset($this->model); + } + + public function clearModel() + { + unset($this->model); + } + + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; + * @param \Google\Maps\RouteOptimization\V1\ShipmentModel $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentModel::class); + $this->model = $var; + + return $this; + } + + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + * @return int + */ + public function getSolvingMode() + { + return $this->solving_mode; + } + + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + * @param int $var + * @return $this + */ + public function setSolvingMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SolvingMode::class); + $this->solving_mode = $var; + + return $this; + } + + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + * @return int + */ + public function getSearchMode() + { + return $this->search_mode; + } + + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + * @param int $var + * @return $this + */ + public function setSearchMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SearchMode::class); + $this->search_mode = $var; + + return $this; + } + + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInjectedFirstSolutionRoutes() + { + return $this->injected_first_solution_routes; + } + + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInjectedFirstSolutionRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->injected_first_solution_routes = $arr; + + return $this; + } + + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + * @return \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint|null + */ + public function getInjectedSolutionConstraint() + { + return $this->injected_solution_constraint; + } + + public function hasInjectedSolutionConstraint() + { + return isset($this->injected_solution_constraint); + } + + public function clearInjectedSolutionConstraint() + { + unset($this->injected_solution_constraint); + } + + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + * @param \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $var + * @return $this + */ + public function setInjectedSolutionConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint::class); + $this->injected_solution_constraint = $var; + + return $this; + } + + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRefreshDetailsRoutes() + { + return $this->refresh_details_routes; + } + + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRefreshDetailsRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->refresh_details_routes = $arr; + + return $this; + } + + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + * @return bool + */ + public function getInterpretInjectedSolutionsUsingLabels() + { + return $this->interpret_injected_solutions_using_labels; + } + + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + * @param bool $var + * @return $this + */ + public function setInterpretInjectedSolutionsUsingLabels($var) + { + GPBUtil::checkBool($var); + $this->interpret_injected_solutions_using_labels = $var; + + return $this; + } + + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + * @return bool + */ + public function getConsiderRoadTraffic() + { + return $this->consider_road_traffic; + } + + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + * @param bool $var + * @return $this + */ + public function setConsiderRoadTraffic($var) + { + GPBUtil::checkBool($var); + $this->consider_road_traffic = $var; + + return $this; + } + + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + * @return bool + */ + public function getPopulatePolylines() + { + return $this->populate_polylines; + } + + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + * @param bool $var + * @return $this + */ + public function setPopulatePolylines($var) + { + GPBUtil::checkBool($var); + $this->populate_polylines = $var; + + return $this; + } + + /** + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + * @return bool + */ + public function getPopulateTransitionPolylines() + { + return $this->populate_transition_polylines; + } + + /** + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + * @param bool $var + * @return $this + */ + public function setPopulateTransitionPolylines($var) + { + GPBUtil::checkBool($var); + $this->populate_transition_polylines = $var; + + return $this; + } + + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + * @return bool + */ + public function getAllowLargeDeadlineDespiteInterruptionRisk() + { + return $this->allow_large_deadline_despite_interruption_risk; + } + + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + * @param bool $var + * @return $this + */ + public function setAllowLargeDeadlineDespiteInterruptionRisk($var) + { + GPBUtil::checkBool($var); + $this->allow_large_deadline_despite_interruption_risk = $var; + + return $this; + } + + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + * @return bool + */ + public function getUseGeodesicDistances() + { + return $this->use_geodesic_distances; + } + + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + * @param bool $var + * @return $this + */ + public function setUseGeodesicDistances($var) + { + GPBUtil::checkBool($var); + $this->use_geodesic_distances = $var; + + return $this; + } + + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + * @return float + */ + public function getGeodesicMetersPerSecond() + { + return isset($this->geodesic_meters_per_second) ? $this->geodesic_meters_per_second : 0.0; + } + + public function hasGeodesicMetersPerSecond() + { + return isset($this->geodesic_meters_per_second); + } + + public function clearGeodesicMetersPerSecond() + { + unset($this->geodesic_meters_per_second); + } + + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + * @param float $var + * @return $this + */ + public function setGeodesicMetersPerSecond($var) + { + GPBUtil::checkDouble($var); + $this->geodesic_meters_per_second = $var; + + return $this; + } + + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + * @return int + */ + public function getMaxValidationErrors() + { + return isset($this->max_validation_errors) ? $this->max_validation_errors : 0; + } + + public function hasMaxValidationErrors() + { + return isset($this->max_validation_errors); + } + + public function clearMaxValidationErrors() + { + unset($this->max_validation_errors); + } + + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + * @param int $var + * @return $this + */ + public function setMaxValidationErrors($var) + { + GPBUtil::checkInt32($var); + $this->max_validation_errors = $var; + + return $this; + } + + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php new file mode 100644 index 000000000000..1933e8a6c82e --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php @@ -0,0 +1,65 @@ +google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode + */ +class SearchMode +{ + /** + * Unspecified search mode, equivalent to `RETURN_FAST`. + * + * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; + */ + const SEARCH_MODE_UNSPECIFIED = 0; + /** + * Stop the search after finding the first good solution. + * + * Generated from protobuf enum RETURN_FAST = 1; + */ + const RETURN_FAST = 1; + /** + * Spend all the available time to search for better solutions. + * + * Generated from protobuf enum CONSUME_ALL_AVAILABLE_TIME = 2; + */ + const CONSUME_ALL_AVAILABLE_TIME = 2; + + private static $valueToName = [ + self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', + self::RETURN_FAST => 'RETURN_FAST', + self::CONSUME_ALL_AVAILABLE_TIME => 'CONSUME_ALL_AVAILABLE_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SearchMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php new file mode 100644 index 000000000000..33490075a243 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php @@ -0,0 +1,84 @@ +google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode + */ +class SolvingMode +{ + /** + * Solve the model. Warnings may be issued in + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]. + * + * Generated from protobuf enum DEFAULT_SOLVE = 0; + */ + const DEFAULT_SOLVE = 0; + /** + * Only validates the model without solving it: populates as many + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * as possible. + * + * Generated from protobuf enum VALIDATE_ONLY = 1; + */ + const VALIDATE_ONLY = 1; + /** + * Only populates + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * or + * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments], + * and doesn't actually solve the rest of the request (`status` and `routes` + * are unset in the response). + * If infeasibilities in `injected_solution_constraint` routes are detected + * they are populated in the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field and + * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments] + * is left empty. + * *IMPORTANT*: not all infeasible shipments are returned here, but only the + * ones that are detected as infeasible during preprocessing. + * + * Generated from protobuf enum DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; + */ + const DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; + + private static $valueToName = [ + self::DEFAULT_SOLVE => 'DEFAULT_SOLVE', + self::VALIDATE_ONLY => 'VALIDATE_ONLY', + self::DETECT_SOME_INFEASIBLE_SHIPMENTS => 'DETECT_SOME_INFEASIBLE_SHIPMENTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SolvingMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SolvingMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php new file mode 100644 index 000000000000..4933ce254730 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php @@ -0,0 +1,243 @@ +google.maps.routeoptimization.v1.OptimizeToursResponse + */ +class OptimizeToursResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + */ + private $routes; + /** + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + */ + protected $request_label = ''; + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; + */ + private $skipped_shipments; + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; + */ + private $validation_errors; + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; + */ + protected $metrics = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * @type string $request_label + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments + * The list of all shipments skipped. + * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * @type \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $metrics + * Duration, distance and usage metrics for this solution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->routes = $arr; + + return $this; + } + + /** + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + * @return string + */ + public function getRequestLabel() + { + return $this->request_label; + } + + /** + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + * @param string $var + * @return $this + */ + public function setRequestLabel($var) + { + GPBUtil::checkString($var, True); + $this->request_label = $var; + + return $this; + } + + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkippedShipments() + { + return $this->skipped_shipments; + } + + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; + * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkippedShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); + $this->skipped_shipments = $arr; + + return $this; + } + + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidationErrors() + { + return $this->validation_errors; + } + + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; + * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidationErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError::class); + $this->validation_errors = $arr; + + return $this; + } + + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; + * @return \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; + * @param \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics::class); + $this->metrics = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php new file mode 100644 index 000000000000..88e8bbb1cba8 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php @@ -0,0 +1,372 @@ +google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + */ + protected $aggregated_route_metrics = null; + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + */ + protected $skipped_mandatory_shipment_count = 0; + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + */ + protected $used_vehicle_count = 0; + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + */ + protected $earliest_vehicle_start_time = null; + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + */ + protected $latest_vehicle_end_time = null; + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + */ + private $costs; + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + */ + protected $total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $aggregated_route_metrics + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * @type int $skipped_mandatory_shipment_count + * Number of mandatory shipments skipped. + * @type int $used_vehicle_count + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * @type \Google\Protobuf\Timestamp $earliest_vehicle_start_time + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * @type \Google\Protobuf\Timestamp $latest_vehicle_end_time + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * @type array|\Google\Protobuf\Internal\MapField $costs + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * @type float $total_cost + * Total cost of the solution. The sum of all values in the costs map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null + */ + public function getAggregatedRouteMetrics() + { + return $this->aggregated_route_metrics; + } + + public function hasAggregatedRouteMetrics() + { + return isset($this->aggregated_route_metrics); + } + + public function clearAggregatedRouteMetrics() + { + unset($this->aggregated_route_metrics); + } + + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var + * @return $this + */ + public function setAggregatedRouteMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); + $this->aggregated_route_metrics = $var; + + return $this; + } + + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + * @return int + */ + public function getSkippedMandatoryShipmentCount() + { + return $this->skipped_mandatory_shipment_count; + } + + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + * @param int $var + * @return $this + */ + public function setSkippedMandatoryShipmentCount($var) + { + GPBUtil::checkInt32($var); + $this->skipped_mandatory_shipment_count = $var; + + return $this; + } + + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + * @return int + */ + public function getUsedVehicleCount() + { + return $this->used_vehicle_count; + } + + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + * @param int $var + * @return $this + */ + public function setUsedVehicleCount($var) + { + GPBUtil::checkInt32($var); + $this->used_vehicle_count = $var; + + return $this; + } + + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestVehicleStartTime() + { + return $this->earliest_vehicle_start_time; + } + + public function hasEarliestVehicleStartTime() + { + return isset($this->earliest_vehicle_start_time); + } + + public function clearEarliestVehicleStartTime() + { + unset($this->earliest_vehicle_start_time); + } + + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestVehicleStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_vehicle_start_time = $var; + + return $this; + } + + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestVehicleEndTime() + { + return $this->latest_vehicle_end_time; + } + + public function hasLatestVehicleEndTime() + { + return isset($this->latest_vehicle_end_time); + } + + public function clearLatestVehicleEndTime() + { + unset($this->latest_vehicle_end_time); + } + + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestVehicleEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_vehicle_end_time = $var; + + return $this; + } + + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCosts() + { + return $this->costs; + } + + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCosts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs = $arr; + + return $this; + } + + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + * @return float + */ + public function getTotalCost() + { + return $this->total_cost; + } + + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + * @param float $var + * @return $this + */ + public function setTotalCost($var) + { + GPBUtil::checkDouble($var); + $this->total_cost = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Metrics::class, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse_Metrics::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php new file mode 100644 index 000000000000..8f2ad51ee288 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php @@ -0,0 +1,316 @@ +google.maps.routeoptimization.v1.OptimizeToursValidationError + */ +class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message +{ + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * + * Generated from protobuf field int32 code = 1; + */ + protected $code = 0; + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + */ + private $fields; + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + */ + protected $error_message = ''; + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + */ + protected $offending_values = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * @type string $display_name + * The error display name. + * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * @type string $error_message + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * @type string $offending_values + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * + * Generated from protobuf field int32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt32($var); + $this->code = $var; + + return $this; + } + + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); + $this->fields = $arr; + + return $this; + } + + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + * @return string + */ + public function getOffendingValues() + { + return $this->offending_values; + } + + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + * @param string $var + * @return $this + */ + public function setOffendingValues($var) + { + GPBUtil::checkString($var, True); + $this->offending_values = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php new file mode 100644 index 000000000000..0956451618ea --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php @@ -0,0 +1,197 @@ +google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference + */ +class FieldReference extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + */ + protected $sub_field = null; + protected $index_or_key; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the field, e.g., "vehicles". + * @type int $index + * Index of the field if repeated. + * @type string $key + * Key if the field is a map. + * @type \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $sub_field + * Recursively nested sub-field, if needed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Index of the field if repeated. + * + * Generated from protobuf field int32 index = 2; + * @return int + */ + public function getIndex() + { + return $this->readOneof(2); + } + + public function hasIndex() + { + return $this->hasOneof(2); + } + + /** + * Index of the field if repeated. + * + * Generated from protobuf field int32 index = 2; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Key if the field is a map. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->readOneof(4); + } + + public function hasKey() + { + return $this->hasOneof(4); + } + + /** + * Key if the field is a map. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + * @return \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference|null + */ + public function getSubField() + { + return $this->sub_field; + } + + public function hasSubField() + { + return isset($this->sub_field); + } + + public function clearSubField() + { + unset($this->sub_field); + } + + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + * @param \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $var + * @return $this + */ + public function setSubField($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); + $this->sub_field = $var; + + return $this; + } + + /** + * @return string + */ + public function getIndexOrKey() + { + return $this->whichOneof("index_or_key"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldReference::class, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError_FieldReference::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php new file mode 100644 index 000000000000..7ed7e0a1d93f --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php @@ -0,0 +1,111 @@ +google.maps.routeoptimization.v1.OutputConfig + */ +class OutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The output data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_format = 0; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\GcsDestination $gcs_destination + * The Google Cloud Storage location to write the output to. + * @type int $data_format + * Required. The output data format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to write the output to. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; + * @return \Google\Maps\RouteOptimization\V1\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * The Google Cloud Storage location to write the output to. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; + * @param \Google\Maps\RouteOptimization\V1\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Required. The output data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Required. The output data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php new file mode 100644 index 000000000000..941420fd652c --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php @@ -0,0 +1,204 @@ +google.maps.routeoptimization.v1.RouteModifiers + */ +class RouteModifiers extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + */ + protected $avoid_tolls = false; + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + */ + protected $avoid_highways = false; + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + */ + protected $avoid_ferries = false; + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $avoid_indoor = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $avoid_tolls + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * @type bool $avoid_highways + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * @type bool $avoid_ferries + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * @type bool $avoid_indoor + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + * @return bool + */ + public function getAvoidTolls() + { + return $this->avoid_tolls; + } + + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + * @param bool $var + * @return $this + */ + public function setAvoidTolls($var) + { + GPBUtil::checkBool($var); + $this->avoid_tolls = $var; + + return $this; + } + + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + * @return bool + */ + public function getAvoidHighways() + { + return $this->avoid_highways; + } + + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + * @param bool $var + * @return $this + */ + public function setAvoidHighways($var) + { + GPBUtil::checkBool($var); + $this->avoid_highways = $var; + + return $this; + } + + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + * @return bool + */ + public function getAvoidFerries() + { + return $this->avoid_ferries; + } + + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + * @param bool $var + * @return $this + */ + public function setAvoidFerries($var) + { + GPBUtil::checkBool($var); + $this->avoid_ferries = $var; + + return $this; + } + + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAvoidIndoor() + { + return $this->avoid_indoor; + } + + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAvoidIndoor($var) + { + GPBUtil::checkBool($var); + $this->avoid_indoor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php new file mode 100644 index 000000000000..c3de173e6cc8 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php @@ -0,0 +1,841 @@ +google.maps.routeoptimization.v1.Shipment + */ +class Shipment extends \Google\Protobuf\Internal\Message +{ + /** + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 16; + */ + protected $display_name = ''; + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; + */ + private $pickups; + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; + */ + private $deliveries; + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + */ + private $load_demands; + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + */ + protected $penalty_cost = null; + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + */ + private $allowed_vehicle_indices; + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + */ + private $costs_per_vehicle; + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + */ + private $costs_per_vehicle_indices; + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + */ + protected $pickup_to_delivery_relative_detour_limit = null; + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + */ + protected $pickup_to_delivery_absolute_detour_limit = null; + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + */ + protected $pickup_to_delivery_time_limit = null; + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + */ + protected $shipment_type = ''; + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + */ + protected $label = ''; + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + */ + protected $ignore = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $pickups + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $deliveries + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * @type float $penalty_cost + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_vehicle_indices + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle_indices + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * @type float $pickup_to_delivery_relative_detour_limit + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * @type \Google\Protobuf\Duration $pickup_to_delivery_absolute_detour_limit + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * @type \Google\Protobuf\Duration $pickup_to_delivery_time_limit + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * @type string $shipment_type + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * @type string $label + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * @type bool $ignore + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 16; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 16; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPickups() + { + return $this->pickups; + } + + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; + * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPickups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); + $this->pickups = $arr; + + return $this; + } + + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeliveries() + { + return $this->deliveries; + } + + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; + * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeliveries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); + $this->deliveries = $arr; + + return $this; + } + + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + * @return float + */ + public function getPenaltyCost() + { + return isset($this->penalty_cost) ? $this->penalty_cost : 0.0; + } + + public function hasPenaltyCost() + { + return isset($this->penalty_cost); + } + + public function clearPenaltyCost() + { + unset($this->penalty_cost); + } + + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + * @param float $var + * @return $this + */ + public function setPenaltyCost($var) + { + GPBUtil::checkDouble($var); + $this->penalty_cost = $var; + + return $this; + } + + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedVehicleIndices() + { + return $this->allowed_vehicle_indices; + } + + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->allowed_vehicle_indices = $arr; + + return $this; + } + + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCostsPerVehicle() + { + return $this->costs_per_vehicle; + } + + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCostsPerVehicle($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs_per_vehicle = $arr; + + return $this; + } + + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCostsPerVehicleIndices() + { + return $this->costs_per_vehicle_indices; + } + + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCostsPerVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->costs_per_vehicle_indices = $arr; + + return $this; + } + + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + * @return float + */ + public function getPickupToDeliveryRelativeDetourLimit() + { + return isset($this->pickup_to_delivery_relative_detour_limit) ? $this->pickup_to_delivery_relative_detour_limit : 0.0; + } + + public function hasPickupToDeliveryRelativeDetourLimit() + { + return isset($this->pickup_to_delivery_relative_detour_limit); + } + + public function clearPickupToDeliveryRelativeDetourLimit() + { + unset($this->pickup_to_delivery_relative_detour_limit); + } + + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + * @param float $var + * @return $this + */ + public function setPickupToDeliveryRelativeDetourLimit($var) + { + GPBUtil::checkDouble($var); + $this->pickup_to_delivery_relative_detour_limit = $var; + + return $this; + } + + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getPickupToDeliveryAbsoluteDetourLimit() + { + return $this->pickup_to_delivery_absolute_detour_limit; + } + + public function hasPickupToDeliveryAbsoluteDetourLimit() + { + return isset($this->pickup_to_delivery_absolute_detour_limit); + } + + public function clearPickupToDeliveryAbsoluteDetourLimit() + { + unset($this->pickup_to_delivery_absolute_detour_limit); + } + + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPickupToDeliveryAbsoluteDetourLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->pickup_to_delivery_absolute_detour_limit = $var; + + return $this; + } + + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getPickupToDeliveryTimeLimit() + { + return $this->pickup_to_delivery_time_limit; + } + + public function hasPickupToDeliveryTimeLimit() + { + return isset($this->pickup_to_delivery_time_limit); + } + + public function clearPickupToDeliveryTimeLimit() + { + unset($this->pickup_to_delivery_time_limit); + } + + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPickupToDeliveryTimeLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->pickup_to_delivery_time_limit = $var; + + return $this; + } + + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + * @return string + */ + public function getShipmentType() + { + return $this->shipment_type; + } + + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + * @param string $var + * @return $this + */ + public function setShipmentType($var) + { + GPBUtil::checkString($var, True); + $this->shipment_type = $var; + + return $this; + } + + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + * @return bool + */ + public function getIgnore() + { + return $this->ignore; + } + + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + * @param bool $var + * @return $this + */ + public function setIgnore($var) + { + GPBUtil::checkBool($var); + $this->ignore = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php new file mode 100644 index 000000000000..dec1b28584e2 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php @@ -0,0 +1,81 @@ +google.maps.routeoptimization.v1.Shipment.Load + */ +class Load extends \Google\Protobuf\Internal\Message +{ + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + */ + protected $amount = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + * @return int|string + */ + public function getAmount() + { + return $this->amount; + } + + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Load::class, \Google\Maps\RouteOptimization\V1\Shipment_Load::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php new file mode 100644 index 000000000000..518eb8d4c60e --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php @@ -0,0 +1,615 @@ +google.maps.routeoptimization.v1.Shipment.VisitRequest + */ +class VisitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + */ + protected $arrival_location = null; + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; + */ + protected $arrival_waypoint = null; + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + */ + protected $departure_location = null; + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; + */ + protected $departure_waypoint = null; + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + */ + private $tags; + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; + */ + private $time_windows; + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + */ + protected $duration = null; + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + */ + protected $cost = 0.0; + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + */ + private $load_demands; + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + */ + private $visit_types; + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $arrival_location + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $arrival_waypoint + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * @type \Google\Type\LatLng $departure_location + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $departure_waypoint + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $time_windows + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * @type \Google\Protobuf\Duration $duration + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * @type float $cost + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * @type array|\Google\Protobuf\Internal\RepeatedField $visit_types + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * @type string $label + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + * @return \Google\Type\LatLng|null + */ + public function getArrivalLocation() + { + return $this->arrival_location; + } + + public function hasArrivalLocation() + { + return isset($this->arrival_location); + } + + public function clearArrivalLocation() + { + unset($this->arrival_location); + } + + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setArrivalLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->arrival_location = $var; + + return $this; + } + + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getArrivalWaypoint() + { + return $this->arrival_waypoint; + } + + public function hasArrivalWaypoint() + { + return isset($this->arrival_waypoint); + } + + public function clearArrivalWaypoint() + { + unset($this->arrival_waypoint); + } + + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setArrivalWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->arrival_waypoint = $var; + + return $this; + } + + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + * @return \Google\Type\LatLng|null + */ + public function getDepartureLocation() + { + return $this->departure_location; + } + + public function hasDepartureLocation() + { + return isset($this->departure_location); + } + + public function clearDepartureLocation() + { + unset($this->departure_location); + } + + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setDepartureLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->departure_location = $var; + + return $this; + } + + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getDepartureWaypoint() + { + return $this->departure_waypoint; + } + + public function hasDepartureWaypoint() + { + return isset($this->departure_waypoint); + } + + public function clearDepartureWaypoint() + { + unset($this->departure_waypoint); + } + + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setDepartureWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->departure_waypoint = $var; + + return $this; + } + + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimeWindows() + { + return $this->time_windows; + } + + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; + * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); + $this->time_windows = $arr; + + return $this; + } + + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + * @return float + */ + public function getCost() + { + return $this->cost; + } + + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkDouble($var); + $this->cost = $var; + + return $this; + } + + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisitTypes() + { + return $this->visit_types; + } + + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisitTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->visit_types = $arr; + + return $this; + } + + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VisitRequest::class, \Google\Maps\RouteOptimization\V1\Shipment_VisitRequest::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php new file mode 100644 index 000000000000..34ac5c5b5eb4 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php @@ -0,0 +1,1010 @@ +google.maps.routeoptimization.v1.ShipmentModel + */ +class ShipmentModel extends \Google\Protobuf\Internal\Message +{ + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; + */ + private $shipments; + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; + */ + private $vehicles; + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + */ + protected $max_active_vehicles = null; + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + */ + protected $global_start_time = null; + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + */ + protected $global_end_time = null; + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + */ + protected $global_duration_cost_per_hour = 0.0; + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + */ + private $duration_distance_matrices; + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + */ + private $duration_distance_matrix_src_tags; + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + */ + private $duration_distance_matrix_dst_tags; + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; + */ + private $transition_attributes; + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + */ + private $shipment_type_incompatibilities; + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + */ + private $shipment_type_requirements; + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + */ + private $precedence_rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $shipments + * Set of shipments which must be performed in the model. + * @type array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $vehicles + * Set of vehicles which can be used to perform visits. + * @type int $max_active_vehicles + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * @type \Google\Protobuf\Timestamp $global_start_time + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * @type \Google\Protobuf\Timestamp $global_end_time + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * @type float $global_duration_cost_per_hour + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrices + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_src_tags + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_dst_tags + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * @type array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $transition_attributes + * Transition attributes added to the model. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $shipment_type_incompatibilities + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $shipment_type_requirements + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $precedence_rules + * Set of precedence rules which must be enforced in the model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipments() + { + return $this->shipments; + } + + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; + * @param array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment::class); + $this->shipments = $arr; + + return $this; + } + + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVehicles() + { + return $this->vehicles; + } + + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; + * @param array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVehicles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle::class); + $this->vehicles = $arr; + + return $this; + } + + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + * @return int + */ + public function getMaxActiveVehicles() + { + return isset($this->max_active_vehicles) ? $this->max_active_vehicles : 0; + } + + public function hasMaxActiveVehicles() + { + return isset($this->max_active_vehicles); + } + + public function clearMaxActiveVehicles() + { + unset($this->max_active_vehicles); + } + + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + * @param int $var + * @return $this + */ + public function setMaxActiveVehicles($var) + { + GPBUtil::checkInt32($var); + $this->max_active_vehicles = $var; + + return $this; + } + + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGlobalStartTime() + { + return $this->global_start_time; + } + + public function hasGlobalStartTime() + { + return isset($this->global_start_time); + } + + public function clearGlobalStartTime() + { + unset($this->global_start_time); + } + + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGlobalStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->global_start_time = $var; + + return $this; + } + + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGlobalEndTime() + { + return $this->global_end_time; + } + + public function hasGlobalEndTime() + { + return isset($this->global_end_time); + } + + public function clearGlobalEndTime() + { + unset($this->global_end_time); + } + + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGlobalEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->global_end_time = $var; + + return $this; + } + + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + * @return float + */ + public function getGlobalDurationCostPerHour() + { + return $this->global_duration_cost_per_hour; + } + + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + * @param float $var + * @return $this + */ + public function setGlobalDurationCostPerHour($var) + { + GPBUtil::checkDouble($var); + $this->global_duration_cost_per_hour = $var; + + return $this; + } + + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrices() + { + return $this->duration_distance_matrices; + } + + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix::class); + $this->duration_distance_matrices = $arr; + + return $this; + } + + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrixSrcTags() + { + return $this->duration_distance_matrix_src_tags; + } + + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrixSrcTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->duration_distance_matrix_src_tags = $arr; + + return $this; + } + + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrixDstTags() + { + return $this->duration_distance_matrix_dst_tags; + } + + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrixDstTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->duration_distance_matrix_dst_tags = $arr; + + return $this; + } + + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionAttributes() + { + return $this->transition_attributes; + } + + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; + * @param array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TransitionAttributes::class); + $this->transition_attributes = $arr; + + return $this; + } + + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipmentTypeIncompatibilities() + { + return $this->shipment_type_incompatibilities; + } + + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipmentTypeIncompatibilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility::class); + $this->shipment_type_incompatibilities = $arr; + + return $this; + } + + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipmentTypeRequirements() + { + return $this->shipment_type_requirements; + } + + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipmentTypeRequirements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement::class); + $this->shipment_type_requirements = $arr; + + return $this; + } + + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrecedenceRules() + { + return $this->precedence_rules; + } + + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrecedenceRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule::class); + $this->precedence_rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php new file mode 100644 index 000000000000..5bc080ab9ce0 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php @@ -0,0 +1,137 @@ +google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix + */ +class DurationDistanceMatrix extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + */ + private $rows; + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + */ + protected $vehicle_start_tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $rows + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * @type string $vehicle_start_tag + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRows() + { + return $this->rows; + } + + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row::class); + $this->rows = $arr; + + return $this; + } + + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + * @return string + */ + public function getVehicleStartTag() + { + return $this->vehicle_start_tag; + } + + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + * @param string $var + * @return $this + */ + public function setVehicleStartTag($var) + { + GPBUtil::checkString($var, True); + $this->vehicle_start_tag = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DurationDistanceMatrix::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php new file mode 100644 index 000000000000..ade7fdceddc1 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php @@ -0,0 +1,116 @@ +google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row + */ +class Row extends \Google\Protobuf\Internal\Message +{ + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + */ + private $durations; + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + */ + private $meters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $durations + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * @type array|\Google\Protobuf\Internal\RepeatedField $meters + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurations() + { + return $this->durations; + } + + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->durations = $arr; + + return $this; + } + + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeters() + { + return $this->meters; + } + + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->meters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Row::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix_Row::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php new file mode 100644 index 000000000000..d83e3791b007 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php @@ -0,0 +1,243 @@ +google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule + */ +class PrecedenceRule extends \Google\Protobuf\Internal\Message +{ + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + */ + protected $first_index = null; + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + */ + protected $first_is_delivery = false; + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + */ + protected $second_index = null; + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + */ + protected $second_is_delivery = false; + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + */ + protected $offset_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $first_index + * Shipment index of the "first" event. This field must be specified. + * @type bool $first_is_delivery + * Indicates if the "first" event is a delivery. + * @type int $second_index + * Shipment index of the "second" event. This field must be specified. + * @type bool $second_is_delivery + * Indicates if the "second" event is a delivery. + * @type \Google\Protobuf\Duration $offset_duration + * The offset between the "first" and "second" event. It can be negative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + * @return int + */ + public function getFirstIndex() + { + return isset($this->first_index) ? $this->first_index : 0; + } + + public function hasFirstIndex() + { + return isset($this->first_index); + } + + public function clearFirstIndex() + { + unset($this->first_index); + } + + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + * @param int $var + * @return $this + */ + public function setFirstIndex($var) + { + GPBUtil::checkInt32($var); + $this->first_index = $var; + + return $this; + } + + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + * @return bool + */ + public function getFirstIsDelivery() + { + return $this->first_is_delivery; + } + + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + * @param bool $var + * @return $this + */ + public function setFirstIsDelivery($var) + { + GPBUtil::checkBool($var); + $this->first_is_delivery = $var; + + return $this; + } + + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + * @return int + */ + public function getSecondIndex() + { + return isset($this->second_index) ? $this->second_index : 0; + } + + public function hasSecondIndex() + { + return isset($this->second_index); + } + + public function clearSecondIndex() + { + unset($this->second_index); + } + + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + * @param int $var + * @return $this + */ + public function setSecondIndex($var) + { + GPBUtil::checkInt32($var); + $this->second_index = $var; + + return $this; + } + + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + * @return bool + */ + public function getSecondIsDelivery() + { + return $this->second_is_delivery; + } + + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + * @param bool $var + * @return $this + */ + public function setSecondIsDelivery($var) + { + GPBUtil::checkBool($var); + $this->second_is_delivery = $var; + + return $this; + } + + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getOffsetDuration() + { + return $this->offset_duration; + } + + public function hasOffsetDuration() + { + return isset($this->offset_duration); + } + + public function clearOffsetDuration() + { + unset($this->offset_duration); + } + + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setOffsetDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->offset_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrecedenceRule::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_PrecedenceRule::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php new file mode 100644 index 000000000000..3c191d29cca6 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php @@ -0,0 +1,706 @@ + + * | TRANSITION[i] | VISIT[i] | + * | | | + * | * TRAVEL: the vehicle moves from | PERFORM the visit: | + * | VISIT[i-1].departure_location to | | + * | VISIT[i].arrival_location, which | * Spend some time: | + * | takes a given travel duration | the "visit duration". | + * | and distance | | + * | | * Load or unload | + * | * BREAKS: the driver may have | some quantities from the | + * | breaks (e.g. lunch break). | vehicle: the "demand". | + * | | | + * | * WAIT: the driver/vehicle does | | + * | nothing. This can happen for | | + * | many reasons, for example when | | + * | the vehicle reaches the next | | + * | event's destination before the | | + * | start of its time window | | + * | | | + * | * DELAY: *right before* the next | | + * | arrival. E.g. the vehicle and/or | | + * | driver spends time unloading. | | + * | | | + * ---+-------------------------------------+-----------------------------+--> + * ^ ^ ^ + * V[i-1].end V[i].start V[i].end + * ``` + * Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged + * during a transition. + * * They don't overlap. + * * The DELAY is unique and *must* be a contiguous period of time right + * before the next visit (or vehicle end). Thus, it suffice to know the + * delay duration to know its start and end time. + * * The BREAKS are contiguous, non-overlapping periods of time. The + * response specifies the start time and duration of each break. + * * TRAVEL and WAIT are "preemptable": they can be interrupted several times + * during this transition. Clients can assume that travel happens "as soon as + * possible" and that "wait" fills the remaining time. + * A (complex) example: + * ``` + * TRANSITION[i] + * --++-----+-----------------------------------------------------------++--> + * || | | | | | | || + * || T | B | T | | B | | D || + * || r | r | r | W | r | W | e || + * || a | e | a | a | e | a | l || + * || v | a | v | i | a | i | a || + * || e | k | e | t | k | t | y || + * || l | | l | | | | || + * || | | | | | | || + * --++-----------------------------------------------------------------++--> + * ``` + * + * Generated from protobuf message google.maps.routeoptimization.v1.ShipmentRoute + */ +class ShipmentRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + */ + protected $vehicle_index = 0; + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + */ + protected $vehicle_label = ''; + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + */ + protected $vehicle_start_time = null; + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + */ + protected $vehicle_end_time = null; + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; + */ + private $visits; + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; + */ + private $transitions; + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + */ + protected $has_traffic_infeasibilities = false; + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + */ + protected $route_polyline = null; + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; + */ + private $breaks; + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; + */ + protected $metrics = null; + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + */ + private $route_costs; + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + */ + protected $route_total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $vehicle_index + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * @type string $vehicle_label + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * @type \Google\Protobuf\Timestamp $vehicle_start_time + * Time at which the vehicle starts its route. + * @type \Google\Protobuf\Timestamp $vehicle_end_time + * Time at which the vehicle finishes its route. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $visits + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions + * Ordered list of transitions for the route. + * @type bool $has_traffic_infeasibilities + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $breaks + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $metrics + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * @type array|\Google\Protobuf\Internal\MapField $route_costs + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * @type float $route_total_cost + * Total cost of the route. The sum of all costs in the cost map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + * @return int + */ + public function getVehicleIndex() + { + return $this->vehicle_index; + } + + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + * @param int $var + * @return $this + */ + public function setVehicleIndex($var) + { + GPBUtil::checkInt32($var); + $this->vehicle_index = $var; + + return $this; + } + + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + * @return string + */ + public function getVehicleLabel() + { + return $this->vehicle_label; + } + + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + * @param string $var + * @return $this + */ + public function setVehicleLabel($var) + { + GPBUtil::checkString($var, True); + $this->vehicle_label = $var; + + return $this; + } + + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVehicleStartTime() + { + return $this->vehicle_start_time; + } + + public function hasVehicleStartTime() + { + return isset($this->vehicle_start_time); + } + + public function clearVehicleStartTime() + { + unset($this->vehicle_start_time); + } + + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVehicleStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->vehicle_start_time = $var; + + return $this; + } + + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVehicleEndTime() + { + return $this->vehicle_end_time; + } + + public function hasVehicleEndTime() + { + return isset($this->vehicle_end_time); + } + + public function clearVehicleEndTime() + { + unset($this->vehicle_end_time); + } + + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVehicleEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->vehicle_end_time = $var; + + return $this; + } + + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisits() + { + return $this->visits; + } + + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit::class); + $this->visits = $arr; + + return $this; + } + + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitions() + { + return $this->transitions; + } + + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition::class); + $this->transitions = $arr; + + return $this; + } + + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + * @return bool + */ + public function getHasTrafficInfeasibilities() + { + return $this->has_traffic_infeasibilities; + } + + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + * @param bool $var + * @return $this + */ + public function setHasTrafficInfeasibilities($var) + { + GPBUtil::checkBool($var); + $this->has_traffic_infeasibilities = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreaks() + { + return $this->breaks; + } + + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak::class); + $this->breaks = $arr; + + return $this; + } + + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; + * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; + * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getRouteCosts() + { + return $this->route_costs; + } + + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setRouteCosts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->route_costs = $arr; + + return $this; + } + + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + * @return float + */ + public function getRouteTotalCost() + { + return $this->route_total_cost; + } + + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + * @param float $var + * @return $this + */ + public function setRouteTotalCost($var) + { + GPBUtil::checkDouble($var); + $this->route_total_cost = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php new file mode 100644 index 000000000000..a3aecf3c5212 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php @@ -0,0 +1,73 @@ +google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline + */ +class EncodedPolyline extends \Google\Protobuf\Internal\Message +{ + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + */ + protected $points = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $points + * String representing encoded points of the polyline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + * @return string + */ + public function getPoints() + { + return $this->points; + } + + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + * @param string $var + * @return $this + */ + public function setPoints($var) + { + GPBUtil::checkString($var, True); + $this->points = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncodedPolyline::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_EncodedPolyline::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php new file mode 100644 index 000000000000..e05a14f991b9 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php @@ -0,0 +1,124 @@ +google.maps.routeoptimization.v1.ShipmentRoute.Break + */ +class PBBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Start time of a break. + * @type \Google\Protobuf\Duration $duration + * Duration of a break. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBBreak::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Break::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php new file mode 100644 index 000000000000..e2c4c53592bf --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php @@ -0,0 +1,639 @@ +google.maps.routeoptimization.v1.ShipmentRoute.Transition + */ +class Transition extends \Google\Protobuf\Internal\Message +{ + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + */ + protected $travel_duration = null; + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + */ + protected $travel_distance_meters = 0.0; + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + */ + protected $traffic_info_unavailable = false; + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + */ + protected $delay_duration = null; + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + */ + protected $break_duration = null; + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + */ + protected $wait_duration = null; + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + */ + protected $total_duration = null; + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + */ + protected $start_time = null; + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + */ + protected $route_polyline = null; + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $route_token = ''; + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + */ + private $vehicle_loads; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $travel_duration + * Travel duration during this transition. + * @type float $travel_distance_meters + * Distance traveled during the transition. + * @type bool $traffic_info_unavailable + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * @type \Google\Protobuf\Duration $delay_duration + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * @type \Google\Protobuf\Duration $break_duration + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * @type \Google\Protobuf\Duration $wait_duration + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * @type \Google\Protobuf\Duration $total_duration + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of this transition. + * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * @type string $route_token + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + * @return float + */ + public function getTravelDistanceMeters() + { + return $this->travel_distance_meters; + } + + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + * @param float $var + * @return $this + */ + public function setTravelDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->travel_distance_meters = $var; + + return $this; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @return bool + */ + public function getTrafficInfoUnavailable() + { + return $this->traffic_info_unavailable; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @param bool $var + * @return $this + */ + public function setTrafficInfoUnavailable($var) + { + GPBUtil::checkBool($var); + $this->traffic_info_unavailable = $var; + + return $this; + } + + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDelayDuration() + { + return $this->delay_duration; + } + + public function hasDelayDuration() + { + return isset($this->delay_duration); + } + + public function clearDelayDuration() + { + unset($this->delay_duration); + } + + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelayDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay_duration = $var; + + return $this; + } + + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getBreakDuration() + { + return $this->break_duration; + } + + public function hasBreakDuration() + { + return isset($this->break_duration); + } + + public function clearBreakDuration() + { + unset($this->break_duration); + } + + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->break_duration = $var; + + return $this; + } + + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRouteToken() + { + return $this->route_token; + } + + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRouteToken($var) + { + GPBUtil::checkString($var, True); + $this->route_token = $var; + + return $this; + } + + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVehicleLoads() + { + return $this->vehicle_loads; + } + + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVehicleLoads($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); + $this->vehicle_loads = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Transition::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Transition::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php new file mode 100644 index 000000000000..cb8378f1af45 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php @@ -0,0 +1,80 @@ +google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad + */ +class VehicleLoad extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + */ + protected $amount = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + * @return int|string + */ + public function getAmount() + { + return $this->amount; + } + + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VehicleLoad::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_VehicleLoad::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php new file mode 100644 index 000000000000..a863ea8092cb --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php @@ -0,0 +1,433 @@ +google.maps.routeoptimization.v1.ShipmentRoute.Visit + */ +class Visit extends \Google\Protobuf\Internal\Message +{ + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + */ + protected $shipment_index = 0; + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + */ + protected $is_pickup = false; + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + */ + protected $visit_request_index = 0; + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + */ + private $load_demands; + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + */ + protected $detour = null; + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + */ + protected $shipment_label = ''; + /** + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + */ + protected $visit_label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $shipment_index + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * @type bool $is_pickup + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * @type int $visit_request_index + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * @type \Google\Protobuf\Timestamp $start_time + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * @type \Google\Protobuf\Duration $detour + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * @type string $shipment_label + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * @type string $visit_label + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + * @return int + */ + public function getShipmentIndex() + { + return $this->shipment_index; + } + + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + * @param int $var + * @return $this + */ + public function setShipmentIndex($var) + { + GPBUtil::checkInt32($var); + $this->shipment_index = $var; + + return $this; + } + + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + * @return bool + */ + public function getIsPickup() + { + return $this->is_pickup; + } + + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + * @param bool $var + * @return $this + */ + public function setIsPickup($var) + { + GPBUtil::checkBool($var); + $this->is_pickup = $var; + + return $this; + } + + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + * @return int + */ + public function getVisitRequestIndex() + { + return $this->visit_request_index; + } + + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + * @param int $var + * @return $this + */ + public function setVisitRequestIndex($var) + { + GPBUtil::checkInt32($var); + $this->visit_request_index = $var; + + return $this; + } + + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDetour() + { + return $this->detour; + } + + public function hasDetour() + { + return isset($this->detour); + } + + public function clearDetour() + { + unset($this->detour); + } + + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDetour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->detour = $var; + + return $this; + } + + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + * @return string + */ + public function getShipmentLabel() + { + return $this->shipment_label; + } + + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + * @param string $var + * @return $this + */ + public function setShipmentLabel($var) + { + GPBUtil::checkString($var, True); + $this->shipment_label = $var; + + return $this; + } + + /** + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + * @return string + */ + public function getVisitLabel() + { + return $this->visit_label; + } + + /** + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + * @param string $var + * @return $this + */ + public function setVisitLabel($var) + { + GPBUtil::checkString($var, True); + $this->visit_label = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Visit::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Visit::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php new file mode 100644 index 000000000000..17d80f6ccd1d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php @@ -0,0 +1,107 @@ +google.maps.routeoptimization.v1.ShipmentTypeIncompatibility + */ +class ShipmentTypeIncompatibility extends \Google\Protobuf\Internal\Message +{ + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + */ + private $types; + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + */ + protected $incompatibility_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $types + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * @type int $incompatibility_mode + * Mode applied to the incompatibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTypes() + { + return $this->types; + } + + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->types = $arr; + + return $this; + } + + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + * @return int + */ + public function getIncompatibilityMode() + { + return $this->incompatibility_mode; + } + + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + * @param int $var + * @return $this + */ + public function setIncompatibilityMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility\IncompatibilityMode::class); + $this->incompatibility_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php new file mode 100644 index 000000000000..1b34c50ca5fa --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php @@ -0,0 +1,72 @@ +google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode + */ +class IncompatibilityMode +{ + /** + * Unspecified incompatibility mode. This value should never be used. + * + * Generated from protobuf enum INCOMPATIBILITY_MODE_UNSPECIFIED = 0; + */ + const INCOMPATIBILITY_MODE_UNSPECIFIED = 0; + /** + * In this mode, two shipments with incompatible types can never share the + * same vehicle. + * + * Generated from protobuf enum NOT_PERFORMED_BY_SAME_VEHICLE = 1; + */ + const NOT_PERFORMED_BY_SAME_VEHICLE = 1; + /** + * For two shipments with incompatible types with the + * `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode: + * * If both are pickups only (no deliveries) or deliveries only (no + * pickups), they cannot share the same vehicle at all. + * * If one of the shipments has a delivery and the other a pickup, the two + * shipments can share the same vehicle iff the former shipment is + * delivered before the latter is picked up. + * + * Generated from protobuf enum NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; + */ + const NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; + + private static $valueToName = [ + self::INCOMPATIBILITY_MODE_UNSPECIFIED => 'INCOMPATIBILITY_MODE_UNSPECIFIED', + self::NOT_PERFORMED_BY_SAME_VEHICLE => 'NOT_PERFORMED_BY_SAME_VEHICLE', + self::NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY => 'NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IncompatibilityMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility_IncompatibilityMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php new file mode 100644 index 000000000000..c7d8d7f847b7 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php @@ -0,0 +1,156 @@ +google.maps.routeoptimization.v1.ShipmentTypeRequirement + */ +class ShipmentTypeRequirement extends \Google\Protobuf\Internal\Message +{ + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + */ + private $required_shipment_type_alternatives; + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + */ + private $dependent_shipment_types; + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + */ + protected $requirement_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $required_shipment_type_alternatives + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * @type array|\Google\Protobuf\Internal\RepeatedField $dependent_shipment_types + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * @type int $requirement_mode + * Mode applied to the requirement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequiredShipmentTypeAlternatives() + { + return $this->required_shipment_type_alternatives; + } + + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequiredShipmentTypeAlternatives($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->required_shipment_type_alternatives = $arr; + + return $this; + } + + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDependentShipmentTypes() + { + return $this->dependent_shipment_types; + } + + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDependentShipmentTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->dependent_shipment_types = $arr; + + return $this; + } + + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + * @return int + */ + public function getRequirementMode() + { + return $this->requirement_mode; + } + + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + * @param int $var + * @return $this + */ + public function setRequirementMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement\RequirementMode::class); + $this->requirement_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php new file mode 100644 index 000000000000..b25581fc1f06 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php @@ -0,0 +1,80 @@ +google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode + */ +class RequirementMode +{ + /** + * Unspecified requirement mode. This value should never be used. + * + * Generated from protobuf enum REQUIREMENT_MODE_UNSPECIFIED = 0; + */ + const REQUIREMENT_MODE_UNSPECIFIED = 0; + /** + * In this mode, all "dependent" shipments must share the same vehicle as at + * least one of their "required" shipments. + * + * Generated from protobuf enum PERFORMED_BY_SAME_VEHICLE = 1; + */ + const PERFORMED_BY_SAME_VEHICLE = 1; + /** + * With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent" + * shipments need to have at least one "required" shipment on their vehicle + * at the time of their pickup. + * A "dependent" shipment pickup must therefore have either: + * * A delivery-only "required" shipment delivered on the route after, or + * * A "required" shipment picked up on the route before it, and if the + * "required" shipment has a delivery, this delivery must be performed + * after the "dependent" shipment's pickup. + * + * Generated from protobuf enum IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; + */ + const IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; + /** + * Same as before, except the "dependent" shipments need to have a + * "required" shipment on their vehicle at the time of their *delivery*. + * + * Generated from protobuf enum IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; + */ + const IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; + + private static $valueToName = [ + self::REQUIREMENT_MODE_UNSPECIFIED => 'REQUIREMENT_MODE_UNSPECIFIED', + self::PERFORMED_BY_SAME_VEHICLE => 'PERFORMED_BY_SAME_VEHICLE', + self::IN_SAME_VEHICLE_AT_PICKUP_TIME => 'IN_SAME_VEHICLE_AT_PICKUP_TIME', + self::IN_SAME_VEHICLE_AT_DELIVERY_TIME => 'IN_SAME_VEHICLE_AT_DELIVERY_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequirementMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement_RequirementMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php new file mode 100644 index 000000000000..451c769e8d2a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php @@ -0,0 +1,157 @@ +google.maps.routeoptimization.v1.SkippedShipment + */ +class SkippedShipment extends \Google\Protobuf\Internal\Message +{ + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; + */ + private $reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * @type string $label + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $reasons + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; + * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason::class); + $this->reasons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php new file mode 100644 index 000000000000..b764ddfda63a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php @@ -0,0 +1,181 @@ +google.maps.routeoptimization.v1.SkippedShipment.Reason + */ +class Reason extends \Google\Protobuf\Internal\Message +{ + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; + */ + protected $code = 0; + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + */ + protected $example_vehicle_index = null; + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + */ + protected $example_exceeded_capacity_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Refer to the comments of Code. + * @type int $example_vehicle_index + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * @type string $example_exceeded_capacity_type + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason\Code::class); + $this->code = $var; + + return $this; + } + + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + * @return int + */ + public function getExampleVehicleIndex() + { + return isset($this->example_vehicle_index) ? $this->example_vehicle_index : 0; + } + + public function hasExampleVehicleIndex() + { + return isset($this->example_vehicle_index); + } + + public function clearExampleVehicleIndex() + { + unset($this->example_vehicle_index); + } + + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + * @param int $var + * @return $this + */ + public function setExampleVehicleIndex($var) + { + GPBUtil::checkInt32($var); + $this->example_vehicle_index = $var; + + return $this; + } + + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + * @return string + */ + public function getExampleExceededCapacityType() + { + return $this->example_exceeded_capacity_type; + } + + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + * @param string $var + * @return $this + */ + public function setExampleExceededCapacityType($var) + { + GPBUtil::checkString($var, True); + $this->example_exceeded_capacity_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reason::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php new file mode 100644 index 000000000000..28c5af490f6b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php @@ -0,0 +1,115 @@ +google.maps.routeoptimization.v1.SkippedShipment.Reason.Code + */ +class Code +{ + /** + * This should never be used. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * There is no vehicle in the model making all shipments infeasible. + * + * Generated from protobuf enum NO_VEHICLE = 1; + */ + const NO_VEHICLE = 1; + /** + * The demand of the shipment exceeds a vehicle's capacity for some + * capacity types, one of which is `example_exceeded_capacity_type`. + * + * Generated from protobuf enum DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; + */ + const DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; + /** + * The minimum distance necessary to perform this shipment, i.e. from + * the vehicle's `start_location` to the shipment's pickup and/or delivery + * locations and to the vehicle's end location exceeds the vehicle's + * `route_distance_limit`. + * Note that for this computation we use the geodesic distances. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; + /** + * The minimum time necessary to perform this shipment, including travel + * time, wait time and service time exceeds the vehicle's + * `route_duration_limit`. + * Note: travel time is computed in the best-case scenario, namely as + * geodesic distance x 36 m/s (roughly 130 km/hour). + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; + /** + * Same as above but we only compare minimum travel time and the + * vehicle's `travel_duration_limit`. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; + /** + * The vehicle cannot perform this shipment in the best-case scenario + * (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time + * computation) if it starts at its earliest start time: the total time + * would make the vehicle end after its latest end time. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; + /** + * The `allowed_vehicle_indices` field of the shipment is not empty and + * this vehicle does not belong to it. + * + * Generated from protobuf enum VEHICLE_NOT_ALLOWED = 7; + */ + const VEHICLE_NOT_ALLOWED = 7; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::NO_VEHICLE => 'NO_VEHICLE', + self::DEMAND_EXCEEDS_VEHICLE_CAPACITY => 'DEMAND_EXCEEDS_VEHICLE_CAPACITY', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS', + self::VEHICLE_NOT_ALLOWED => 'VEHICLE_NOT_ALLOWED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason_Code::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php new file mode 100644 index 000000000000..380dd0376f8d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php @@ -0,0 +1,389 @@ +google.maps.routeoptimization.v1.TimeWindow + */ +class TimeWindow extends \Google\Protobuf\Internal\Message +{ + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + */ + protected $soft_start_time = null; + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + */ + protected $soft_end_time = null; + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + */ + protected $cost_per_hour_before_soft_start_time = null; + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + */ + protected $cost_per_hour_after_soft_end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * @type \Google\Protobuf\Timestamp $end_time + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * @type \Google\Protobuf\Timestamp $soft_start_time + * The soft start time of the time window. + * @type \Google\Protobuf\Timestamp $soft_end_time + * The soft end time of the time window. + * @type float $cost_per_hour_before_soft_start_time + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * @type float $cost_per_hour_after_soft_end_time + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftStartTime() + { + return $this->soft_start_time; + } + + public function hasSoftStartTime() + { + return isset($this->soft_start_time); + } + + public function clearSoftStartTime() + { + unset($this->soft_start_time); + } + + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_start_time = $var; + + return $this; + } + + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftEndTime() + { + return $this->soft_end_time; + } + + public function hasSoftEndTime() + { + return isset($this->soft_end_time); + } + + public function clearSoftEndTime() + { + unset($this->soft_end_time); + } + + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_end_time = $var; + + return $this; + } + + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + * @return float + */ + public function getCostPerHourBeforeSoftStartTime() + { + return isset($this->cost_per_hour_before_soft_start_time) ? $this->cost_per_hour_before_soft_start_time : 0.0; + } + + public function hasCostPerHourBeforeSoftStartTime() + { + return isset($this->cost_per_hour_before_soft_start_time); + } + + public function clearCostPerHourBeforeSoftStartTime() + { + unset($this->cost_per_hour_before_soft_start_time); + } + + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + * @param float $var + * @return $this + */ + public function setCostPerHourBeforeSoftStartTime($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_before_soft_start_time = $var; + + return $this; + } + + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + * @return float + */ + public function getCostPerHourAfterSoftEndTime() + { + return isset($this->cost_per_hour_after_soft_end_time) ? $this->cost_per_hour_after_soft_end_time : 0.0; + } + + public function hasCostPerHourAfterSoftEndTime() + { + return isset($this->cost_per_hour_after_soft_end_time); + } + + public function clearCostPerHourAfterSoftEndTime() + { + unset($this->cost_per_hour_after_soft_end_time); + } + + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + * @param float $var + * @return $this + */ + public function setCostPerHourAfterSoftEndTime($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_after_soft_end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php new file mode 100644 index 000000000000..6201a4c661d7 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php @@ -0,0 +1,412 @@ +google.maps.routeoptimization.v1.TransitionAttributes + */ +class TransitionAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + */ + protected $src_tag = ''; + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + */ + protected $excluded_src_tag = ''; + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + */ + protected $dst_tag = ''; + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + */ + protected $excluded_dst_tag = ''; + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + */ + protected $cost = 0.0; + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + */ + protected $cost_per_kilometer = 0.0; + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; + */ + protected $distance_limit = null; + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + */ + protected $delay = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $src_tag + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * @type string $excluded_src_tag + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * @type string $dst_tag + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * @type string $excluded_dst_tag + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * @type float $cost + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * @type float $cost_per_kilometer + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $distance_limit + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * @type \Google\Protobuf\Duration $delay + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + * @return string + */ + public function getSrcTag() + { + return $this->src_tag; + } + + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + * @param string $var + * @return $this + */ + public function setSrcTag($var) + { + GPBUtil::checkString($var, True); + $this->src_tag = $var; + + return $this; + } + + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + * @return string + */ + public function getExcludedSrcTag() + { + return $this->excluded_src_tag; + } + + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + * @param string $var + * @return $this + */ + public function setExcludedSrcTag($var) + { + GPBUtil::checkString($var, True); + $this->excluded_src_tag = $var; + + return $this; + } + + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + * @return string + */ + public function getDstTag() + { + return $this->dst_tag; + } + + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + * @param string $var + * @return $this + */ + public function setDstTag($var) + { + GPBUtil::checkString($var, True); + $this->dst_tag = $var; + + return $this; + } + + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + * @return string + */ + public function getExcludedDstTag() + { + return $this->excluded_dst_tag; + } + + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + * @param string $var + * @return $this + */ + public function setExcludedDstTag($var) + { + GPBUtil::checkString($var, True); + $this->excluded_dst_tag = $var; + + return $this; + } + + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + * @return float + */ + public function getCost() + { + return $this->cost; + } + + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkDouble($var); + $this->cost = $var; + + return $this; + } + + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + * @return float + */ + public function getCostPerKilometer() + { + return $this->cost_per_kilometer; + } + + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + * @param float $var + * @return $this + */ + public function setCostPerKilometer($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer = $var; + + return $this; + } + + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; + * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null + */ + public function getDistanceLimit() + { + return $this->distance_limit; + } + + public function hasDistanceLimit() + { + return isset($this->distance_limit); + } + + public function clearDistanceLimit() + { + unset($this->distance_limit); + } + + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; + * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var + * @return $this + */ + public function setDistanceLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); + $this->distance_limit = $var; + + return $this; + } + + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getDelay() + { + return $this->delay; + } + + public function hasDelay() + { + return isset($this->delay); + } + + public function clearDelay() + { + unset($this->delay); + } + + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php new file mode 100644 index 000000000000..c77ff7c216ae --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php @@ -0,0 +1,1423 @@ +google.maps.routeoptimization.v1.Vehicle + */ +class Vehicle extends \Google\Protobuf\Internal\Message +{ + /** + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 32; + */ + protected $display_name = ''; + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; + */ + protected $travel_mode = 0; + /** + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; + */ + protected $route_modifiers = null; + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + */ + protected $start_location = null; + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; + */ + protected $start_waypoint = null; + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + */ + protected $end_location = null; + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; + */ + protected $end_waypoint = null; + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + */ + private $start_tags; + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + */ + private $end_tags; + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; + */ + private $start_time_windows; + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; + */ + private $end_time_windows; + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + */ + protected $travel_duration_multiple = null; + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + */ + protected $unloading_policy = 0; + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + */ + private $load_limits; + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + */ + protected $cost_per_hour = 0.0; + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + */ + protected $cost_per_traveled_hour = 0.0; + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + */ + protected $cost_per_kilometer = 0.0; + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + */ + protected $fixed_cost = 0.0; + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + */ + protected $used_if_route_is_empty = false; + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + */ + protected $route_duration_limit = null; + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + */ + protected $travel_duration_limit = null; + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; + */ + protected $route_distance_limit = null; + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + */ + private $extra_visit_duration_for_visit_type; + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; + */ + protected $break_rule = null; + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + */ + protected $label = ''; + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + */ + protected $ignore = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * @type int $travel_mode + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * @type \Google\Maps\RouteOptimization\V1\RouteModifiers $route_modifiers + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * @type \Google\Type\LatLng $start_location + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $start_waypoint + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * @type \Google\Type\LatLng $end_location + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $end_waypoint + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $start_tags + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * @type array|\Google\Protobuf\Internal\RepeatedField $end_tags + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $start_time_windows + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $end_time_windows + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * @type float $travel_duration_multiple + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * @type int $unloading_policy + * Unloading policy enforced on the vehicle. + * @type array|\Google\Protobuf\Internal\MapField $load_limits + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * @type float $cost_per_hour + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * @type float $cost_per_traveled_hour + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * @type float $cost_per_kilometer + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * @type float $fixed_cost + * Fixed cost applied if this vehicle is used to handle a shipment. + * @type bool $used_if_route_is_empty + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $route_duration_limit + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $travel_duration_limit + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $route_distance_limit + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * @type array|\Google\Protobuf\Internal\MapField $extra_visit_duration_for_visit_type + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * @type \Google\Maps\RouteOptimization\V1\BreakRule $break_rule + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * @type string $label + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * @type bool $ignore + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 32; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 32; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; + * @return int + */ + public function getTravelMode() + { + return $this->travel_mode; + } + + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; + * @param int $var + * @return $this + */ + public function setTravelMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\TravelMode::class); + $this->travel_mode = $var; + + return $this; + } + + /** + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; + * @return \Google\Maps\RouteOptimization\V1\RouteModifiers|null + */ + public function getRouteModifiers() + { + return $this->route_modifiers; + } + + public function hasRouteModifiers() + { + return isset($this->route_modifiers); + } + + public function clearRouteModifiers() + { + unset($this->route_modifiers); + } + + /** + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; + * @param \Google\Maps\RouteOptimization\V1\RouteModifiers $var + * @return $this + */ + public function setRouteModifiers($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\RouteModifiers::class); + $this->route_modifiers = $var; + + return $this; + } + + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + * @return \Google\Type\LatLng|null + */ + public function getStartLocation() + { + return $this->start_location; + } + + public function hasStartLocation() + { + return isset($this->start_location); + } + + public function clearStartLocation() + { + unset($this->start_location); + } + + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setStartLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->start_location = $var; + + return $this; + } + + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getStartWaypoint() + { + return $this->start_waypoint; + } + + public function hasStartWaypoint() + { + return isset($this->start_waypoint); + } + + public function clearStartWaypoint() + { + unset($this->start_waypoint); + } + + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setStartWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->start_waypoint = $var; + + return $this; + } + + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + * @return \Google\Type\LatLng|null + */ + public function getEndLocation() + { + return $this->end_location; + } + + public function hasEndLocation() + { + return isset($this->end_location); + } + + public function clearEndLocation() + { + unset($this->end_location); + } + + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setEndLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->end_location = $var; + + return $this; + } + + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getEndWaypoint() + { + return $this->end_waypoint; + } + + public function hasEndWaypoint() + { + return isset($this->end_waypoint); + } + + public function clearEndWaypoint() + { + unset($this->end_waypoint); + } + + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setEndWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->end_waypoint = $var; + + return $this; + } + + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTags() + { + return $this->start_tags; + } + + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->start_tags = $arr; + + return $this; + } + + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndTags() + { + return $this->end_tags; + } + + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->end_tags = $arr; + + return $this; + } + + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTimeWindows() + { + return $this->start_time_windows; + } + + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; + * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); + $this->start_time_windows = $arr; + + return $this; + } + + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndTimeWindows() + { + return $this->end_time_windows; + } + + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; + * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); + $this->end_time_windows = $arr; + + return $this; + } + + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + * @return float + */ + public function getTravelDurationMultiple() + { + return isset($this->travel_duration_multiple) ? $this->travel_duration_multiple : 0.0; + } + + public function hasTravelDurationMultiple() + { + return isset($this->travel_duration_multiple); + } + + public function clearTravelDurationMultiple() + { + unset($this->travel_duration_multiple); + } + + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + * @param float $var + * @return $this + */ + public function setTravelDurationMultiple($var) + { + GPBUtil::checkDouble($var); + $this->travel_duration_multiple = $var; + + return $this; + } + + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + * @return int + */ + public function getUnloadingPolicy() + { + return $this->unloading_policy; + } + + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + * @param int $var + * @return $this + */ + public function setUnloadingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\UnloadingPolicy::class); + $this->unloading_policy = $var; + + return $this; + } + + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadLimits() + { + return $this->load_limits; + } + + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadLimits($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit::class); + $this->load_limits = $arr; + + return $this; + } + + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + * @return float + */ + public function getCostPerHour() + { + return $this->cost_per_hour; + } + + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + * @param float $var + * @return $this + */ + public function setCostPerHour($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour = $var; + + return $this; + } + + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + * @return float + */ + public function getCostPerTraveledHour() + { + return $this->cost_per_traveled_hour; + } + + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + * @param float $var + * @return $this + */ + public function setCostPerTraveledHour($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_traveled_hour = $var; + + return $this; + } + + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + * @return float + */ + public function getCostPerKilometer() + { + return $this->cost_per_kilometer; + } + + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + * @param float $var + * @return $this + */ + public function setCostPerKilometer($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer = $var; + + return $this; + } + + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + * @return float + */ + public function getFixedCost() + { + return $this->fixed_cost; + } + + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + * @param float $var + * @return $this + */ + public function setFixedCost($var) + { + GPBUtil::checkDouble($var); + $this->fixed_cost = $var; + + return $this; + } + + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + * @return bool + */ + public function getUsedIfRouteIsEmpty() + { + return $this->used_if_route_is_empty; + } + + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + * @param bool $var + * @return $this + */ + public function setUsedIfRouteIsEmpty($var) + { + GPBUtil::checkBool($var); + $this->used_if_route_is_empty = $var; + + return $this; + } + + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null + */ + public function getRouteDurationLimit() + { + return $this->route_duration_limit; + } + + public function hasRouteDurationLimit() + { + return isset($this->route_duration_limit); + } + + public function clearRouteDurationLimit() + { + unset($this->route_duration_limit); + } + + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var + * @return $this + */ + public function setRouteDurationLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); + $this->route_duration_limit = $var; + + return $this; + } + + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null + */ + public function getTravelDurationLimit() + { + return $this->travel_duration_limit; + } + + public function hasTravelDurationLimit() + { + return isset($this->travel_duration_limit); + } + + public function clearTravelDurationLimit() + { + unset($this->travel_duration_limit); + } + + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var + * @return $this + */ + public function setTravelDurationLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); + $this->travel_duration_limit = $var; + + return $this; + } + + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; + * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null + */ + public function getRouteDistanceLimit() + { + return $this->route_distance_limit; + } + + public function hasRouteDistanceLimit() + { + return isset($this->route_distance_limit); + } + + public function clearRouteDistanceLimit() + { + unset($this->route_distance_limit); + } + + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; + * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var + * @return $this + */ + public function setRouteDistanceLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); + $this->route_distance_limit = $var; + + return $this; + } + + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + * @return \Google\Protobuf\Internal\MapField + */ + public function getExtraVisitDurationForVisitType() + { + return $this->extra_visit_duration_for_visit_type; + } + + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setExtraVisitDurationForVisitType($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->extra_visit_duration_for_visit_type = $arr; + + return $this; + } + + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; + * @return \Google\Maps\RouteOptimization\V1\BreakRule|null + */ + public function getBreakRule() + { + return $this->break_rule; + } + + public function hasBreakRule() + { + return isset($this->break_rule); + } + + public function clearBreakRule() + { + unset($this->break_rule); + } + + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; + * @param \Google\Maps\RouteOptimization\V1\BreakRule $var + * @return $this + */ + public function setBreakRule($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\BreakRule::class); + $this->break_rule = $var; + + return $this; + } + + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + * @return bool + */ + public function getIgnore() + { + return $this->ignore; + } + + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + * @param bool $var + * @return $this + */ + public function setIgnore($var) + { + GPBUtil::checkBool($var); + $this->ignore = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php new file mode 100644 index 000000000000..75db61656a5f --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php @@ -0,0 +1,359 @@ +google.maps.routeoptimization.v1.Vehicle.DurationLimit + */ +class DurationLimit extends \Google\Protobuf\Internal\Message +{ + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + */ + protected $max_duration = null; + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + */ + protected $soft_max_duration = null; + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + */ + protected $cost_per_hour_after_soft_max = null; + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + */ + protected $quadratic_soft_max_duration = null; + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + */ + protected $cost_per_square_hour_after_quadratic_soft_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $max_duration + * A hard limit constraining the duration to be at most max_duration. + * @type \Google\Protobuf\Duration $soft_max_duration + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * @type float $cost_per_hour_after_soft_max + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * @type \Google\Protobuf\Duration $quadratic_soft_max_duration + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * @type float $cost_per_square_hour_after_quadratic_soft_max + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxDuration() + { + return $this->max_duration; + } + + public function hasMaxDuration() + { + return isset($this->max_duration); + } + + public function clearMaxDuration() + { + unset($this->max_duration); + } + + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_duration = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getSoftMaxDuration() + { + return $this->soft_max_duration; + } + + public function hasSoftMaxDuration() + { + return isset($this->soft_max_duration); + } + + public function clearSoftMaxDuration() + { + unset($this->soft_max_duration); + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSoftMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->soft_max_duration = $var; + + return $this; + } + + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + * @return float + */ + public function getCostPerHourAfterSoftMax() + { + return isset($this->cost_per_hour_after_soft_max) ? $this->cost_per_hour_after_soft_max : 0.0; + } + + public function hasCostPerHourAfterSoftMax() + { + return isset($this->cost_per_hour_after_soft_max); + } + + public function clearCostPerHourAfterSoftMax() + { + unset($this->cost_per_hour_after_soft_max); + } + + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerHourAfterSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_after_soft_max = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getQuadraticSoftMaxDuration() + { + return $this->quadratic_soft_max_duration; + } + + public function hasQuadraticSoftMaxDuration() + { + return isset($this->quadratic_soft_max_duration); + } + + public function clearQuadraticSoftMaxDuration() + { + unset($this->quadratic_soft_max_duration); + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setQuadraticSoftMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->quadratic_soft_max_duration = $var; + + return $this; + } + + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + * @return float + */ + public function getCostPerSquareHourAfterQuadraticSoftMax() + { + return isset($this->cost_per_square_hour_after_quadratic_soft_max) ? $this->cost_per_square_hour_after_quadratic_soft_max : 0.0; + } + + public function hasCostPerSquareHourAfterQuadraticSoftMax() + { + return isset($this->cost_per_square_hour_after_quadratic_soft_max); + } + + public function clearCostPerSquareHourAfterQuadraticSoftMax() + { + unset($this->cost_per_square_hour_after_quadratic_soft_max); + } + + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + * @param float $var + * @return $this + */ + public function setCostPerSquareHourAfterQuadraticSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_square_hour_after_quadratic_soft_max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DurationLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_DurationLimit::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php new file mode 100644 index 000000000000..076beefb96f4 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php @@ -0,0 +1,270 @@ +google.maps.routeoptimization.v1.Vehicle.LoadLimit + */ +class LoadLimit extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + */ + protected $max_load = null; + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + */ + protected $soft_max_load = 0; + /** + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + */ + protected $cost_per_unit_above_soft_max = 0.0; + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + */ + protected $start_load_interval = null; + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + */ + protected $end_load_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_load + * The maximum acceptable amount of load. + * @type int|string $soft_max_load + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * @type float $cost_per_unit_above_soft_max + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $start_load_interval + * The acceptable load interval of the vehicle at the start of the route. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $end_load_interval + * The acceptable load interval of the vehicle at the end of the route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + * @return int|string + */ + public function getMaxLoad() + { + return isset($this->max_load) ? $this->max_load : 0; + } + + public function hasMaxLoad() + { + return isset($this->max_load); + } + + public function clearMaxLoad() + { + unset($this->max_load); + } + + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + * @param int|string $var + * @return $this + */ + public function setMaxLoad($var) + { + GPBUtil::checkInt64($var); + $this->max_load = $var; + + return $this; + } + + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + * @return int|string + */ + public function getSoftMaxLoad() + { + return $this->soft_max_load; + } + + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + * @param int|string $var + * @return $this + */ + public function setSoftMaxLoad($var) + { + GPBUtil::checkInt64($var); + $this->soft_max_load = $var; + + return $this; + } + + /** + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + * @return float + */ + public function getCostPerUnitAboveSoftMax() + { + return $this->cost_per_unit_above_soft_max; + } + + /** + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerUnitAboveSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_unit_above_soft_max = $var; + + return $this; + } + + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null + */ + public function getStartLoadInterval() + { + return $this->start_load_interval; + } + + public function hasStartLoadInterval() + { + return isset($this->start_load_interval); + } + + public function clearStartLoadInterval() + { + unset($this->start_load_interval); + } + + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var + * @return $this + */ + public function setStartLoadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); + $this->start_load_interval = $var; + + return $this; + } + + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null + */ + public function getEndLoadInterval() + { + return $this->end_load_interval; + } + + public function hasEndLoadInterval() + { + return isset($this->end_load_interval); + } + + public function clearEndLoadInterval() + { + unset($this->end_load_interval); + } + + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var + * @return $this + */ + public function setEndLoadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); + $this->end_load_interval = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoadLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php new file mode 100644 index 000000000000..cc4429851ef7 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php @@ -0,0 +1,150 @@ +google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval + */ +class Interval extends \Google\Protobuf\Internal\Message +{ + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + */ + protected $min = 0; + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + */ + protected $max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * @type int|string $max + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + * @return int|string + */ + public function getMin() + { + return $this->min; + } + + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + * @param int|string $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkInt64($var); + $this->min = $var; + + return $this; + } + + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + * @return int|string + */ + public function getMax() + { + return isset($this->max) ? $this->max : 0; + } + + public function hasMax() + { + return isset($this->max); + } + + public function clearMax() + { + unset($this->max); + } + + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + * @param int|string $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkInt64($var); + $this->max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interval::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit_Interval::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php new file mode 100644 index 000000000000..29c7c3891265 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php @@ -0,0 +1,67 @@ +google.maps.routeoptimization.v1.Vehicle.TravelMode + */ +class TravelMode +{ + /** + * Unspecified travel mode, equivalent to `DRIVING`. + * + * Generated from protobuf enum TRAVEL_MODE_UNSPECIFIED = 0; + */ + const TRAVEL_MODE_UNSPECIFIED = 0; + /** + * Travel mode corresponding to driving directions (car, ...). + * + * Generated from protobuf enum DRIVING = 1; + */ + const DRIVING = 1; + /** + * Travel mode corresponding to walking directions. + * + * Generated from protobuf enum WALKING = 2; + */ + const WALKING = 2; + + private static $valueToName = [ + self::TRAVEL_MODE_UNSPECIFIED => 'TRAVEL_MODE_UNSPECIFIED', + self::DRIVING => 'DRIVING', + self::WALKING => 'WALKING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TravelMode::class, \Google\Maps\RouteOptimization\V1\Vehicle_TravelMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php new file mode 100644 index 000000000000..dc58c2f42b5b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php @@ -0,0 +1,68 @@ +google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy + */ +class UnloadingPolicy +{ + /** + * Unspecified unloading policy; deliveries must just occur after their + * corresponding pickups. + * + * Generated from protobuf enum UNLOADING_POLICY_UNSPECIFIED = 0; + */ + const UNLOADING_POLICY_UNSPECIFIED = 0; + /** + * Deliveries must occur in reverse order of pickups + * + * Generated from protobuf enum LAST_IN_FIRST_OUT = 1; + */ + const LAST_IN_FIRST_OUT = 1; + /** + * Deliveries must occur in the same order as pickups + * + * Generated from protobuf enum FIRST_IN_FIRST_OUT = 2; + */ + const FIRST_IN_FIRST_OUT = 2; + + private static $valueToName = [ + self::UNLOADING_POLICY_UNSPECIFIED => 'UNLOADING_POLICY_UNSPECIFIED', + self::LAST_IN_FIRST_OUT => 'LAST_IN_FIRST_OUT', + self::FIRST_IN_FIRST_OUT => 'FIRST_IN_FIRST_OUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnloadingPolicy::class, \Google\Maps\RouteOptimization\V1\Vehicle_UnloadingPolicy::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php new file mode 100644 index 000000000000..b691d5167b2b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php @@ -0,0 +1,166 @@ +google.maps.routeoptimization.v1.Waypoint + */ +class Waypoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * + * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $side_of_road = false; + protected $location_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\Location $location + * A point specified using geographic coordinates, including an optional + * heading. + * @type string $place_id + * The POI Place ID associated with the waypoint. + * @type bool $side_of_road + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A point specified using geographic coordinates, including an optional + * heading. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; + * @return \Google\Maps\RouteOptimization\V1\Location|null + */ + public function getLocation() + { + return $this->readOneof(1); + } + + public function hasLocation() + { + return $this->hasOneof(1); + } + + /** + * A point specified using geographic coordinates, including an optional + * heading. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; + * @param \Google\Maps\RouteOptimization\V1\Location $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Location::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The POI Place ID associated with the waypoint. + * + * Generated from protobuf field string place_id = 2; + * @return string + */ + public function getPlaceId() + { + return $this->readOneof(2); + } + + public function hasPlaceId() + { + return $this->hasOneof(2); + } + + /** + * The POI Place ID associated with the waypoint. + * + * Generated from protobuf field string place_id = 2; + * @param string $var + * @return $this + */ + public function setPlaceId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * + * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSideOfRoad() + { + return $this->side_of_road; + } + + /** + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * + * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSideOfRoad($var) + { + GPBUtil::checkBool($var); + $this->side_of_road = $var; + + return $this; + } + + /** + * @return string + */ + public function getLocationType() + { + return $this->whichOneof("location_type"); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php new file mode 100644 index 000000000000..e118b4dbdf9b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php @@ -0,0 +1,133 @@ +setDataFormat($modelConfigsInputConfigDataFormat); + $modelConfigsOutputConfig = (new OutputConfig()) + ->setDataFormat($modelConfigsOutputConfigDataFormat); + $asyncModelConfig = (new AsyncModelConfig()) + ->setInputConfig($modelConfigsInputConfig) + ->setOutputConfig($modelConfigsOutputConfig); + $modelConfigs = [$asyncModelConfig,]; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $routeOptimizationClient->batchOptimizeTours($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchOptimizeToursResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $modelConfigsInputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; + $modelConfigsOutputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; + + batch_optimize_tours_sample( + $parent, + $modelConfigsInputConfigDataFormat, + $modelConfigsOutputConfigDataFormat + ); +} +// [END routeoptimization_v1_generated_RouteOptimization_BatchOptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php new file mode 100644 index 000000000000..8ad98f631377 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php @@ -0,0 +1,89 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var OptimizeToursResponse $response */ + $response = $routeOptimizationClient->optimizeTours($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + optimize_tours_sample($parent); +} +// [END routeoptimization_v1_generated_RouteOptimization_OptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php new file mode 100644 index 000000000000..f1a5d837752f --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php @@ -0,0 +1,323 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/route_optimization_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/route_optimization_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/route_optimization_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/route_optimization_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'routeoptimization.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Optimizes vehicle tours for one or more `OptimizeToursRequest` + * messages as a batch. + * + * This method is a Long Running Operation (LRO). The inputs for optimization + * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` + * messages) are read from and written to Cloud Storage in user-specified + * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` + * contains a `ShipmentModel` and returns an `OptimizeToursResponse` + * containing `ShipmentRoute` fields, which are a set of routes to be + * performed by vehicles minimizing the overall cost. + * + * The user can poll `operations.get` to check the status of the LRO: + * + * If the LRO `done` field is false, then at least one request is still + * being processed. Other requests may have completed successfully and their + * results are available in Cloud Storage. + * + * If the LRO's `done` field is true, then all requests have been processed. + * Any successfully processed requests will have their results available in + * Cloud Storage. Any requests that failed will not have their results + * available in Cloud Storage. If the LRO's `error` field is set, then it + * contains the error from one of the failed requests. + * + * The async variant is {@see RouteOptimizationClient::batchOptimizeToursAsync()} . + * + * @example samples/V1/RouteOptimizationClient/batch_optimize_tours.php + * + * @param BatchOptimizeToursRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchOptimizeTours(BatchOptimizeToursRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchOptimizeTours', $request, $callOptions)->wait(); + } + + /** + * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an + * `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of + * routes to be performed by vehicles minimizing the overall cost. + * + * A `ShipmentModel` model consists mainly of `Shipment`s that need to be + * carried out and `Vehicle`s that can be used to transport the `Shipment`s. + * The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically, + * they assign a series of `Visit`s to each vehicle, where a `Visit` + * corresponds to a `VisitRequest`, which is a pickup or delivery for a + * `Shipment`. + * + * The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that + * minimizes the total cost where cost has many components defined in the + * `ShipmentModel`. + * + * The async variant is {@see RouteOptimizationClient::optimizeToursAsync()} . + * + * @example samples/V1/RouteOptimizationClient/optimize_tours.php + * + * @param OptimizeToursRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OptimizeToursResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function optimizeTours(OptimizeToursRequest $request, array $callOptions = []): OptimizeToursResponse + { + return $this->startApiCall('OptimizeTours', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..71f5ea3e4f9b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json @@ -0,0 +1,28 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.maps.routeoptimization.v1", + "libraryPackage": "Google\\Maps\\RouteOptimization\\V1", + "services": { + "RouteOptimization": { + "clients": { + "grpc": { + "libraryClient": "RouteOptimizationGapicClient", + "rpcs": { + "BatchOptimizeTours": { + "methods": [ + "batchOptimizeTours" + ] + }, + "OptimizeTours": { + "methods": [ + "optimizeTours" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json new file mode 100644 index 000000000000..0e5122e35b74 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.maps.routeoptimization.v1.RouteOptimization": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000 + } + }, + "methods": { + "BatchOptimizeTours": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "OptimizeTours": { + "timeout_millis": 3600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php new file mode 100644 index 000000000000..0e8b84155c48 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php @@ -0,0 +1,59 @@ + [ + 'google.maps.routeoptimization.v1.RouteOptimization' => [ + 'BatchOptimizeTours' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursResponse', + 'metadataReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'OptimizeTours' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\RouteOptimization\V1\OptimizeToursResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php new file mode 100644 index 000000000000..5087b38b87fd --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php @@ -0,0 +1,80 @@ + [ + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.maps.routeoptimization.v1.RouteOptimization' => [ + 'BatchOptimizeTours' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:batchOptimizeTours', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}:batchOptimizeTours', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'OptimizeTours' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:optimizeTours', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}:optimizeTours', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php b/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php new file mode 100644 index 000000000000..ce03ba07af40 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php @@ -0,0 +1,327 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RouteOptimizationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RouteOptimizationClient($options); + } + + /** @test */ + public function batchOptimizeToursTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchOptimizeToursResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchOptimizeToursTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeTours($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getModelConfigs(); + $this->assertProtobufEquals($modelConfigs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchOptimizeToursExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeTours($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function optimizeToursTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $requestLabel = 'requestLabel1739091268'; + $expectedResponse = new OptimizeToursResponse(); + $expectedResponse->setRequestLabel($requestLabel); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new OptimizeToursRequest()) + ->setParent($parent); + $response = $gapicClient->optimizeTours($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/OptimizeTours', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function optimizeToursExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new OptimizeToursRequest()) + ->setParent($parent); + try { + $gapicClient->optimizeTours($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchOptimizeToursAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchOptimizeToursResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchOptimizeToursTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeToursAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getModelConfigs(); + $this->assertProtobufEquals($modelConfigs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From dbd7aac9a50a71db2fa5e7e3d85b09680fc3d9e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 24 Sep 2024 02:02:13 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1/RouteOptimizationService.php | Bin 17366 -> 17393 bytes .../batch_optimize_tours.php | 16 +- .../src/V1/Client/RouteOptimizationClient.php | 16 +- .../src/V1/OptimizeToursRequest.php | 8 +- .../src/V1/OptimizeToursValidationError.php | 948 +---------- .../src/V1/ShipmentRoute/Transition.php | 66 + .../V1/RouteOptimizationService.php | Bin 17393 -> 0 bytes .../V1/AggregatedMetrics.php | 454 ------ .../V1/BatchOptimizeToursMetadata.php | 33 - .../V1/BatchOptimizeToursRequest.php | 125 -- .../AsyncModelConfig.php | 162 -- .../V1/BatchOptimizeToursResponse.php | 34 - .../Maps/RouteOptimization/V1/BreakRule.php | 113 -- .../V1/BreakRule/BreakRequest.php | 172 -- .../V1/BreakRule/FrequencyConstraint.php | 166 -- .../Maps/RouteOptimization/V1/DataFormat.php | 62 - .../RouteOptimization/V1/DistanceLimit.php | 284 ---- .../RouteOptimization/V1/GcsDestination.php | 68 - .../Maps/RouteOptimization/V1/GcsSource.php | 71 - .../V1/InjectedSolutionConstraint.php | 156 -- .../ConstraintRelaxation.php | 151 -- .../ConstraintRelaxation/Relaxation.php | 204 --- .../ConstraintRelaxation/Relaxation/Level.php | 83 - .../Maps/RouteOptimization/V1/InputConfig.php | 110 -- .../Maps/RouteOptimization/V1/Location.php | 133 -- .../V1/OptimizeToursRequest.php | 1178 -------------- .../V1/OptimizeToursRequest/SearchMode.php | 65 - .../V1/OptimizeToursRequest/SolvingMode.php | 84 - .../V1/OptimizeToursResponse.php | 243 --- .../V1/OptimizeToursResponse/Metrics.php | 372 ----- .../V1/OptimizeToursValidationError.php | 316 ---- .../FieldReference.php | 197 --- .../RouteOptimization/V1/OutputConfig.php | 111 -- .../RouteOptimization/V1/RouteModifiers.php | 204 --- .../Maps/RouteOptimization/V1/Shipment.php | 841 ---------- .../RouteOptimization/V1/Shipment/Load.php | 81 - .../V1/Shipment/VisitRequest.php | 615 ------- .../RouteOptimization/V1/ShipmentModel.php | 1010 ------------ .../ShipmentModel/DurationDistanceMatrix.php | 137 -- .../DurationDistanceMatrix/Row.php | 116 -- .../V1/ShipmentModel/PrecedenceRule.php | 243 --- .../RouteOptimization/V1/ShipmentRoute.php | 706 -------- .../V1/ShipmentRoute/EncodedPolyline.php | 73 - .../V1/ShipmentRoute/PBBreak.php | 124 -- .../V1/ShipmentRoute/Transition.php | 639 -------- .../V1/ShipmentRoute/VehicleLoad.php | 80 - .../V1/ShipmentRoute/Visit.php | 433 ----- .../V1/ShipmentTypeIncompatibility.php | 107 -- .../IncompatibilityMode.php | 72 - .../V1/ShipmentTypeRequirement.php | 156 -- .../RequirementMode.php | 80 - .../RouteOptimization/V1/SkippedShipment.php | 157 -- .../V1/SkippedShipment/Reason.php | 181 --- .../V1/SkippedShipment/Reason/Code.php | 115 -- .../Maps/RouteOptimization/V1/TimeWindow.php | 389 ----- .../V1/TransitionAttributes.php | 412 ----- .../Maps/RouteOptimization/V1/Vehicle.php | 1423 ----------------- .../V1/Vehicle/DurationLimit.php | 359 ----- .../V1/Vehicle/LoadLimit.php | 270 ---- .../V1/Vehicle/LoadLimit/Interval.php | 150 -- .../V1/Vehicle/TravelMode.php | 67 - .../V1/Vehicle/UnloadingPolicy.php | 68 - .../Maps/RouteOptimization/V1/Waypoint.php | 166 -- .../batch_optimize_tours.php | 133 -- .../optimize_tours.php | 89 -- .../src/V1/Client/RouteOptimizationClient.php | 323 ---- .../v1/src/V1/gapic_metadata.json | 28 - .../route_optimization_client_config.json | 44 - .../route_optimization_descriptor_config.php | 59 - .../route_optimization_rest_client_config.php | 80 - .../V1/Client/RouteOptimizationClientTest.php | 327 ---- 71 files changed, 102 insertions(+), 16656 deletions(-) delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php diff --git a/MapsRouteOptimization/metadata/V1/RouteOptimizationService.php b/MapsRouteOptimization/metadata/V1/RouteOptimizationService.php index eef9987c9c88408334ae98ea5958bad68f8e17e2..debefc2ef34e4d83c84bc87abc669dd3c1aa4075 100644 GIT binary patch delta 69 zcmV-L0J{IyhXL`20kEM11%ZG83PF)eL9^xqvnT?95VM;sT?7Hgv-vRC0T~zy3vzFD bbY)+3Z);_47z`i*C<#IX;6Vek&@u)Qej*o~ delta 42 zcmV+_0M-BThXK}y0kEM11m}MWL6J*Av*!b|C<5jWvz#nl1OctH`Y_l5v+Obj5rvfz AlmGw# diff --git a/MapsRouteOptimization/samples/V1/RouteOptimizationClient/batch_optimize_tours.php b/MapsRouteOptimization/samples/V1/RouteOptimizationClient/batch_optimize_tours.php index 4756c9fb61e9..e118b4dbdf9b 100644 --- a/MapsRouteOptimization/samples/V1/RouteOptimizationClient/batch_optimize_tours.php +++ b/MapsRouteOptimization/samples/V1/RouteOptimizationClient/batch_optimize_tours.php @@ -40,23 +40,23 @@ * * This method is a Long Running Operation (LRO). The inputs for optimization * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` - * messages) are read/written from/to Cloud Storage in user-specified + * messages) are read from and written to Cloud Storage in user-specified * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` * contains a `ShipmentModel` and returns an `OptimizeToursResponse` - * containing `ShipmentRoute`s, which are a set of routes to be performed by - * vehicles minimizing the overall cost. + * containing `ShipmentRoute` fields, which are a set of routes to be + * performed by vehicles minimizing the overall cost. * * The user can poll `operations.get` to check the status of the LRO: * - * If the LRO's `done` field is false, then at least one request is still + * If the LRO `done` field is false, then at least one request is still * being processed. Other requests may have completed successfully and their - * results are available in GCS. + * results are available in Cloud Storage. * * If the LRO's `done` field is true, then all requests have been processed. * Any successfully processed requests will have their results available in - * GCS. Any requests that failed will not have their results available in - * GCS. If the LRO's `error` field is set, then it contains the error from - * one of the failed requests. + * Cloud Storage. Any requests that failed will not have their results + * available in Cloud Storage. If the LRO's `error` field is set, then it + * contains the error from one of the failed requests. * * @param string $parent Target project and location to make a call. * diff --git a/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php b/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php index 50d75ed878c4..a2cc19408408 100644 --- a/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php +++ b/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php @@ -241,23 +241,23 @@ public function __call($method, $args) * * This method is a Long Running Operation (LRO). The inputs for optimization * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` - * messages) are read/written from/to Cloud Storage in user-specified + * messages) are read from and written to Cloud Storage in user-specified * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` * contains a `ShipmentModel` and returns an `OptimizeToursResponse` - * containing `ShipmentRoute`s, which are a set of routes to be performed by - * vehicles minimizing the overall cost. + * containing `ShipmentRoute` fields, which are a set of routes to be + * performed by vehicles minimizing the overall cost. * * The user can poll `operations.get` to check the status of the LRO: * - * If the LRO's `done` field is false, then at least one request is still + * If the LRO `done` field is false, then at least one request is still * being processed. Other requests may have completed successfully and their - * results are available in GCS. + * results are available in Cloud Storage. * * If the LRO's `done` field is true, then all requests have been processed. * Any successfully processed requests will have their results available in - * GCS. Any requests that failed will not have their results available in - * GCS. If the LRO's `error` field is set, then it contains the error from - * one of the failed requests. + * Cloud Storage. Any requests that failed will not have their results + * available in Cloud Storage. If the LRO's `error` field is set, then it + * contains the error from one of the failed requests. * * The async variant is {@see RouteOptimizationClient::batchOptimizeToursAsync()} . * diff --git a/MapsRouteOptimization/src/V1/OptimizeToursRequest.php b/MapsRouteOptimization/src/V1/OptimizeToursRequest.php index 2f96a735eb6f..a7a94c081cf6 100644 --- a/MapsRouteOptimization/src/V1/OptimizeToursRequest.php +++ b/MapsRouteOptimization/src/V1/OptimizeToursRequest.php @@ -196,7 +196,7 @@ class OptimizeToursRequest extends \Google\Protobuf\Internal\Message */ protected $populate_polylines = false; /** - * If true, polylines will be populated in response + * If true, polylines and route tokens will be populated in response * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. * * Generated from protobuf field bool populate_transition_polylines = 13; @@ -390,7 +390,7 @@ class OptimizeToursRequest extends \Google\Protobuf\Internal\Message * @type bool $populate_polylines * If true, polylines will be populated in response `ShipmentRoute`s. * @type bool $populate_transition_polylines - * If true, polylines will be populated in response + * If true, polylines and route tokens will be populated in response * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. * @type bool $allow_large_deadline_despite_interruption_risk * If this is set, then the request can have a deadline @@ -967,7 +967,7 @@ public function setPopulatePolylines($var) } /** - * If true, polylines will be populated in response + * If true, polylines and route tokens will be populated in response * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. * * Generated from protobuf field bool populate_transition_polylines = 13; @@ -979,7 +979,7 @@ public function getPopulateTransitionPolylines() } /** - * If true, polylines will be populated in response + * If true, polylines and route tokens will be populated in response * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. * * Generated from protobuf field bool populate_transition_polylines = 13; diff --git a/MapsRouteOptimization/src/V1/OptimizeToursValidationError.php b/MapsRouteOptimization/src/V1/OptimizeToursValidationError.php index 2e086dd0583e..8f2ad51ee288 100644 --- a/MapsRouteOptimization/src/V1/OptimizeToursValidationError.php +++ b/MapsRouteOptimization/src/V1/OptimizeToursValidationError.php @@ -19,248 +19,19 @@ class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message /** * A validation error is defined by the pair (`code`, `display_name`) which * are always present. - * Other fields (below) provide more context about the error. + * The fields following this section provide more context about the error. * *MULTIPLE ERRORS*: * When there are multiple errors, the validation process tries to output * several of them. Much like a compiler, this is an imperfect process. Some * validation errors will be "fatal", meaning that they stop the entire * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. + * errors, among others. Some errors may cause the validation process to skip + * other errors. * *STABILITY*: * `code` and `display_name` should be very stable. But new codes and * display names may appear over time, which may cause a given (invalid) * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2819; - * * TIME_WINDOW_SOFT_END_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2820; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * * WARNING = 9; - * * WARNING_INJECTED_FIRST_SOLUTION = 90; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_SHIPMENTS_REMOVED - * = 9000; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES - * = 9001; + * error hid the old one. For example, see "MULTIPLE ERRORS". * * Generated from protobuf field int32 code = 1; */ @@ -313,248 +84,19 @@ class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message * @type int $code * A validation error is defined by the pair (`code`, `display_name`) which * are always present. - * Other fields (below) provide more context about the error. + * The fields following this section provide more context about the error. * *MULTIPLE ERRORS*: * When there are multiple errors, the validation process tries to output * several of them. Much like a compiler, this is an imperfect process. Some * validation errors will be "fatal", meaning that they stop the entire * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. + * errors, among others. Some errors may cause the validation process to skip + * other errors. * *STABILITY*: * `code` and `display_name` should be very stable. But new codes and * display names may appear over time, which may cause a given (invalid) * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2819; - * * TIME_WINDOW_SOFT_END_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2820; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * * WARNING = 9; - * * WARNING_INJECTED_FIRST_SOLUTION = 90; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_SHIPMENTS_REMOVED - * = 9000; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES - * = 9001; + * error hid the old one. For example, see "MULTIPLE ERRORS". * @type string $display_name * The error display name. * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields @@ -587,248 +129,19 @@ public function __construct($data = NULL) { /** * A validation error is defined by the pair (`code`, `display_name`) which * are always present. - * Other fields (below) provide more context about the error. + * The fields following this section provide more context about the error. * *MULTIPLE ERRORS*: * When there are multiple errors, the validation process tries to output * several of them. Much like a compiler, this is an imperfect process. Some * validation errors will be "fatal", meaning that they stop the entire * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. + * errors, among others. Some errors may cause the validation process to skip + * other errors. * *STABILITY*: * `code` and `display_name` should be very stable. But new codes and * display names may appear over time, which may cause a given (invalid) * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2819; - * * TIME_WINDOW_SOFT_END_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2820; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * * WARNING = 9; - * * WARNING_INJECTED_FIRST_SOLUTION = 90; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_SHIPMENTS_REMOVED - * = 9000; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES - * = 9001; + * error hid the old one. For example, see "MULTIPLE ERRORS". * * Generated from protobuf field int32 code = 1; * @return int @@ -841,248 +154,19 @@ public function getCode() /** * A validation error is defined by the pair (`code`, `display_name`) which * are always present. - * Other fields (below) provide more context about the error. + * The fields following this section provide more context about the error. * *MULTIPLE ERRORS*: * When there are multiple errors, the validation process tries to output * several of them. Much like a compiler, this is an imperfect process. Some * validation errors will be "fatal", meaning that they stop the entire * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. + * errors, among others. Some errors may cause the validation process to skip + * other errors. * *STABILITY*: * `code` and `display_name` should be very stable. But new codes and * display names may appear over time, which may cause a given (invalid) * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2819; - * * TIME_WINDOW_SOFT_END_TIME_OUTSIDE_GLOBAL_TIME_WINDOW = 2820; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * * WARNING = 9; - * * WARNING_INJECTED_FIRST_SOLUTION = 90; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_SHIPMENTS_REMOVED - * = 9000; - * * WARNING_INJECTED_FIRST_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES - * = 9001; + * error hid the old one. For example, see "MULTIPLE ERRORS". * * Generated from protobuf field int32 code = 1; * @param int $var diff --git a/MapsRouteOptimization/src/V1/ShipmentRoute/Transition.php b/MapsRouteOptimization/src/V1/ShipmentRoute/Transition.php index 2de1b69665a9..ffc8acecb1da 100644 --- a/MapsRouteOptimization/src/V1/ShipmentRoute/Transition.php +++ b/MapsRouteOptimization/src/V1/ShipmentRoute/Transition.php @@ -94,6 +94,20 @@ class Transition extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; */ protected $route_polyline = null; + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $route_token = ''; /** * Vehicle loads during this transition, for each type that either appears * in this vehicle's @@ -156,6 +170,16 @@ class Transition extends \Google\Protobuf\Internal\Message * This field is only populated if [populate_transition_polylines] * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] * is set to true. + * @type string $route_token + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads * Vehicle loads during this transition, for each type that either appears * in this vehicle's @@ -522,6 +546,48 @@ public function setRoutePolyline($var) return $this; } + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRouteToken() + { + return $this->route_token; + } + + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRouteToken($var) + { + GPBUtil::checkString($var, True); + $this->route_token = $var; + + return $this; + } + /** * Vehicle loads during this transition, for each type that either appears * in this vehicle's diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php deleted file mode 100644 index debefc2ef34e4d83c84bc87abc669dd3c1aa4075..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17393 zcmcg!+ix3JdJm}^`BB%AFEo7#O~)JCNvKGf|6I(FU2Bo8g?uxYFu>uqPnwmPn1wO#Yr{9JcU ztF>~n${%X}rDnE`zj`uh8*ayLz0dYd1itY8+8@BiY}?$= zwptc(!D=~~O!rJ(5@$_ZZ<Q%S(`Ytw#*uzvTK4!;i&pEu|r+CgD8a zcD-B3clg}#m-ePsO_WDhKW>jdw|d$(_KUjPY#k1s#H8ho4^1H(*+#o#{U9OrNYKE{jFw{;t(HXcfb?nHAFzsZJ`BbYn38b(vATdf20(20kW6L(^3#WY{! zY&NCOTqvD&PFwXYqPotAvXv759)iW*H_8>5ZJ18Gsh?_O^13?{2n70hWWHMr&x_DG^~IIgXusftIK?0hi#1O>4@qFjfIbSkr9 z*todf(C~Z*2WCAUW3LmSw5@gr&5NP6t>$UdY#B~`mc6?T*S&W*3yCnkcZbcfVedj( zZ#J!GxUPL@;7RocQNcf)wuxlfj_nSj6uLCic^aQ*^KQVUj$>$t2Fj0P)-^N`u8vT{ zi7&AC`>#U6dwFaivT!ssvIwE@K#lk!4hn6)^e3T^l7frJ`g83Bfeqp(TE?(#%XZ>Z zIA&@yL}TV)it#1BgwLX>ClJF6BTZmpwghu|btAi5tZJ1~aZg=*Nx?^Z*xGSin#VO3AXZkZyX9?dBU`EB3O69JUfQngBK2&ssAc!Eg<_T#s1~-= z#c=LAT0oaI>HD!XmH5utd7>I3ZE*?m+}Ob23;>v`*1Y1z{&SKF;PiMlpUBsPTFSOiIdri zt$lP(f@KtRatmqn07NG7Zxb*h{#JG&t{)!S#v#QTT>Uk<9Qo(i+FPTS%X$liOTzMnM{Xoy3s-tLz7AOhEIM1Q+3O6$x_ihek|8H+nWXMv6t=X zbt0y=T>Df}09*w81a};lU27=uI)HCP3?`l$ryPioaX{(n7>s41O!&P}>R$lnr1X)A zXe#$1+7)E3EB8ikS<*mOMFfi___{lK_8z}9B?-%<*E$AeCx*N#QYW%+%m%&#ONULX zhDY{Y;OIMe3l_vQ@8Y-;47+u73}TYRw2aTpIv*hvMW2keS@|9$y!X<$qj@47K_eew zm%cHY2a<#A7CbDJ7v5rv=sj2N!p$?*dagNkU2}EByySJGLx(m{lG#ua$tWuCMW5r- zU0kY$alV7jlO*=t(VMS&elzRMRu150DM=ckdvuYMZ9vymGn?pSnFpo??vGwTa)-jO zLV(Pv@*PM7*C9J?+6DnaCqBo{@cZXmf`SY|0ny|l0+G7WFwkpjcBhH^o@YeIFv)V? z{8o27I%Oo2_*DolNzmJK(T`!$ww^htxMSLk;6j6`rpwkdj8T?)Y@mL~3_>)q4ihxu zb%;tKlN%TU*5_dw4Lzb3Brwl7TV6PRrhOl}zDSEWF|e~!HsaeAK5=FSK&tZiUc%su7qi0(rm*O%ck!_Gec zjGSinaSDZIiiDE+NM>7wc%nZ;c~Wk|mA+SWEo?SLMN`TJUSokq&$K8WCbo9A3@P8nD1zN{U=IWl#KIJ(45feoGhoJ8 z=o0NBdWu$}3aXoV*s^Q`4I9dP;(sS$HXtT%z@l#3COUepY1LVrz%(wlwk&U#jB&cC zyT#U_lJ5?Grk}Pg3JQ5{VhpeUNX$@HKxr75j=_W_o>wl*!}o#9Zulp73zNvi*3Pr= zEKD*-Mq(6Iaxlv{{tV@VtS3oOZ0&V^C&I*Wj);K=%gff9mhTa8T=Z=ATL=w!@Wi^Dl=w)OU* z{Na&#c!YM-5oigW2Y-$=J)7_WM?>h7`D3zemd&70gc8`H)GwD|M#f#e&?QNxL@7WF z!-5mcrXQnZGAA;>_V(x-5meI{6yRiHK9X8s*%zY3k0+eWo1@9~u;n$F=b_&?ZYC!O ze+3tF7iKAF^p@k%=0LCZZ9ddnjK`Sg@n;y(i@=s5If6G)Wf3AQYNaO>P7EZC1{`(DnuRfr9Ln552=mCx(nz9Wu+jvAK9T7hquL|6_L+MV(%k{$P){7df+r!u zcm`sPTrk!cqXf_=cr4!dF5DVNZv$)J39fxMQ&}E-9iZBUD_G5{ma}_maS$Yo!A!nf z*eh&5Ks1g2d6X?ar2m9dHCX8NO^7gew~M809!F?9rD9?INl$U?A}kfLDn@{Oqfo{_ zO1o4dy95gVZ{T@2cNMNsZ8KoMrKe5(Z~~9f4Q10Fn4n4pFT)H=c)u=y294%YKWsGS z)S0q$kq9$B!;2xS!m3HoF-Gxa6<+aVo(X%+Kqnwfo^NroK>}u^;bw4(Pb0mR37iSl zz#8oBuILY0B=-uWdIk<4o%$J>BH;$PJG%@(rbuK;=_-Vozb3fod&>+xPf_^~;$aHx z)1f-Fv{a0Rq0KOre+Q2rmD&p(yffn=fG@ zFoIo2Se`H&Omn07j1uVB520CvFA-Z%M9pJAN}Rf=CBW!^{9M2Zy`TQI}L=%rwKb?eV7ZUBjyuehvh%VFN@0|lzr8zlH0JCiuvFQYx z!CH07ILmevnHnFXyzT8Sy&(y8+gcL;8iLutf*-)LS4Q^Poso8xx29!aNz{;ib4OZP zKKE?|GG?ob6L@0vY~kW9YCpkL(tv|08BmBCzYY)P@MDaiiD~XQSt^Dodnxe4jG&PE z!D6@K%tCtvz;h>}YL96OSs?O1<}EE;|K9~gj`lH<1JGga>TOt*^8zklxW7_ingt-T z0qdR7;wqD7>~K7zi!D-=N)dKX7KJnCrPVc^$}PBhq&u?93Gd^;(4B5wmC6+ngzED= zf|R{XtXXQT&X3?BRIIq7CB}H0bxtYB6(&8hLVRwnFulUsgV&Nm#f=y25vf9qpORd@ zgN;v=^B+U|gGXeywcc&5KnKLB`Wh@)ET8zR37BF5BPHV;ks+mulqb1M5XD%Yr=*#6 zj3`%OnaL4WrC9r_7*C2kgXTo{9 zamWl@gp0E`Wn_gbD4V=pbeL@R+Z5SzkaV@fEmoLIf(L5#mK;qfg5{Pz={wNNc?ybrum=BLn_~TrHyggkb?c1f+V)& zVT}XZbB*WtO$jz1N}$0HL>v_TF5iM1atwwy2KE$TN?6A)qfG3YU!Z68* zUVz2*{)XClfbEj6rgsZo&Z}G5?YyQwURTw8MZVM4vpd;!EEX$_Mb?7^{gaOFlSzN_h)b z#+i-X!rG(4cE0qevN)|=hGlsQIwf`%mmXpN@eJ!1mTV7PP3jkuu+-mmiUuA#urbMS zOwp(G@VwiUlxJ#?TN$M%N}stNh2p;ww|Y^Tb5C#n#oz=9iaUdbBc zyNbTMOK<7VeO9{(bAbn6tHnMXQ8IcgDocN1LxG?C2@)wst#V=sGbGSlt zi^XD$)L({RiW8@Vvr4(`;71y_;bvJaW*=*Ng-W5y+7c>ScB876wd!VBt!$QxdCW_% zL3+S2^gI=8q)^Fm^v((6$2nK{9QLtC56OwtA5XxwK+F4H&!-D4k0;#pR9~MZPYZkp zrrAe~QhLWI2@YE`&Ax6e8`w^P`6Yvr5$t0d%!)dWe#oOVmV3l*Q_Lq&J)5;v@vm{B ziJxN|Y!3}QM)#{g%wr0?Bj5oR4H=kZsY^`XeHZ)iJ2mV}#V<2iSP@(M-JXfsUKv2q zu%wC~38elu1To*&hDsLTu3JwKTbbh z9w%X47U!^3RxSe5d>g5M!mOPCJ4VEC3$#o8xXLxD@yOz3!`RvwttGhCe0SdOaKD&W z_iZS39ikprsGQlcO%Bo7=~5|}5ALLY%snhnb(wHu7{}B2z``)k*ZIuBZ;ckgvNnng=rrsTV zz#wC4eIH8`cUDsO22cJXGjKwp`eioBLT$llCMDvC_!YU6#;-Vjl}#VHZrjPMtUP=6 ztmoy5-f@rcV{@z1cmvB4E@^-6&%#v4JC>|Evllmay-z~L&pqtW?=S3xK7Gt6OF~F< z<k|;_V?lB1NNH~h$8WG`o4Xn_g24@L-zUaR`4IL5JJru zwU57C@!Rk%PAHQhN|{U_sZ3^XwKk0s?pklX>ismp>-<+Bd_Nk2DQ;{P81RD;Y$X3- KhcDm@fd2=v>Qx;8 diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php deleted file mode 100644 index a4e7c9fdc222..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php +++ /dev/null @@ -1,454 +0,0 @@ -google.maps.routeoptimization.v1.AggregatedMetrics - */ -class AggregatedMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - */ - protected $performed_shipment_count = 0; - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - */ - protected $travel_duration = null; - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - */ - protected $wait_duration = null; - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - */ - protected $delay_duration = null; - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - */ - protected $break_duration = null; - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - */ - protected $visit_duration = null; - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - */ - protected $total_duration = null; - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - */ - protected $travel_distance_meters = 0.0; - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - */ - private $max_loads; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $performed_shipment_count - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * @type \Google\Protobuf\Duration $travel_duration - * Total travel duration for a route or a solution. - * @type \Google\Protobuf\Duration $wait_duration - * Total wait duration for a route or a solution. - * @type \Google\Protobuf\Duration $delay_duration - * Total delay duration for a route or a solution. - * @type \Google\Protobuf\Duration $break_duration - * Total break duration for a route or a solution. - * @type \Google\Protobuf\Duration $visit_duration - * Total visit duration for a route or a solution. - * @type \Google\Protobuf\Duration $total_duration - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * @type float $travel_distance_meters - * Total travel distance for a route or a solution. - * @type array|\Google\Protobuf\Internal\MapField $max_loads - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - * @return int - */ - public function getPerformedShipmentCount() - { - return $this->performed_shipment_count; - } - - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - * @param int $var - * @return $this - */ - public function setPerformedShipmentCount($var) - { - GPBUtil::checkInt32($var); - $this->performed_shipment_count = $var; - - return $this; - } - - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getWaitDuration() - { - return $this->wait_duration; - } - - public function hasWaitDuration() - { - return isset($this->wait_duration); - } - - public function clearWaitDuration() - { - unset($this->wait_duration); - } - - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->wait_duration = $var; - - return $this; - } - - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDelayDuration() - { - return $this->delay_duration; - } - - public function hasDelayDuration() - { - return isset($this->delay_duration); - } - - public function clearDelayDuration() - { - unset($this->delay_duration); - } - - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelayDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay_duration = $var; - - return $this; - } - - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getBreakDuration() - { - return $this->break_duration; - } - - public function hasBreakDuration() - { - return isset($this->break_duration); - } - - public function clearBreakDuration() - { - unset($this->break_duration); - } - - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->break_duration = $var; - - return $this; - } - - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getVisitDuration() - { - return $this->visit_duration; - } - - public function hasVisitDuration() - { - return isset($this->visit_duration); - } - - public function clearVisitDuration() - { - unset($this->visit_duration); - } - - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setVisitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->visit_duration = $var; - - return $this; - } - - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - * @return float - */ - public function getTravelDistanceMeters() - { - return $this->travel_distance_meters; - } - - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - * @param float $var - * @return $this - */ - public function setTravelDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->travel_distance_meters = $var; - - return $this; - } - - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMaxLoads() - { - return $this->max_loads; - } - - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMaxLoads($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); - $this->max_loads = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php deleted file mode 100644 index 50b825aa8a7e..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursMetadata - */ -class BatchOptimizeToursMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php deleted file mode 100644 index 3c9fbf3f7c0d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursRequest - */ -class BatchOptimizeToursRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $model_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * @type array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $model_configs - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModelConfigs() - { - return $this->model_configs; - } - - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModelConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig::class); - $this->model_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php deleted file mode 100644 index 9f323a5cd726..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php +++ /dev/null @@ -1,162 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig - */ -class AsyncModelConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * @type \Google\Maps\RouteOptimization\V1\InputConfig $input_config - * Required. Information about the input model. - * @type \Google\Maps\RouteOptimization\V1\OutputConfig $output_config - * Required. The desired output location information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\RouteOptimization\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\RouteOptimization\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\RouteOptimization\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\RouteOptimization\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AsyncModelConfig::class, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest_AsyncModelConfig::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php deleted file mode 100644 index 2b0e02bf139a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursResponse - */ -class BatchOptimizeToursResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php deleted file mode 100644 index 500ac900d732..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php +++ /dev/null @@ -1,113 +0,0 @@ -google.maps.routeoptimization.v1.BreakRule - */ -class BreakRule extends \Google\Protobuf\Internal\Message -{ - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; - */ - private $break_requests; - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - */ - private $frequency_constraints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests - * Sequence of breaks. See the `BreakRequest` message. - * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreakRequests() - { - return $this->break_requests; - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; - * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreakRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest::class); - $this->break_requests = $arr; - - return $this; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrequencyConstraints() - { - return $this->frequency_constraints; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrequencyConstraints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint::class); - $this->frequency_constraints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php deleted file mode 100644 index 3defefe05194..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.maps.routeoptimization.v1.BreakRule.BreakRequest - */ -class BreakRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $earliest_start_time = null; - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $latest_start_time = null; - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $earliest_start_time - * Required. Lower bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Timestamp $latest_start_time - * Required. Upper bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Duration $min_duration - * Required. Minimum duration of the break. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestStartTime() - { - return $this->earliest_start_time; - } - - public function hasEarliestStartTime() - { - return isset($this->earliest_start_time); - } - - public function clearEarliestStartTime() - { - unset($this->earliest_start_time); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_start_time = $var; - - return $this; - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestStartTime() - { - return $this->latest_start_time; - } - - public function hasLatestStartTime() - { - return isset($this->latest_start_time); - } - - public function clearLatestStartTime() - { - unset($this->latest_start_time); - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_start_time = $var; - - return $this; - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinDuration() - { - return $this->min_duration; - } - - public function hasMinDuration() - { - return isset($this->min_duration); - } - - public function clearMinDuration() - { - unset($this->min_duration); - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakRequest::class, \Google\Maps\RouteOptimization\V1\BreakRule_BreakRequest::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php deleted file mode 100644 index 3a9cd80a9e6d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint - */ -class FrequencyConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_break_duration = null; - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_inter_break_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $min_break_duration - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * @type \Google\Protobuf\Duration $max_inter_break_duration - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBreakDuration() - { - return $this->min_break_duration; - } - - public function hasMinBreakDuration() - { - return isset($this->min_break_duration); - } - - public function clearMinBreakDuration() - { - unset($this->min_break_duration); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_break_duration = $var; - - return $this; - } - - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxInterBreakDuration() - { - return $this->max_inter_break_duration; - } - - public function hasMaxInterBreakDuration() - { - return isset($this->max_inter_break_duration); - } - - public function clearMaxInterBreakDuration() - { - unset($this->max_inter_break_duration); - } - - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxInterBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_inter_break_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FrequencyConstraint::class, \Google\Maps\RouteOptimization\V1\BreakRule_FrequencyConstraint::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php deleted file mode 100644 index 76303e93fb37..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php +++ /dev/null @@ -1,62 +0,0 @@ -google.maps.routeoptimization.v1.DataFormat - */ -class DataFormat -{ - /** - * Invalid value, format must not be UNSPECIFIED. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * JavaScript Object Notation. - * - * Generated from protobuf enum JSON = 1; - */ - const JSON = 1; - /** - * Protocol Buffers text format. See - * https://protobuf.dev/reference/protobuf/textformat-spec/ - * - * Generated from protobuf enum PROTO_TEXT = 2; - */ - const PROTO_TEXT = 2; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::JSON => 'JSON', - self::PROTO_TEXT => 'PROTO_TEXT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php deleted file mode 100644 index a2ec284f830a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php +++ /dev/null @@ -1,284 +0,0 @@ -google.maps.routeoptimization.v1.DistanceLimit - */ -class DistanceLimit extends \Google\Protobuf\Internal\Message -{ - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - */ - protected $max_meters = null; - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - */ - protected $soft_max_meters = null; - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - */ - protected $cost_per_kilometer_below_soft_max = null; - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - */ - protected $cost_per_kilometer_above_soft_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_meters - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * @type int|string $soft_max_meters - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * @type float $cost_per_kilometer_below_soft_max - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * @type float $cost_per_kilometer_above_soft_max - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - * @return int|string - */ - public function getMaxMeters() - { - return isset($this->max_meters) ? $this->max_meters : 0; - } - - public function hasMaxMeters() - { - return isset($this->max_meters); - } - - public function clearMaxMeters() - { - unset($this->max_meters); - } - - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - * @param int|string $var - * @return $this - */ - public function setMaxMeters($var) - { - GPBUtil::checkInt64($var); - $this->max_meters = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - * @return int|string - */ - public function getSoftMaxMeters() - { - return isset($this->soft_max_meters) ? $this->soft_max_meters : 0; - } - - public function hasSoftMaxMeters() - { - return isset($this->soft_max_meters); - } - - public function clearSoftMaxMeters() - { - unset($this->soft_max_meters); - } - - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - * @param int|string $var - * @return $this - */ - public function setSoftMaxMeters($var) - { - GPBUtil::checkInt64($var); - $this->soft_max_meters = $var; - - return $this; - } - - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - * @return float - */ - public function getCostPerKilometerBelowSoftMax() - { - return isset($this->cost_per_kilometer_below_soft_max) ? $this->cost_per_kilometer_below_soft_max : 0.0; - } - - public function hasCostPerKilometerBelowSoftMax() - { - return isset($this->cost_per_kilometer_below_soft_max); - } - - public function clearCostPerKilometerBelowSoftMax() - { - unset($this->cost_per_kilometer_below_soft_max); - } - - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - * @param float $var - * @return $this - */ - public function setCostPerKilometerBelowSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer_below_soft_max = $var; - - return $this; - } - - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - * @return float - */ - public function getCostPerKilometerAboveSoftMax() - { - return isset($this->cost_per_kilometer_above_soft_max) ? $this->cost_per_kilometer_above_soft_max : 0.0; - } - - public function hasCostPerKilometerAboveSoftMax() - { - return isset($this->cost_per_kilometer_above_soft_max); - } - - public function clearCostPerKilometerAboveSoftMax() - { - unset($this->cost_per_kilometer_above_soft_max); - } - - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerKilometerAboveSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer_above_soft_max = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php deleted file mode 100644 index 593d35570a86..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php +++ /dev/null @@ -1,68 +0,0 @@ -google.maps.routeoptimization.v1.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Storage URI. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. Google Cloud Storage URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Storage URI. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. Google Cloud Storage URI. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php deleted file mode 100644 index a4b7083b7252..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php +++ /dev/null @@ -1,71 +0,0 @@ -google.maps.routeoptimization.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php deleted file mode 100644 index bfb8197f0531..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php +++ /dev/null @@ -1,156 +0,0 @@ -google.maps.routeoptimization.v1.InjectedSolutionConstraint - */ -class InjectedSolutionConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - */ - private $routes; - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; - */ - private $skipped_shipments; - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - */ - private $constraint_relaxations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $constraint_relaxations - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->routes = $arr; - - return $this; - } - - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkippedShipments() - { - return $this->skipped_shipments; - } - - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; - * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkippedShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); - $this->skipped_shipments = $arr; - - return $this; - } - - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConstraintRelaxations() - { - return $this->constraint_relaxations; - } - - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConstraintRelaxations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation::class); - $this->constraint_relaxations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php deleted file mode 100644 index 9f6a431bd350..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php +++ /dev/null @@ -1,151 +0,0 @@ -google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation - */ -class ConstraintRelaxation extends \Google\Protobuf\Internal\Message -{ - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - */ - private $relaxations; - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - */ - private $vehicle_indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $relaxations - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * @type array|\Google\Protobuf\Internal\RepeatedField $vehicle_indices - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelaxations() - { - return $this->relaxations; - } - - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelaxations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation::class); - $this->relaxations = $arr; - - return $this; - } - - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVehicleIndices() - { - return $this->vehicle_indices; - } - - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->vehicle_indices = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConstraintRelaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php deleted file mode 100644 index f8cb219682a8..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php +++ /dev/null @@ -1,204 +0,0 @@ -= relaxations(i).threshold_time` AND - * * `j + 1 >= relaxations(i).threshold_visit_count` - * Similarly, the vehicle start is relaxed to `relaxations(i).level` if it - * satisfies: - * * `vehicle_start_time >= relaxations(i).threshold_time` AND - * * `relaxations(i).threshold_visit_count == 0` - * and the vehicle end is relaxed to `relaxations(i).level` if it satisfies: - * * `vehicle_end_time >= relaxations(i).threshold_time` AND - * * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count` - * To apply a relaxation level if a visit meets the `threshold_visit_count` - * OR the `threshold_time` add two `relaxations` with the same `level`: - * one with only `threshold_visit_count` set and the other with only - * `threshold_time` set. If a visit satisfies the conditions of multiple - * `relaxations`, the most relaxed level applies. As a result, from the - * vehicle start through the route visits in order to the vehicle end, the - * relaxation level becomes more relaxed: i.e., the relaxation level is - * non-decreasing as the route progresses. - * The timing and sequence of route visits that do not satisfy the - * threshold conditions of any `relaxations` are fully constrained - * and no visits may be inserted into these sequences. Also, if a - * vehicle start or end does not satisfy the conditions of any - * relaxation the time is fixed, unless the vehicle is empty. - * - * Generated from protobuf message google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation - */ -class Relaxation extends \Google\Protobuf\Internal\Message -{ - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - */ - protected $level = 0; - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - */ - protected $threshold_time = null; - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - */ - protected $threshold_visit_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $level - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * @type \Google\Protobuf\Timestamp $threshold_time - * The time at or after which the relaxation `level` may be applied. - * @type int $threshold_visit_count - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - * @return int - */ - public function getLevel() - { - return $this->level; - } - - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - * @param int $var - * @return $this - */ - public function setLevel($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation\Level::class); - $this->level = $var; - - return $this; - } - - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getThresholdTime() - { - return $this->threshold_time; - } - - public function hasThresholdTime() - { - return isset($this->threshold_time); - } - - public function clearThresholdTime() - { - unset($this->threshold_time); - } - - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setThresholdTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->threshold_time = $var; - - return $this; - } - - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - * @return int - */ - public function getThresholdVisitCount() - { - return $this->threshold_visit_count; - } - - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - * @param int $var - * @return $this - */ - public function setThresholdVisitCount($var) - { - GPBUtil::checkInt32($var); - $this->threshold_visit_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Relaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php deleted file mode 100644 index 718a0dba2366..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php +++ /dev/null @@ -1,83 +0,0 @@ -google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level - */ -class Level -{ - /** - * Implicit default relaxation level: no constraints are relaxed, - * i.e., all visits are fully constrained. - * This value must not be explicitly used in `level`. - * - * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; - */ - const LEVEL_UNSPECIFIED = 0; - /** - * Visit start times and vehicle start/end times will be relaxed, but - * each visit remains bound to the same vehicle and the visit sequence - * must be observed: no visit can be inserted between them or before - * them. - * - * Generated from protobuf enum RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; - */ - const RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; - /** - * Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence - * is also relaxed: visits can only be performed by this vehicle, but - * can potentially become unperformed. - * - * Generated from protobuf enum RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; - */ - const RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; - /** - * Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the - * vehicle is also relaxed: visits are completely free at or after the - * threshold time and can potentially become unperformed. - * - * Generated from protobuf enum RELAX_ALL_AFTER_THRESHOLD = 3; - */ - const RELAX_ALL_AFTER_THRESHOLD = 3; - - private static $valueToName = [ - self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', - self::RELAX_VISIT_TIMES_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AFTER_THRESHOLD', - self::RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD', - self::RELAX_ALL_AFTER_THRESHOLD => 'RELAX_ALL_AFTER_THRESHOLD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Level::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation_Level::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php deleted file mode 100644 index 1ce8d31e1dbd..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php +++ /dev/null @@ -1,110 +0,0 @@ -google.maps.routeoptimization.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The input data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_format = 0; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\GcsSource $gcs_source - * A Google Cloud Storage location. This must be a single object (file). - * @type int $data_format - * Required. The input data format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A Google Cloud Storage location. This must be a single object (file). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; - * @return \Google\Maps\RouteOptimization\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * A Google Cloud Storage location. This must be a single object (file). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; - * @param \Google\Maps\RouteOptimization\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Required. The input data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Required. The input data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php deleted file mode 100644 index fd6c1e3bb48d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php +++ /dev/null @@ -1,133 +0,0 @@ -google.maps.routeoptimization.v1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - */ - protected $lat_lng = null; - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - */ - protected $heading = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $lat_lng - * The waypoint's geographic coordinates. - * @type int $heading - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - * @return int - */ - public function getHeading() - { - return isset($this->heading) ? $this->heading : 0; - } - - public function hasHeading() - { - return isset($this->heading); - } - - public function clearHeading() - { - unset($this->heading); - } - - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - * @param int $var - * @return $this - */ - public function setHeading($var) - { - GPBUtil::checkInt32($var); - $this->heading = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php deleted file mode 100644 index a7a94c081cf6..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php +++ /dev/null @@ -1,1178 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursRequest - */ -class OptimizeToursRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - */ - protected $timeout = null; - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; - */ - protected $model = null; - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - */ - protected $solving_mode = 0; - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - */ - protected $search_mode = 0; - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; - */ - private $injected_first_solution_routes; - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - */ - protected $injected_solution_constraint = null; - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; - */ - private $refresh_details_routes; - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - */ - protected $interpret_injected_solutions_using_labels = false; - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - */ - protected $consider_road_traffic = false; - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - */ - protected $populate_polylines = false; - /** - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - */ - protected $populate_transition_polylines = false; - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - */ - protected $allow_large_deadline_despite_interruption_risk = false; - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - */ - protected $use_geodesic_distances = false; - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - */ - protected $geodesic_meters_per_second = null; - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - */ - protected $max_validation_errors = null; - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - */ - protected $label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * @type \Google\Protobuf\Duration $timeout - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * @type \Google\Maps\RouteOptimization\V1\ShipmentModel $model - * Shipment model to solve. - * @type int $solving_mode - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * @type int $search_mode - * Search mode used to solve the request. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $injected_first_solution_routes - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * @type \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $injected_solution_constraint - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $refresh_details_routes - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * @type bool $interpret_injected_solutions_using_labels - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * @type bool $consider_road_traffic - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * @type bool $populate_polylines - * If true, polylines will be populated in response `ShipmentRoute`s. - * @type bool $populate_transition_polylines - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * @type bool $allow_large_deadline_despite_interruption_risk - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * @type bool $use_geodesic_distances - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * @type float $geodesic_meters_per_second - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * @type int $max_validation_errors - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * @type string $label - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; - * @return \Google\Maps\RouteOptimization\V1\ShipmentModel|null - */ - public function getModel() - { - return $this->model; - } - - public function hasModel() - { - return isset($this->model); - } - - public function clearModel() - { - unset($this->model); - } - - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; - * @param \Google\Maps\RouteOptimization\V1\ShipmentModel $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentModel::class); - $this->model = $var; - - return $this; - } - - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - * @return int - */ - public function getSolvingMode() - { - return $this->solving_mode; - } - - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - * @param int $var - * @return $this - */ - public function setSolvingMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SolvingMode::class); - $this->solving_mode = $var; - - return $this; - } - - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - * @return int - */ - public function getSearchMode() - { - return $this->search_mode; - } - - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - * @param int $var - * @return $this - */ - public function setSearchMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SearchMode::class); - $this->search_mode = $var; - - return $this; - } - - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInjectedFirstSolutionRoutes() - { - return $this->injected_first_solution_routes; - } - - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInjectedFirstSolutionRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->injected_first_solution_routes = $arr; - - return $this; - } - - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - * @return \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint|null - */ - public function getInjectedSolutionConstraint() - { - return $this->injected_solution_constraint; - } - - public function hasInjectedSolutionConstraint() - { - return isset($this->injected_solution_constraint); - } - - public function clearInjectedSolutionConstraint() - { - unset($this->injected_solution_constraint); - } - - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - * @param \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $var - * @return $this - */ - public function setInjectedSolutionConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint::class); - $this->injected_solution_constraint = $var; - - return $this; - } - - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRefreshDetailsRoutes() - { - return $this->refresh_details_routes; - } - - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRefreshDetailsRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->refresh_details_routes = $arr; - - return $this; - } - - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - * @return bool - */ - public function getInterpretInjectedSolutionsUsingLabels() - { - return $this->interpret_injected_solutions_using_labels; - } - - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - * @param bool $var - * @return $this - */ - public function setInterpretInjectedSolutionsUsingLabels($var) - { - GPBUtil::checkBool($var); - $this->interpret_injected_solutions_using_labels = $var; - - return $this; - } - - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - * @return bool - */ - public function getConsiderRoadTraffic() - { - return $this->consider_road_traffic; - } - - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - * @param bool $var - * @return $this - */ - public function setConsiderRoadTraffic($var) - { - GPBUtil::checkBool($var); - $this->consider_road_traffic = $var; - - return $this; - } - - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - * @return bool - */ - public function getPopulatePolylines() - { - return $this->populate_polylines; - } - - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - * @param bool $var - * @return $this - */ - public function setPopulatePolylines($var) - { - GPBUtil::checkBool($var); - $this->populate_polylines = $var; - - return $this; - } - - /** - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - * @return bool - */ - public function getPopulateTransitionPolylines() - { - return $this->populate_transition_polylines; - } - - /** - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - * @param bool $var - * @return $this - */ - public function setPopulateTransitionPolylines($var) - { - GPBUtil::checkBool($var); - $this->populate_transition_polylines = $var; - - return $this; - } - - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - * @return bool - */ - public function getAllowLargeDeadlineDespiteInterruptionRisk() - { - return $this->allow_large_deadline_despite_interruption_risk; - } - - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - * @param bool $var - * @return $this - */ - public function setAllowLargeDeadlineDespiteInterruptionRisk($var) - { - GPBUtil::checkBool($var); - $this->allow_large_deadline_despite_interruption_risk = $var; - - return $this; - } - - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - * @return bool - */ - public function getUseGeodesicDistances() - { - return $this->use_geodesic_distances; - } - - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - * @param bool $var - * @return $this - */ - public function setUseGeodesicDistances($var) - { - GPBUtil::checkBool($var); - $this->use_geodesic_distances = $var; - - return $this; - } - - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - * @return float - */ - public function getGeodesicMetersPerSecond() - { - return isset($this->geodesic_meters_per_second) ? $this->geodesic_meters_per_second : 0.0; - } - - public function hasGeodesicMetersPerSecond() - { - return isset($this->geodesic_meters_per_second); - } - - public function clearGeodesicMetersPerSecond() - { - unset($this->geodesic_meters_per_second); - } - - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - * @param float $var - * @return $this - */ - public function setGeodesicMetersPerSecond($var) - { - GPBUtil::checkDouble($var); - $this->geodesic_meters_per_second = $var; - - return $this; - } - - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - * @return int - */ - public function getMaxValidationErrors() - { - return isset($this->max_validation_errors) ? $this->max_validation_errors : 0; - } - - public function hasMaxValidationErrors() - { - return isset($this->max_validation_errors); - } - - public function clearMaxValidationErrors() - { - unset($this->max_validation_errors); - } - - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - * @param int $var - * @return $this - */ - public function setMaxValidationErrors($var) - { - GPBUtil::checkInt32($var); - $this->max_validation_errors = $var; - - return $this; - } - - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php deleted file mode 100644 index 1933e8a6c82e..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode - */ -class SearchMode -{ - /** - * Unspecified search mode, equivalent to `RETURN_FAST`. - * - * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; - */ - const SEARCH_MODE_UNSPECIFIED = 0; - /** - * Stop the search after finding the first good solution. - * - * Generated from protobuf enum RETURN_FAST = 1; - */ - const RETURN_FAST = 1; - /** - * Spend all the available time to search for better solutions. - * - * Generated from protobuf enum CONSUME_ALL_AVAILABLE_TIME = 2; - */ - const CONSUME_ALL_AVAILABLE_TIME = 2; - - private static $valueToName = [ - self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', - self::RETURN_FAST => 'RETURN_FAST', - self::CONSUME_ALL_AVAILABLE_TIME => 'CONSUME_ALL_AVAILABLE_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SearchMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php deleted file mode 100644 index 33490075a243..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php +++ /dev/null @@ -1,84 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode - */ -class SolvingMode -{ - /** - * Solve the model. Warnings may be issued in - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]. - * - * Generated from protobuf enum DEFAULT_SOLVE = 0; - */ - const DEFAULT_SOLVE = 0; - /** - * Only validates the model without solving it: populates as many - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * as possible. - * - * Generated from protobuf enum VALIDATE_ONLY = 1; - */ - const VALIDATE_ONLY = 1; - /** - * Only populates - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * or - * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments], - * and doesn't actually solve the rest of the request (`status` and `routes` - * are unset in the response). - * If infeasibilities in `injected_solution_constraint` routes are detected - * they are populated in the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field and - * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments] - * is left empty. - * *IMPORTANT*: not all infeasible shipments are returned here, but only the - * ones that are detected as infeasible during preprocessing. - * - * Generated from protobuf enum DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; - */ - const DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; - - private static $valueToName = [ - self::DEFAULT_SOLVE => 'DEFAULT_SOLVE', - self::VALIDATE_ONLY => 'VALIDATE_ONLY', - self::DETECT_SOME_INFEASIBLE_SHIPMENTS => 'DETECT_SOME_INFEASIBLE_SHIPMENTS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SolvingMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SolvingMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php deleted file mode 100644 index 4933ce254730..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php +++ /dev/null @@ -1,243 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursResponse - */ -class OptimizeToursResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - */ - private $routes; - /** - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - */ - protected $request_label = ''; - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; - */ - private $skipped_shipments; - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; - */ - private $validation_errors; - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; - */ - protected $metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * @type string $request_label - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments - * The list of all shipments skipped. - * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * @type \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $metrics - * Duration, distance and usage metrics for this solution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->routes = $arr; - - return $this; - } - - /** - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - * @return string - */ - public function getRequestLabel() - { - return $this->request_label; - } - - /** - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - * @param string $var - * @return $this - */ - public function setRequestLabel($var) - { - GPBUtil::checkString($var, True); - $this->request_label = $var; - - return $this; - } - - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkippedShipments() - { - return $this->skipped_shipments; - } - - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; - * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkippedShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); - $this->skipped_shipments = $arr; - - return $this; - } - - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidationErrors() - { - return $this->validation_errors; - } - - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; - * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidationErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError::class); - $this->validation_errors = $arr; - - return $this; - } - - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; - * @return \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; - * @param \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics::class); - $this->metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php deleted file mode 100644 index 88e8bbb1cba8..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php +++ /dev/null @@ -1,372 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics - */ -class Metrics extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - */ - protected $aggregated_route_metrics = null; - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - */ - protected $skipped_mandatory_shipment_count = 0; - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - */ - protected $used_vehicle_count = 0; - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - */ - protected $earliest_vehicle_start_time = null; - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - */ - protected $latest_vehicle_end_time = null; - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - */ - private $costs; - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - */ - protected $total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $aggregated_route_metrics - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * @type int $skipped_mandatory_shipment_count - * Number of mandatory shipments skipped. - * @type int $used_vehicle_count - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * @type \Google\Protobuf\Timestamp $earliest_vehicle_start_time - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * @type \Google\Protobuf\Timestamp $latest_vehicle_end_time - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * @type array|\Google\Protobuf\Internal\MapField $costs - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * @type float $total_cost - * Total cost of the solution. The sum of all values in the costs map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null - */ - public function getAggregatedRouteMetrics() - { - return $this->aggregated_route_metrics; - } - - public function hasAggregatedRouteMetrics() - { - return isset($this->aggregated_route_metrics); - } - - public function clearAggregatedRouteMetrics() - { - unset($this->aggregated_route_metrics); - } - - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var - * @return $this - */ - public function setAggregatedRouteMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); - $this->aggregated_route_metrics = $var; - - return $this; - } - - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - * @return int - */ - public function getSkippedMandatoryShipmentCount() - { - return $this->skipped_mandatory_shipment_count; - } - - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - * @param int $var - * @return $this - */ - public function setSkippedMandatoryShipmentCount($var) - { - GPBUtil::checkInt32($var); - $this->skipped_mandatory_shipment_count = $var; - - return $this; - } - - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - * @return int - */ - public function getUsedVehicleCount() - { - return $this->used_vehicle_count; - } - - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - * @param int $var - * @return $this - */ - public function setUsedVehicleCount($var) - { - GPBUtil::checkInt32($var); - $this->used_vehicle_count = $var; - - return $this; - } - - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestVehicleStartTime() - { - return $this->earliest_vehicle_start_time; - } - - public function hasEarliestVehicleStartTime() - { - return isset($this->earliest_vehicle_start_time); - } - - public function clearEarliestVehicleStartTime() - { - unset($this->earliest_vehicle_start_time); - } - - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestVehicleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_vehicle_start_time = $var; - - return $this; - } - - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestVehicleEndTime() - { - return $this->latest_vehicle_end_time; - } - - public function hasLatestVehicleEndTime() - { - return isset($this->latest_vehicle_end_time); - } - - public function clearLatestVehicleEndTime() - { - unset($this->latest_vehicle_end_time); - } - - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestVehicleEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_vehicle_end_time = $var; - - return $this; - } - - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCosts() - { - return $this->costs; - } - - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCosts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs = $arr; - - return $this; - } - - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - * @return float - */ - public function getTotalCost() - { - return $this->total_cost; - } - - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - * @param float $var - * @return $this - */ - public function setTotalCost($var) - { - GPBUtil::checkDouble($var); - $this->total_cost = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metrics::class, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse_Metrics::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php deleted file mode 100644 index 8f2ad51ee288..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php +++ /dev/null @@ -1,316 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursValidationError - */ -class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message -{ - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * - * Generated from protobuf field int32 code = 1; - */ - protected $code = 0; - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - */ - private $fields; - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - */ - protected $error_message = ''; - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - */ - protected $offending_values = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * @type string $display_name - * The error display name. - * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * @type string $error_message - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * @type string $offending_values - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * - * Generated from protobuf field int32 code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * - * Generated from protobuf field int32 code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkInt32($var); - $this->code = $var; - - return $this; - } - - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); - $this->fields = $arr; - - return $this; - } - - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - * @return string - */ - public function getOffendingValues() - { - return $this->offending_values; - } - - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - * @param string $var - * @return $this - */ - public function setOffendingValues($var) - { - GPBUtil::checkString($var, True); - $this->offending_values = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php deleted file mode 100644 index 0956451618ea..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php +++ /dev/null @@ -1,197 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - */ - protected $sub_field = null; - protected $index_or_key; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the field, e.g., "vehicles". - * @type int $index - * Index of the field if repeated. - * @type string $key - * Key if the field is a map. - * @type \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $sub_field - * Recursively nested sub-field, if needed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Index of the field if repeated. - * - * Generated from protobuf field int32 index = 2; - * @return int - */ - public function getIndex() - { - return $this->readOneof(2); - } - - public function hasIndex() - { - return $this->hasOneof(2); - } - - /** - * Index of the field if repeated. - * - * Generated from protobuf field int32 index = 2; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Key if the field is a map. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->readOneof(4); - } - - public function hasKey() - { - return $this->hasOneof(4); - } - - /** - * Key if the field is a map. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - * @return \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference|null - */ - public function getSubField() - { - return $this->sub_field; - } - - public function hasSubField() - { - return isset($this->sub_field); - } - - public function clearSubField() - { - unset($this->sub_field); - } - - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - * @param \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $var - * @return $this - */ - public function setSubField($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); - $this->sub_field = $var; - - return $this; - } - - /** - * @return string - */ - public function getIndexOrKey() - { - return $this->whichOneof("index_or_key"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldReference::class, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError_FieldReference::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php deleted file mode 100644 index 7ed7e0a1d93f..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php +++ /dev/null @@ -1,111 +0,0 @@ -google.maps.routeoptimization.v1.OutputConfig - */ -class OutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The output data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_format = 0; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\GcsDestination $gcs_destination - * The Google Cloud Storage location to write the output to. - * @type int $data_format - * Required. The output data format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to write the output to. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; - * @return \Google\Maps\RouteOptimization\V1\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * The Google Cloud Storage location to write the output to. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; - * @param \Google\Maps\RouteOptimization\V1\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Required. The output data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Required. The output data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php deleted file mode 100644 index 941420fd652c..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php +++ /dev/null @@ -1,204 +0,0 @@ -google.maps.routeoptimization.v1.RouteModifiers - */ -class RouteModifiers extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - */ - protected $avoid_tolls = false; - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - */ - protected $avoid_highways = false; - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - */ - protected $avoid_ferries = false; - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $avoid_indoor = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $avoid_tolls - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * @type bool $avoid_highways - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * @type bool $avoid_ferries - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * @type bool $avoid_indoor - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - * @return bool - */ - public function getAvoidTolls() - { - return $this->avoid_tolls; - } - - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - * @param bool $var - * @return $this - */ - public function setAvoidTolls($var) - { - GPBUtil::checkBool($var); - $this->avoid_tolls = $var; - - return $this; - } - - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - * @return bool - */ - public function getAvoidHighways() - { - return $this->avoid_highways; - } - - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - * @param bool $var - * @return $this - */ - public function setAvoidHighways($var) - { - GPBUtil::checkBool($var); - $this->avoid_highways = $var; - - return $this; - } - - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - * @return bool - */ - public function getAvoidFerries() - { - return $this->avoid_ferries; - } - - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - * @param bool $var - * @return $this - */ - public function setAvoidFerries($var) - { - GPBUtil::checkBool($var); - $this->avoid_ferries = $var; - - return $this; - } - - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAvoidIndoor() - { - return $this->avoid_indoor; - } - - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAvoidIndoor($var) - { - GPBUtil::checkBool($var); - $this->avoid_indoor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php deleted file mode 100644 index c3de173e6cc8..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php +++ /dev/null @@ -1,841 +0,0 @@ -google.maps.routeoptimization.v1.Shipment - */ -class Shipment extends \Google\Protobuf\Internal\Message -{ - /** - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 16; - */ - protected $display_name = ''; - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; - */ - private $pickups; - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; - */ - private $deliveries; - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - */ - private $load_demands; - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - */ - protected $penalty_cost = null; - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - */ - private $allowed_vehicle_indices; - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - */ - private $costs_per_vehicle; - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - */ - private $costs_per_vehicle_indices; - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - */ - protected $pickup_to_delivery_relative_detour_limit = null; - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - */ - protected $pickup_to_delivery_absolute_detour_limit = null; - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - */ - protected $pickup_to_delivery_time_limit = null; - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - */ - protected $shipment_type = ''; - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - */ - protected $label = ''; - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - */ - protected $ignore = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $pickups - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $deliveries - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * @type float $penalty_cost - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_vehicle_indices - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle_indices - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * @type float $pickup_to_delivery_relative_detour_limit - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * @type \Google\Protobuf\Duration $pickup_to_delivery_absolute_detour_limit - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * @type \Google\Protobuf\Duration $pickup_to_delivery_time_limit - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * @type string $shipment_type - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * @type string $label - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * @type bool $ignore - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 16; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 16; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPickups() - { - return $this->pickups; - } - - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; - * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPickups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); - $this->pickups = $arr; - - return $this; - } - - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeliveries() - { - return $this->deliveries; - } - - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; - * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeliveries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); - $this->deliveries = $arr; - - return $this; - } - - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - * @return float - */ - public function getPenaltyCost() - { - return isset($this->penalty_cost) ? $this->penalty_cost : 0.0; - } - - public function hasPenaltyCost() - { - return isset($this->penalty_cost); - } - - public function clearPenaltyCost() - { - unset($this->penalty_cost); - } - - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - * @param float $var - * @return $this - */ - public function setPenaltyCost($var) - { - GPBUtil::checkDouble($var); - $this->penalty_cost = $var; - - return $this; - } - - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedVehicleIndices() - { - return $this->allowed_vehicle_indices; - } - - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->allowed_vehicle_indices = $arr; - - return $this; - } - - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCostsPerVehicle() - { - return $this->costs_per_vehicle; - } - - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCostsPerVehicle($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs_per_vehicle = $arr; - - return $this; - } - - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCostsPerVehicleIndices() - { - return $this->costs_per_vehicle_indices; - } - - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCostsPerVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->costs_per_vehicle_indices = $arr; - - return $this; - } - - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - * @return float - */ - public function getPickupToDeliveryRelativeDetourLimit() - { - return isset($this->pickup_to_delivery_relative_detour_limit) ? $this->pickup_to_delivery_relative_detour_limit : 0.0; - } - - public function hasPickupToDeliveryRelativeDetourLimit() - { - return isset($this->pickup_to_delivery_relative_detour_limit); - } - - public function clearPickupToDeliveryRelativeDetourLimit() - { - unset($this->pickup_to_delivery_relative_detour_limit); - } - - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - * @param float $var - * @return $this - */ - public function setPickupToDeliveryRelativeDetourLimit($var) - { - GPBUtil::checkDouble($var); - $this->pickup_to_delivery_relative_detour_limit = $var; - - return $this; - } - - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getPickupToDeliveryAbsoluteDetourLimit() - { - return $this->pickup_to_delivery_absolute_detour_limit; - } - - public function hasPickupToDeliveryAbsoluteDetourLimit() - { - return isset($this->pickup_to_delivery_absolute_detour_limit); - } - - public function clearPickupToDeliveryAbsoluteDetourLimit() - { - unset($this->pickup_to_delivery_absolute_detour_limit); - } - - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPickupToDeliveryAbsoluteDetourLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->pickup_to_delivery_absolute_detour_limit = $var; - - return $this; - } - - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getPickupToDeliveryTimeLimit() - { - return $this->pickup_to_delivery_time_limit; - } - - public function hasPickupToDeliveryTimeLimit() - { - return isset($this->pickup_to_delivery_time_limit); - } - - public function clearPickupToDeliveryTimeLimit() - { - unset($this->pickup_to_delivery_time_limit); - } - - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPickupToDeliveryTimeLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->pickup_to_delivery_time_limit = $var; - - return $this; - } - - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - * @return string - */ - public function getShipmentType() - { - return $this->shipment_type; - } - - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - * @param string $var - * @return $this - */ - public function setShipmentType($var) - { - GPBUtil::checkString($var, True); - $this->shipment_type = $var; - - return $this; - } - - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - * @return bool - */ - public function getIgnore() - { - return $this->ignore; - } - - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - * @param bool $var - * @return $this - */ - public function setIgnore($var) - { - GPBUtil::checkBool($var); - $this->ignore = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php deleted file mode 100644 index dec1b28584e2..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php +++ /dev/null @@ -1,81 +0,0 @@ -google.maps.routeoptimization.v1.Shipment.Load - */ -class Load extends \Google\Protobuf\Internal\Message -{ - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - */ - protected $amount = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $amount - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - * @return int|string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - * @param int|string $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkInt64($var); - $this->amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Load::class, \Google\Maps\RouteOptimization\V1\Shipment_Load::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php deleted file mode 100644 index 518eb8d4c60e..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php +++ /dev/null @@ -1,615 +0,0 @@ -google.maps.routeoptimization.v1.Shipment.VisitRequest - */ -class VisitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - */ - protected $arrival_location = null; - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; - */ - protected $arrival_waypoint = null; - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - */ - protected $departure_location = null; - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; - */ - protected $departure_waypoint = null; - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - */ - private $tags; - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; - */ - private $time_windows; - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - */ - protected $duration = null; - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - */ - protected $cost = 0.0; - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - */ - private $load_demands; - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - */ - private $visit_types; - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - */ - protected $label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $arrival_location - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $arrival_waypoint - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * @type \Google\Type\LatLng $departure_location - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $departure_waypoint - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $time_windows - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * @type \Google\Protobuf\Duration $duration - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * @type float $cost - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * @type array|\Google\Protobuf\Internal\RepeatedField $visit_types - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * @type string $label - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - * @return \Google\Type\LatLng|null - */ - public function getArrivalLocation() - { - return $this->arrival_location; - } - - public function hasArrivalLocation() - { - return isset($this->arrival_location); - } - - public function clearArrivalLocation() - { - unset($this->arrival_location); - } - - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setArrivalLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->arrival_location = $var; - - return $this; - } - - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getArrivalWaypoint() - { - return $this->arrival_waypoint; - } - - public function hasArrivalWaypoint() - { - return isset($this->arrival_waypoint); - } - - public function clearArrivalWaypoint() - { - unset($this->arrival_waypoint); - } - - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setArrivalWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->arrival_waypoint = $var; - - return $this; - } - - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - * @return \Google\Type\LatLng|null - */ - public function getDepartureLocation() - { - return $this->departure_location; - } - - public function hasDepartureLocation() - { - return isset($this->departure_location); - } - - public function clearDepartureLocation() - { - unset($this->departure_location); - } - - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setDepartureLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->departure_location = $var; - - return $this; - } - - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getDepartureWaypoint() - { - return $this->departure_waypoint; - } - - public function hasDepartureWaypoint() - { - return isset($this->departure_waypoint); - } - - public function clearDepartureWaypoint() - { - unset($this->departure_waypoint); - } - - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setDepartureWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->departure_waypoint = $var; - - return $this; - } - - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimeWindows() - { - return $this->time_windows; - } - - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; - * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); - $this->time_windows = $arr; - - return $this; - } - - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - * @return float - */ - public function getCost() - { - return $this->cost; - } - - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkDouble($var); - $this->cost = $var; - - return $this; - } - - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisitTypes() - { - return $this->visit_types; - } - - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisitTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->visit_types = $arr; - - return $this; - } - - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VisitRequest::class, \Google\Maps\RouteOptimization\V1\Shipment_VisitRequest::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php deleted file mode 100644 index 34ac5c5b5eb4..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php +++ /dev/null @@ -1,1010 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel - */ -class ShipmentModel extends \Google\Protobuf\Internal\Message -{ - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; - */ - private $shipments; - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; - */ - private $vehicles; - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - */ - protected $max_active_vehicles = null; - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - */ - protected $global_start_time = null; - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - */ - protected $global_end_time = null; - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - */ - protected $global_duration_cost_per_hour = 0.0; - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - */ - private $duration_distance_matrices; - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - */ - private $duration_distance_matrix_src_tags; - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - */ - private $duration_distance_matrix_dst_tags; - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; - */ - private $transition_attributes; - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - */ - private $shipment_type_incompatibilities; - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - */ - private $shipment_type_requirements; - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - */ - private $precedence_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $shipments - * Set of shipments which must be performed in the model. - * @type array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $vehicles - * Set of vehicles which can be used to perform visits. - * @type int $max_active_vehicles - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * @type \Google\Protobuf\Timestamp $global_start_time - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * @type \Google\Protobuf\Timestamp $global_end_time - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * @type float $global_duration_cost_per_hour - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrices - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_src_tags - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_dst_tags - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * @type array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $transition_attributes - * Transition attributes added to the model. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $shipment_type_incompatibilities - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $shipment_type_requirements - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $precedence_rules - * Set of precedence rules which must be enforced in the model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipments() - { - return $this->shipments; - } - - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; - * @param array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment::class); - $this->shipments = $arr; - - return $this; - } - - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVehicles() - { - return $this->vehicles; - } - - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; - * @param array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVehicles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle::class); - $this->vehicles = $arr; - - return $this; - } - - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - * @return int - */ - public function getMaxActiveVehicles() - { - return isset($this->max_active_vehicles) ? $this->max_active_vehicles : 0; - } - - public function hasMaxActiveVehicles() - { - return isset($this->max_active_vehicles); - } - - public function clearMaxActiveVehicles() - { - unset($this->max_active_vehicles); - } - - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - * @param int $var - * @return $this - */ - public function setMaxActiveVehicles($var) - { - GPBUtil::checkInt32($var); - $this->max_active_vehicles = $var; - - return $this; - } - - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGlobalStartTime() - { - return $this->global_start_time; - } - - public function hasGlobalStartTime() - { - return isset($this->global_start_time); - } - - public function clearGlobalStartTime() - { - unset($this->global_start_time); - } - - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGlobalStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->global_start_time = $var; - - return $this; - } - - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGlobalEndTime() - { - return $this->global_end_time; - } - - public function hasGlobalEndTime() - { - return isset($this->global_end_time); - } - - public function clearGlobalEndTime() - { - unset($this->global_end_time); - } - - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGlobalEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->global_end_time = $var; - - return $this; - } - - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - * @return float - */ - public function getGlobalDurationCostPerHour() - { - return $this->global_duration_cost_per_hour; - } - - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - * @param float $var - * @return $this - */ - public function setGlobalDurationCostPerHour($var) - { - GPBUtil::checkDouble($var); - $this->global_duration_cost_per_hour = $var; - - return $this; - } - - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrices() - { - return $this->duration_distance_matrices; - } - - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix::class); - $this->duration_distance_matrices = $arr; - - return $this; - } - - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrixSrcTags() - { - return $this->duration_distance_matrix_src_tags; - } - - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrixSrcTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->duration_distance_matrix_src_tags = $arr; - - return $this; - } - - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrixDstTags() - { - return $this->duration_distance_matrix_dst_tags; - } - - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrixDstTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->duration_distance_matrix_dst_tags = $arr; - - return $this; - } - - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionAttributes() - { - return $this->transition_attributes; - } - - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; - * @param array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TransitionAttributes::class); - $this->transition_attributes = $arr; - - return $this; - } - - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipmentTypeIncompatibilities() - { - return $this->shipment_type_incompatibilities; - } - - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipmentTypeIncompatibilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility::class); - $this->shipment_type_incompatibilities = $arr; - - return $this; - } - - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipmentTypeRequirements() - { - return $this->shipment_type_requirements; - } - - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipmentTypeRequirements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement::class); - $this->shipment_type_requirements = $arr; - - return $this; - } - - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrecedenceRules() - { - return $this->precedence_rules; - } - - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrecedenceRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule::class); - $this->precedence_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php deleted file mode 100644 index 5bc080ab9ce0..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php +++ /dev/null @@ -1,137 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix - */ -class DurationDistanceMatrix extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - */ - private $rows; - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - */ - protected $vehicle_start_tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $rows - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * @type string $vehicle_start_tag - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRows() - { - return $this->rows; - } - - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row::class); - $this->rows = $arr; - - return $this; - } - - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - * @return string - */ - public function getVehicleStartTag() - { - return $this->vehicle_start_tag; - } - - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - * @param string $var - * @return $this - */ - public function setVehicleStartTag($var) - { - GPBUtil::checkString($var, True); - $this->vehicle_start_tag = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DurationDistanceMatrix::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php deleted file mode 100644 index ade7fdceddc1..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php +++ /dev/null @@ -1,116 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row - */ -class Row extends \Google\Protobuf\Internal\Message -{ - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - */ - private $durations; - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - */ - private $meters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $durations - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * @type array|\Google\Protobuf\Internal\RepeatedField $meters - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurations() - { - return $this->durations; - } - - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->durations = $arr; - - return $this; - } - - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeters() - { - return $this->meters; - } - - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->meters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Row::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix_Row::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php deleted file mode 100644 index d83e3791b007..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php +++ /dev/null @@ -1,243 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule - */ -class PrecedenceRule extends \Google\Protobuf\Internal\Message -{ - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - */ - protected $first_index = null; - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - */ - protected $first_is_delivery = false; - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - */ - protected $second_index = null; - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - */ - protected $second_is_delivery = false; - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - */ - protected $offset_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $first_index - * Shipment index of the "first" event. This field must be specified. - * @type bool $first_is_delivery - * Indicates if the "first" event is a delivery. - * @type int $second_index - * Shipment index of the "second" event. This field must be specified. - * @type bool $second_is_delivery - * Indicates if the "second" event is a delivery. - * @type \Google\Protobuf\Duration $offset_duration - * The offset between the "first" and "second" event. It can be negative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - * @return int - */ - public function getFirstIndex() - { - return isset($this->first_index) ? $this->first_index : 0; - } - - public function hasFirstIndex() - { - return isset($this->first_index); - } - - public function clearFirstIndex() - { - unset($this->first_index); - } - - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - * @param int $var - * @return $this - */ - public function setFirstIndex($var) - { - GPBUtil::checkInt32($var); - $this->first_index = $var; - - return $this; - } - - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - * @return bool - */ - public function getFirstIsDelivery() - { - return $this->first_is_delivery; - } - - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - * @param bool $var - * @return $this - */ - public function setFirstIsDelivery($var) - { - GPBUtil::checkBool($var); - $this->first_is_delivery = $var; - - return $this; - } - - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - * @return int - */ - public function getSecondIndex() - { - return isset($this->second_index) ? $this->second_index : 0; - } - - public function hasSecondIndex() - { - return isset($this->second_index); - } - - public function clearSecondIndex() - { - unset($this->second_index); - } - - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - * @param int $var - * @return $this - */ - public function setSecondIndex($var) - { - GPBUtil::checkInt32($var); - $this->second_index = $var; - - return $this; - } - - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - * @return bool - */ - public function getSecondIsDelivery() - { - return $this->second_is_delivery; - } - - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - * @param bool $var - * @return $this - */ - public function setSecondIsDelivery($var) - { - GPBUtil::checkBool($var); - $this->second_is_delivery = $var; - - return $this; - } - - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getOffsetDuration() - { - return $this->offset_duration; - } - - public function hasOffsetDuration() - { - return isset($this->offset_duration); - } - - public function clearOffsetDuration() - { - unset($this->offset_duration); - } - - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setOffsetDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->offset_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrecedenceRule::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_PrecedenceRule::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php deleted file mode 100644 index 3c191d29cca6..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php +++ /dev/null @@ -1,706 +0,0 @@ - - * | TRANSITION[i] | VISIT[i] | - * | | | - * | * TRAVEL: the vehicle moves from | PERFORM the visit: | - * | VISIT[i-1].departure_location to | | - * | VISIT[i].arrival_location, which | * Spend some time: | - * | takes a given travel duration | the "visit duration". | - * | and distance | | - * | | * Load or unload | - * | * BREAKS: the driver may have | some quantities from the | - * | breaks (e.g. lunch break). | vehicle: the "demand". | - * | | | - * | * WAIT: the driver/vehicle does | | - * | nothing. This can happen for | | - * | many reasons, for example when | | - * | the vehicle reaches the next | | - * | event's destination before the | | - * | start of its time window | | - * | | | - * | * DELAY: *right before* the next | | - * | arrival. E.g. the vehicle and/or | | - * | driver spends time unloading. | | - * | | | - * ---+-------------------------------------+-----------------------------+--> - * ^ ^ ^ - * V[i-1].end V[i].start V[i].end - * ``` - * Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged - * during a transition. - * * They don't overlap. - * * The DELAY is unique and *must* be a contiguous period of time right - * before the next visit (or vehicle end). Thus, it suffice to know the - * delay duration to know its start and end time. - * * The BREAKS are contiguous, non-overlapping periods of time. The - * response specifies the start time and duration of each break. - * * TRAVEL and WAIT are "preemptable": they can be interrupted several times - * during this transition. Clients can assume that travel happens "as soon as - * possible" and that "wait" fills the remaining time. - * A (complex) example: - * ``` - * TRANSITION[i] - * --++-----+-----------------------------------------------------------++--> - * || | | | | | | || - * || T | B | T | | B | | D || - * || r | r | r | W | r | W | e || - * || a | e | a | a | e | a | l || - * || v | a | v | i | a | i | a || - * || e | k | e | t | k | t | y || - * || l | | l | | | | || - * || | | | | | | || - * --++-----------------------------------------------------------------++--> - * ``` - * - * Generated from protobuf message google.maps.routeoptimization.v1.ShipmentRoute - */ -class ShipmentRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - */ - protected $vehicle_index = 0; - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - */ - protected $vehicle_label = ''; - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - */ - protected $vehicle_start_time = null; - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - */ - protected $vehicle_end_time = null; - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; - */ - private $visits; - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; - */ - private $transitions; - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - */ - protected $has_traffic_infeasibilities = false; - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - */ - protected $route_polyline = null; - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; - */ - private $breaks; - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; - */ - protected $metrics = null; - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - */ - private $route_costs; - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - */ - protected $route_total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $vehicle_index - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * @type string $vehicle_label - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * @type \Google\Protobuf\Timestamp $vehicle_start_time - * Time at which the vehicle starts its route. - * @type \Google\Protobuf\Timestamp $vehicle_end_time - * Time at which the vehicle finishes its route. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $visits - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions - * Ordered list of transitions for the route. - * @type bool $has_traffic_infeasibilities - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $breaks - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $metrics - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * @type array|\Google\Protobuf\Internal\MapField $route_costs - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * @type float $route_total_cost - * Total cost of the route. The sum of all costs in the cost map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - * @return int - */ - public function getVehicleIndex() - { - return $this->vehicle_index; - } - - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - * @param int $var - * @return $this - */ - public function setVehicleIndex($var) - { - GPBUtil::checkInt32($var); - $this->vehicle_index = $var; - - return $this; - } - - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - * @return string - */ - public function getVehicleLabel() - { - return $this->vehicle_label; - } - - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - * @param string $var - * @return $this - */ - public function setVehicleLabel($var) - { - GPBUtil::checkString($var, True); - $this->vehicle_label = $var; - - return $this; - } - - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVehicleStartTime() - { - return $this->vehicle_start_time; - } - - public function hasVehicleStartTime() - { - return isset($this->vehicle_start_time); - } - - public function clearVehicleStartTime() - { - unset($this->vehicle_start_time); - } - - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVehicleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->vehicle_start_time = $var; - - return $this; - } - - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVehicleEndTime() - { - return $this->vehicle_end_time; - } - - public function hasVehicleEndTime() - { - return isset($this->vehicle_end_time); - } - - public function clearVehicleEndTime() - { - unset($this->vehicle_end_time); - } - - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVehicleEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->vehicle_end_time = $var; - - return $this; - } - - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisits() - { - return $this->visits; - } - - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit::class); - $this->visits = $arr; - - return $this; - } - - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitions() - { - return $this->transitions; - } - - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition::class); - $this->transitions = $arr; - - return $this; - } - - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - * @return bool - */ - public function getHasTrafficInfeasibilities() - { - return $this->has_traffic_infeasibilities; - } - - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - * @param bool $var - * @return $this - */ - public function setHasTrafficInfeasibilities($var) - { - GPBUtil::checkBool($var); - $this->has_traffic_infeasibilities = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreaks() - { - return $this->breaks; - } - - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak::class); - $this->breaks = $arr; - - return $this; - } - - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; - * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; - * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); - $this->metrics = $var; - - return $this; - } - - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getRouteCosts() - { - return $this->route_costs; - } - - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setRouteCosts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->route_costs = $arr; - - return $this; - } - - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - * @return float - */ - public function getRouteTotalCost() - { - return $this->route_total_cost; - } - - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - * @param float $var - * @return $this - */ - public function setRouteTotalCost($var) - { - GPBUtil::checkDouble($var); - $this->route_total_cost = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php deleted file mode 100644 index a3aecf3c5212..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php +++ /dev/null @@ -1,73 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline - */ -class EncodedPolyline extends \Google\Protobuf\Internal\Message -{ - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - */ - protected $points = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $points - * String representing encoded points of the polyline. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - * @return string - */ - public function getPoints() - { - return $this->points; - } - - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - * @param string $var - * @return $this - */ - public function setPoints($var) - { - GPBUtil::checkString($var, True); - $this->points = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncodedPolyline::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_EncodedPolyline::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php deleted file mode 100644 index e05a14f991b9..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php +++ /dev/null @@ -1,124 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.Break - */ -class PBBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Start time of a break. - * @type \Google\Protobuf\Duration $duration - * Duration of a break. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBBreak::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Break::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php deleted file mode 100644 index e2c4c53592bf..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php +++ /dev/null @@ -1,639 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.Transition - */ -class Transition extends \Google\Protobuf\Internal\Message -{ - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - */ - protected $travel_duration = null; - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - */ - protected $travel_distance_meters = 0.0; - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - */ - protected $traffic_info_unavailable = false; - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - */ - protected $delay_duration = null; - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - */ - protected $break_duration = null; - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - */ - protected $wait_duration = null; - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - */ - protected $total_duration = null; - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - */ - protected $start_time = null; - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - */ - protected $route_polyline = null; - /** - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $route_token = ''; - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - */ - private $vehicle_loads; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $travel_duration - * Travel duration during this transition. - * @type float $travel_distance_meters - * Distance traveled during the transition. - * @type bool $traffic_info_unavailable - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * @type \Google\Protobuf\Duration $delay_duration - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * @type \Google\Protobuf\Duration $break_duration - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * @type \Google\Protobuf\Duration $wait_duration - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * @type \Google\Protobuf\Duration $total_duration - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of this transition. - * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * @type string $route_token - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - * @return float - */ - public function getTravelDistanceMeters() - { - return $this->travel_distance_meters; - } - - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - * @param float $var - * @return $this - */ - public function setTravelDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->travel_distance_meters = $var; - - return $this; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @return bool - */ - public function getTrafficInfoUnavailable() - { - return $this->traffic_info_unavailable; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @param bool $var - * @return $this - */ - public function setTrafficInfoUnavailable($var) - { - GPBUtil::checkBool($var); - $this->traffic_info_unavailable = $var; - - return $this; - } - - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDelayDuration() - { - return $this->delay_duration; - } - - public function hasDelayDuration() - { - return isset($this->delay_duration); - } - - public function clearDelayDuration() - { - unset($this->delay_duration); - } - - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelayDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay_duration = $var; - - return $this; - } - - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getBreakDuration() - { - return $this->break_duration; - } - - public function hasBreakDuration() - { - return isset($this->break_duration); - } - - public function clearBreakDuration() - { - unset($this->break_duration); - } - - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->break_duration = $var; - - return $this; - } - - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getWaitDuration() - { - return $this->wait_duration; - } - - public function hasWaitDuration() - { - return isset($this->wait_duration); - } - - public function clearWaitDuration() - { - unset($this->wait_duration); - } - - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->wait_duration = $var; - - return $this; - } - - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - - /** - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRouteToken() - { - return $this->route_token; - } - - /** - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRouteToken($var) - { - GPBUtil::checkString($var, True); - $this->route_token = $var; - - return $this; - } - - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVehicleLoads() - { - return $this->vehicle_loads; - } - - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVehicleLoads($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); - $this->vehicle_loads = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Transition::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Transition::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php deleted file mode 100644 index cb8378f1af45..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php +++ /dev/null @@ -1,80 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad - */ -class VehicleLoad extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - */ - protected $amount = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $amount - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - * @return int|string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - * @param int|string $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkInt64($var); - $this->amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VehicleLoad::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_VehicleLoad::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php deleted file mode 100644 index a863ea8092cb..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php +++ /dev/null @@ -1,433 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.Visit - */ -class Visit extends \Google\Protobuf\Internal\Message -{ - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - */ - protected $shipment_index = 0; - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - */ - protected $is_pickup = false; - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - */ - protected $visit_request_index = 0; - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - */ - private $load_demands; - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - */ - protected $detour = null; - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - */ - protected $shipment_label = ''; - /** - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - */ - protected $visit_label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $shipment_index - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * @type bool $is_pickup - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * @type int $visit_request_index - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * @type \Google\Protobuf\Timestamp $start_time - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * @type \Google\Protobuf\Duration $detour - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * @type string $shipment_label - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * @type string $visit_label - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - * @return int - */ - public function getShipmentIndex() - { - return $this->shipment_index; - } - - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - * @param int $var - * @return $this - */ - public function setShipmentIndex($var) - { - GPBUtil::checkInt32($var); - $this->shipment_index = $var; - - return $this; - } - - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - * @return bool - */ - public function getIsPickup() - { - return $this->is_pickup; - } - - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - * @param bool $var - * @return $this - */ - public function setIsPickup($var) - { - GPBUtil::checkBool($var); - $this->is_pickup = $var; - - return $this; - } - - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - * @return int - */ - public function getVisitRequestIndex() - { - return $this->visit_request_index; - } - - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - * @param int $var - * @return $this - */ - public function setVisitRequestIndex($var) - { - GPBUtil::checkInt32($var); - $this->visit_request_index = $var; - - return $this; - } - - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getDetour() - { - return $this->detour; - } - - public function hasDetour() - { - return isset($this->detour); - } - - public function clearDetour() - { - unset($this->detour); - } - - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDetour($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->detour = $var; - - return $this; - } - - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - * @return string - */ - public function getShipmentLabel() - { - return $this->shipment_label; - } - - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - * @param string $var - * @return $this - */ - public function setShipmentLabel($var) - { - GPBUtil::checkString($var, True); - $this->shipment_label = $var; - - return $this; - } - - /** - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - * @return string - */ - public function getVisitLabel() - { - return $this->visit_label; - } - - /** - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - * @param string $var - * @return $this - */ - public function setVisitLabel($var) - { - GPBUtil::checkString($var, True); - $this->visit_label = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Visit::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Visit::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php deleted file mode 100644 index 17d80f6ccd1d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php +++ /dev/null @@ -1,107 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeIncompatibility - */ -class ShipmentTypeIncompatibility extends \Google\Protobuf\Internal\Message -{ - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - */ - private $types; - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - */ - protected $incompatibility_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $types - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * @type int $incompatibility_mode - * Mode applied to the incompatibility. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTypes() - { - return $this->types; - } - - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->types = $arr; - - return $this; - } - - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - * @return int - */ - public function getIncompatibilityMode() - { - return $this->incompatibility_mode; - } - - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - * @param int $var - * @return $this - */ - public function setIncompatibilityMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility\IncompatibilityMode::class); - $this->incompatibility_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php deleted file mode 100644 index 1b34c50ca5fa..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php +++ /dev/null @@ -1,72 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode - */ -class IncompatibilityMode -{ - /** - * Unspecified incompatibility mode. This value should never be used. - * - * Generated from protobuf enum INCOMPATIBILITY_MODE_UNSPECIFIED = 0; - */ - const INCOMPATIBILITY_MODE_UNSPECIFIED = 0; - /** - * In this mode, two shipments with incompatible types can never share the - * same vehicle. - * - * Generated from protobuf enum NOT_PERFORMED_BY_SAME_VEHICLE = 1; - */ - const NOT_PERFORMED_BY_SAME_VEHICLE = 1; - /** - * For two shipments with incompatible types with the - * `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode: - * * If both are pickups only (no deliveries) or deliveries only (no - * pickups), they cannot share the same vehicle at all. - * * If one of the shipments has a delivery and the other a pickup, the two - * shipments can share the same vehicle iff the former shipment is - * delivered before the latter is picked up. - * - * Generated from protobuf enum NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; - */ - const NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; - - private static $valueToName = [ - self::INCOMPATIBILITY_MODE_UNSPECIFIED => 'INCOMPATIBILITY_MODE_UNSPECIFIED', - self::NOT_PERFORMED_BY_SAME_VEHICLE => 'NOT_PERFORMED_BY_SAME_VEHICLE', - self::NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY => 'NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncompatibilityMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility_IncompatibilityMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php deleted file mode 100644 index c7d8d7f847b7..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php +++ /dev/null @@ -1,156 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeRequirement - */ -class ShipmentTypeRequirement extends \Google\Protobuf\Internal\Message -{ - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - */ - private $required_shipment_type_alternatives; - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - */ - private $dependent_shipment_types; - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - */ - protected $requirement_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $required_shipment_type_alternatives - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * @type array|\Google\Protobuf\Internal\RepeatedField $dependent_shipment_types - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * @type int $requirement_mode - * Mode applied to the requirement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequiredShipmentTypeAlternatives() - { - return $this->required_shipment_type_alternatives; - } - - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequiredShipmentTypeAlternatives($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->required_shipment_type_alternatives = $arr; - - return $this; - } - - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDependentShipmentTypes() - { - return $this->dependent_shipment_types; - } - - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDependentShipmentTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->dependent_shipment_types = $arr; - - return $this; - } - - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - * @return int - */ - public function getRequirementMode() - { - return $this->requirement_mode; - } - - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - * @param int $var - * @return $this - */ - public function setRequirementMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement\RequirementMode::class); - $this->requirement_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php deleted file mode 100644 index b25581fc1f06..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php +++ /dev/null @@ -1,80 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode - */ -class RequirementMode -{ - /** - * Unspecified requirement mode. This value should never be used. - * - * Generated from protobuf enum REQUIREMENT_MODE_UNSPECIFIED = 0; - */ - const REQUIREMENT_MODE_UNSPECIFIED = 0; - /** - * In this mode, all "dependent" shipments must share the same vehicle as at - * least one of their "required" shipments. - * - * Generated from protobuf enum PERFORMED_BY_SAME_VEHICLE = 1; - */ - const PERFORMED_BY_SAME_VEHICLE = 1; - /** - * With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent" - * shipments need to have at least one "required" shipment on their vehicle - * at the time of their pickup. - * A "dependent" shipment pickup must therefore have either: - * * A delivery-only "required" shipment delivered on the route after, or - * * A "required" shipment picked up on the route before it, and if the - * "required" shipment has a delivery, this delivery must be performed - * after the "dependent" shipment's pickup. - * - * Generated from protobuf enum IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; - */ - const IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; - /** - * Same as before, except the "dependent" shipments need to have a - * "required" shipment on their vehicle at the time of their *delivery*. - * - * Generated from protobuf enum IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; - */ - const IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; - - private static $valueToName = [ - self::REQUIREMENT_MODE_UNSPECIFIED => 'REQUIREMENT_MODE_UNSPECIFIED', - self::PERFORMED_BY_SAME_VEHICLE => 'PERFORMED_BY_SAME_VEHICLE', - self::IN_SAME_VEHICLE_AT_PICKUP_TIME => 'IN_SAME_VEHICLE_AT_PICKUP_TIME', - self::IN_SAME_VEHICLE_AT_DELIVERY_TIME => 'IN_SAME_VEHICLE_AT_DELIVERY_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequirementMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement_RequirementMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php deleted file mode 100644 index 451c769e8d2a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php +++ /dev/null @@ -1,157 +0,0 @@ -google.maps.routeoptimization.v1.SkippedShipment - */ -class SkippedShipment extends \Google\Protobuf\Internal\Message -{ - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; - */ - private $reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * @type string $label - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $reasons - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; - * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason::class); - $this->reasons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php deleted file mode 100644 index b764ddfda63a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php +++ /dev/null @@ -1,181 +0,0 @@ -google.maps.routeoptimization.v1.SkippedShipment.Reason - */ -class Reason extends \Google\Protobuf\Internal\Message -{ - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; - */ - protected $code = 0; - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - */ - protected $example_vehicle_index = null; - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - */ - protected $example_exceeded_capacity_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Refer to the comments of Code. - * @type int $example_vehicle_index - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * @type string $example_exceeded_capacity_type - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason\Code::class); - $this->code = $var; - - return $this; - } - - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - * @return int - */ - public function getExampleVehicleIndex() - { - return isset($this->example_vehicle_index) ? $this->example_vehicle_index : 0; - } - - public function hasExampleVehicleIndex() - { - return isset($this->example_vehicle_index); - } - - public function clearExampleVehicleIndex() - { - unset($this->example_vehicle_index); - } - - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - * @param int $var - * @return $this - */ - public function setExampleVehicleIndex($var) - { - GPBUtil::checkInt32($var); - $this->example_vehicle_index = $var; - - return $this; - } - - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - * @return string - */ - public function getExampleExceededCapacityType() - { - return $this->example_exceeded_capacity_type; - } - - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - * @param string $var - * @return $this - */ - public function setExampleExceededCapacityType($var) - { - GPBUtil::checkString($var, True); - $this->example_exceeded_capacity_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reason::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php deleted file mode 100644 index 28c5af490f6b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php +++ /dev/null @@ -1,115 +0,0 @@ -google.maps.routeoptimization.v1.SkippedShipment.Reason.Code - */ -class Code -{ - /** - * This should never be used. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * There is no vehicle in the model making all shipments infeasible. - * - * Generated from protobuf enum NO_VEHICLE = 1; - */ - const NO_VEHICLE = 1; - /** - * The demand of the shipment exceeds a vehicle's capacity for some - * capacity types, one of which is `example_exceeded_capacity_type`. - * - * Generated from protobuf enum DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; - */ - const DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; - /** - * The minimum distance necessary to perform this shipment, i.e. from - * the vehicle's `start_location` to the shipment's pickup and/or delivery - * locations and to the vehicle's end location exceeds the vehicle's - * `route_distance_limit`. - * Note that for this computation we use the geodesic distances. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; - /** - * The minimum time necessary to perform this shipment, including travel - * time, wait time and service time exceeds the vehicle's - * `route_duration_limit`. - * Note: travel time is computed in the best-case scenario, namely as - * geodesic distance x 36 m/s (roughly 130 km/hour). - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; - /** - * Same as above but we only compare minimum travel time and the - * vehicle's `travel_duration_limit`. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; - /** - * The vehicle cannot perform this shipment in the best-case scenario - * (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time - * computation) if it starts at its earliest start time: the total time - * would make the vehicle end after its latest end time. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; - /** - * The `allowed_vehicle_indices` field of the shipment is not empty and - * this vehicle does not belong to it. - * - * Generated from protobuf enum VEHICLE_NOT_ALLOWED = 7; - */ - const VEHICLE_NOT_ALLOWED = 7; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::NO_VEHICLE => 'NO_VEHICLE', - self::DEMAND_EXCEEDS_VEHICLE_CAPACITY => 'DEMAND_EXCEEDS_VEHICLE_CAPACITY', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS', - self::VEHICLE_NOT_ALLOWED => 'VEHICLE_NOT_ALLOWED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason_Code::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php deleted file mode 100644 index 380dd0376f8d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php +++ /dev/null @@ -1,389 +0,0 @@ -google.maps.routeoptimization.v1.TimeWindow - */ -class TimeWindow extends \Google\Protobuf\Internal\Message -{ - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - */ - protected $soft_start_time = null; - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - */ - protected $soft_end_time = null; - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - */ - protected $cost_per_hour_before_soft_start_time = null; - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - */ - protected $cost_per_hour_after_soft_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * @type \Google\Protobuf\Timestamp $end_time - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * @type \Google\Protobuf\Timestamp $soft_start_time - * The soft start time of the time window. - * @type \Google\Protobuf\Timestamp $soft_end_time - * The soft end time of the time window. - * @type float $cost_per_hour_before_soft_start_time - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * @type float $cost_per_hour_after_soft_end_time - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftStartTime() - { - return $this->soft_start_time; - } - - public function hasSoftStartTime() - { - return isset($this->soft_start_time); - } - - public function clearSoftStartTime() - { - unset($this->soft_start_time); - } - - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_start_time = $var; - - return $this; - } - - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftEndTime() - { - return $this->soft_end_time; - } - - public function hasSoftEndTime() - { - return isset($this->soft_end_time); - } - - public function clearSoftEndTime() - { - unset($this->soft_end_time); - } - - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_end_time = $var; - - return $this; - } - - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - * @return float - */ - public function getCostPerHourBeforeSoftStartTime() - { - return isset($this->cost_per_hour_before_soft_start_time) ? $this->cost_per_hour_before_soft_start_time : 0.0; - } - - public function hasCostPerHourBeforeSoftStartTime() - { - return isset($this->cost_per_hour_before_soft_start_time); - } - - public function clearCostPerHourBeforeSoftStartTime() - { - unset($this->cost_per_hour_before_soft_start_time); - } - - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - * @param float $var - * @return $this - */ - public function setCostPerHourBeforeSoftStartTime($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_before_soft_start_time = $var; - - return $this; - } - - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - * @return float - */ - public function getCostPerHourAfterSoftEndTime() - { - return isset($this->cost_per_hour_after_soft_end_time) ? $this->cost_per_hour_after_soft_end_time : 0.0; - } - - public function hasCostPerHourAfterSoftEndTime() - { - return isset($this->cost_per_hour_after_soft_end_time); - } - - public function clearCostPerHourAfterSoftEndTime() - { - unset($this->cost_per_hour_after_soft_end_time); - } - - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - * @param float $var - * @return $this - */ - public function setCostPerHourAfterSoftEndTime($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_after_soft_end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php deleted file mode 100644 index 6201a4c661d7..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php +++ /dev/null @@ -1,412 +0,0 @@ -google.maps.routeoptimization.v1.TransitionAttributes - */ -class TransitionAttributes extends \Google\Protobuf\Internal\Message -{ - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - */ - protected $src_tag = ''; - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - */ - protected $excluded_src_tag = ''; - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - */ - protected $dst_tag = ''; - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - */ - protected $excluded_dst_tag = ''; - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - */ - protected $cost = 0.0; - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - */ - protected $cost_per_kilometer = 0.0; - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; - */ - protected $distance_limit = null; - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - */ - protected $delay = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $src_tag - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * @type string $excluded_src_tag - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * @type string $dst_tag - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * @type string $excluded_dst_tag - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * @type float $cost - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * @type float $cost_per_kilometer - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $distance_limit - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * @type \Google\Protobuf\Duration $delay - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - * @return string - */ - public function getSrcTag() - { - return $this->src_tag; - } - - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - * @param string $var - * @return $this - */ - public function setSrcTag($var) - { - GPBUtil::checkString($var, True); - $this->src_tag = $var; - - return $this; - } - - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - * @return string - */ - public function getExcludedSrcTag() - { - return $this->excluded_src_tag; - } - - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - * @param string $var - * @return $this - */ - public function setExcludedSrcTag($var) - { - GPBUtil::checkString($var, True); - $this->excluded_src_tag = $var; - - return $this; - } - - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - * @return string - */ - public function getDstTag() - { - return $this->dst_tag; - } - - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - * @param string $var - * @return $this - */ - public function setDstTag($var) - { - GPBUtil::checkString($var, True); - $this->dst_tag = $var; - - return $this; - } - - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - * @return string - */ - public function getExcludedDstTag() - { - return $this->excluded_dst_tag; - } - - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - * @param string $var - * @return $this - */ - public function setExcludedDstTag($var) - { - GPBUtil::checkString($var, True); - $this->excluded_dst_tag = $var; - - return $this; - } - - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - * @return float - */ - public function getCost() - { - return $this->cost; - } - - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkDouble($var); - $this->cost = $var; - - return $this; - } - - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - * @return float - */ - public function getCostPerKilometer() - { - return $this->cost_per_kilometer; - } - - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - * @param float $var - * @return $this - */ - public function setCostPerKilometer($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer = $var; - - return $this; - } - - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; - * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null - */ - public function getDistanceLimit() - { - return $this->distance_limit; - } - - public function hasDistanceLimit() - { - return isset($this->distance_limit); - } - - public function clearDistanceLimit() - { - unset($this->distance_limit); - } - - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; - * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var - * @return $this - */ - public function setDistanceLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); - $this->distance_limit = $var; - - return $this; - } - - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getDelay() - { - return $this->delay; - } - - public function hasDelay() - { - return isset($this->delay); - } - - public function clearDelay() - { - unset($this->delay); - } - - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelay($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php deleted file mode 100644 index c77ff7c216ae..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php +++ /dev/null @@ -1,1423 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle - */ -class Vehicle extends \Google\Protobuf\Internal\Message -{ - /** - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 32; - */ - protected $display_name = ''; - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; - */ - protected $travel_mode = 0; - /** - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; - */ - protected $route_modifiers = null; - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - */ - protected $start_location = null; - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; - */ - protected $start_waypoint = null; - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - */ - protected $end_location = null; - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; - */ - protected $end_waypoint = null; - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - */ - private $start_tags; - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - */ - private $end_tags; - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; - */ - private $start_time_windows; - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; - */ - private $end_time_windows; - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - */ - protected $travel_duration_multiple = null; - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - */ - protected $unloading_policy = 0; - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - */ - private $load_limits; - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - */ - protected $cost_per_hour = 0.0; - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - */ - protected $cost_per_traveled_hour = 0.0; - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - */ - protected $cost_per_kilometer = 0.0; - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - */ - protected $fixed_cost = 0.0; - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - */ - protected $used_if_route_is_empty = false; - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - */ - protected $route_duration_limit = null; - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - */ - protected $travel_duration_limit = null; - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; - */ - protected $route_distance_limit = null; - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - */ - private $extra_visit_duration_for_visit_type; - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; - */ - protected $break_rule = null; - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - */ - protected $label = ''; - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - */ - protected $ignore = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * @type int $travel_mode - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * @type \Google\Maps\RouteOptimization\V1\RouteModifiers $route_modifiers - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * @type \Google\Type\LatLng $start_location - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $start_waypoint - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * @type \Google\Type\LatLng $end_location - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $end_waypoint - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $start_tags - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * @type array|\Google\Protobuf\Internal\RepeatedField $end_tags - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $start_time_windows - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $end_time_windows - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * @type float $travel_duration_multiple - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * @type int $unloading_policy - * Unloading policy enforced on the vehicle. - * @type array|\Google\Protobuf\Internal\MapField $load_limits - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * @type float $cost_per_hour - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * @type float $cost_per_traveled_hour - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * @type float $cost_per_kilometer - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * @type float $fixed_cost - * Fixed cost applied if this vehicle is used to handle a shipment. - * @type bool $used_if_route_is_empty - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $route_duration_limit - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $travel_duration_limit - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $route_distance_limit - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * @type array|\Google\Protobuf\Internal\MapField $extra_visit_duration_for_visit_type - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * @type \Google\Maps\RouteOptimization\V1\BreakRule $break_rule - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * @type string $label - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * @type bool $ignore - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 32; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 32; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; - * @return int - */ - public function getTravelMode() - { - return $this->travel_mode; - } - - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; - * @param int $var - * @return $this - */ - public function setTravelMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\TravelMode::class); - $this->travel_mode = $var; - - return $this; - } - - /** - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; - * @return \Google\Maps\RouteOptimization\V1\RouteModifiers|null - */ - public function getRouteModifiers() - { - return $this->route_modifiers; - } - - public function hasRouteModifiers() - { - return isset($this->route_modifiers); - } - - public function clearRouteModifiers() - { - unset($this->route_modifiers); - } - - /** - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; - * @param \Google\Maps\RouteOptimization\V1\RouteModifiers $var - * @return $this - */ - public function setRouteModifiers($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\RouteModifiers::class); - $this->route_modifiers = $var; - - return $this; - } - - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - * @return \Google\Type\LatLng|null - */ - public function getStartLocation() - { - return $this->start_location; - } - - public function hasStartLocation() - { - return isset($this->start_location); - } - - public function clearStartLocation() - { - unset($this->start_location); - } - - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setStartLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->start_location = $var; - - return $this; - } - - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getStartWaypoint() - { - return $this->start_waypoint; - } - - public function hasStartWaypoint() - { - return isset($this->start_waypoint); - } - - public function clearStartWaypoint() - { - unset($this->start_waypoint); - } - - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setStartWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->start_waypoint = $var; - - return $this; - } - - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - * @return \Google\Type\LatLng|null - */ - public function getEndLocation() - { - return $this->end_location; - } - - public function hasEndLocation() - { - return isset($this->end_location); - } - - public function clearEndLocation() - { - unset($this->end_location); - } - - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setEndLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->end_location = $var; - - return $this; - } - - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getEndWaypoint() - { - return $this->end_waypoint; - } - - public function hasEndWaypoint() - { - return isset($this->end_waypoint); - } - - public function clearEndWaypoint() - { - unset($this->end_waypoint); - } - - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setEndWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->end_waypoint = $var; - - return $this; - } - - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartTags() - { - return $this->start_tags; - } - - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->start_tags = $arr; - - return $this; - } - - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndTags() - { - return $this->end_tags; - } - - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->end_tags = $arr; - - return $this; - } - - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartTimeWindows() - { - return $this->start_time_windows; - } - - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; - * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); - $this->start_time_windows = $arr; - - return $this; - } - - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndTimeWindows() - { - return $this->end_time_windows; - } - - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; - * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); - $this->end_time_windows = $arr; - - return $this; - } - - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - * @return float - */ - public function getTravelDurationMultiple() - { - return isset($this->travel_duration_multiple) ? $this->travel_duration_multiple : 0.0; - } - - public function hasTravelDurationMultiple() - { - return isset($this->travel_duration_multiple); - } - - public function clearTravelDurationMultiple() - { - unset($this->travel_duration_multiple); - } - - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - * @param float $var - * @return $this - */ - public function setTravelDurationMultiple($var) - { - GPBUtil::checkDouble($var); - $this->travel_duration_multiple = $var; - - return $this; - } - - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - * @return int - */ - public function getUnloadingPolicy() - { - return $this->unloading_policy; - } - - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - * @param int $var - * @return $this - */ - public function setUnloadingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\UnloadingPolicy::class); - $this->unloading_policy = $var; - - return $this; - } - - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadLimits() - { - return $this->load_limits; - } - - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadLimits($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit::class); - $this->load_limits = $arr; - - return $this; - } - - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - * @return float - */ - public function getCostPerHour() - { - return $this->cost_per_hour; - } - - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - * @param float $var - * @return $this - */ - public function setCostPerHour($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour = $var; - - return $this; - } - - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - * @return float - */ - public function getCostPerTraveledHour() - { - return $this->cost_per_traveled_hour; - } - - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - * @param float $var - * @return $this - */ - public function setCostPerTraveledHour($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_traveled_hour = $var; - - return $this; - } - - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - * @return float - */ - public function getCostPerKilometer() - { - return $this->cost_per_kilometer; - } - - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - * @param float $var - * @return $this - */ - public function setCostPerKilometer($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer = $var; - - return $this; - } - - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - * @return float - */ - public function getFixedCost() - { - return $this->fixed_cost; - } - - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - * @param float $var - * @return $this - */ - public function setFixedCost($var) - { - GPBUtil::checkDouble($var); - $this->fixed_cost = $var; - - return $this; - } - - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - * @return bool - */ - public function getUsedIfRouteIsEmpty() - { - return $this->used_if_route_is_empty; - } - - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - * @param bool $var - * @return $this - */ - public function setUsedIfRouteIsEmpty($var) - { - GPBUtil::checkBool($var); - $this->used_if_route_is_empty = $var; - - return $this; - } - - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null - */ - public function getRouteDurationLimit() - { - return $this->route_duration_limit; - } - - public function hasRouteDurationLimit() - { - return isset($this->route_duration_limit); - } - - public function clearRouteDurationLimit() - { - unset($this->route_duration_limit); - } - - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var - * @return $this - */ - public function setRouteDurationLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); - $this->route_duration_limit = $var; - - return $this; - } - - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null - */ - public function getTravelDurationLimit() - { - return $this->travel_duration_limit; - } - - public function hasTravelDurationLimit() - { - return isset($this->travel_duration_limit); - } - - public function clearTravelDurationLimit() - { - unset($this->travel_duration_limit); - } - - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var - * @return $this - */ - public function setTravelDurationLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); - $this->travel_duration_limit = $var; - - return $this; - } - - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; - * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null - */ - public function getRouteDistanceLimit() - { - return $this->route_distance_limit; - } - - public function hasRouteDistanceLimit() - { - return isset($this->route_distance_limit); - } - - public function clearRouteDistanceLimit() - { - unset($this->route_distance_limit); - } - - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; - * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var - * @return $this - */ - public function setRouteDistanceLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); - $this->route_distance_limit = $var; - - return $this; - } - - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - * @return \Google\Protobuf\Internal\MapField - */ - public function getExtraVisitDurationForVisitType() - { - return $this->extra_visit_duration_for_visit_type; - } - - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setExtraVisitDurationForVisitType($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->extra_visit_duration_for_visit_type = $arr; - - return $this; - } - - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; - * @return \Google\Maps\RouteOptimization\V1\BreakRule|null - */ - public function getBreakRule() - { - return $this->break_rule; - } - - public function hasBreakRule() - { - return isset($this->break_rule); - } - - public function clearBreakRule() - { - unset($this->break_rule); - } - - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; - * @param \Google\Maps\RouteOptimization\V1\BreakRule $var - * @return $this - */ - public function setBreakRule($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\BreakRule::class); - $this->break_rule = $var; - - return $this; - } - - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - * @return bool - */ - public function getIgnore() - { - return $this->ignore; - } - - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - * @param bool $var - * @return $this - */ - public function setIgnore($var) - { - GPBUtil::checkBool($var); - $this->ignore = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php deleted file mode 100644 index 75db61656a5f..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php +++ /dev/null @@ -1,359 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.DurationLimit - */ -class DurationLimit extends \Google\Protobuf\Internal\Message -{ - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - */ - protected $max_duration = null; - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - */ - protected $soft_max_duration = null; - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - */ - protected $cost_per_hour_after_soft_max = null; - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - */ - protected $quadratic_soft_max_duration = null; - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - */ - protected $cost_per_square_hour_after_quadratic_soft_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $max_duration - * A hard limit constraining the duration to be at most max_duration. - * @type \Google\Protobuf\Duration $soft_max_duration - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * @type float $cost_per_hour_after_soft_max - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * @type \Google\Protobuf\Duration $quadratic_soft_max_duration - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * @type float $cost_per_square_hour_after_quadratic_soft_max - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxDuration() - { - return $this->max_duration; - } - - public function hasMaxDuration() - { - return isset($this->max_duration); - } - - public function clearMaxDuration() - { - unset($this->max_duration); - } - - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_duration = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getSoftMaxDuration() - { - return $this->soft_max_duration; - } - - public function hasSoftMaxDuration() - { - return isset($this->soft_max_duration); - } - - public function clearSoftMaxDuration() - { - unset($this->soft_max_duration); - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSoftMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->soft_max_duration = $var; - - return $this; - } - - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - * @return float - */ - public function getCostPerHourAfterSoftMax() - { - return isset($this->cost_per_hour_after_soft_max) ? $this->cost_per_hour_after_soft_max : 0.0; - } - - public function hasCostPerHourAfterSoftMax() - { - return isset($this->cost_per_hour_after_soft_max); - } - - public function clearCostPerHourAfterSoftMax() - { - unset($this->cost_per_hour_after_soft_max); - } - - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerHourAfterSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_after_soft_max = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getQuadraticSoftMaxDuration() - { - return $this->quadratic_soft_max_duration; - } - - public function hasQuadraticSoftMaxDuration() - { - return isset($this->quadratic_soft_max_duration); - } - - public function clearQuadraticSoftMaxDuration() - { - unset($this->quadratic_soft_max_duration); - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setQuadraticSoftMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->quadratic_soft_max_duration = $var; - - return $this; - } - - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - * @return float - */ - public function getCostPerSquareHourAfterQuadraticSoftMax() - { - return isset($this->cost_per_square_hour_after_quadratic_soft_max) ? $this->cost_per_square_hour_after_quadratic_soft_max : 0.0; - } - - public function hasCostPerSquareHourAfterQuadraticSoftMax() - { - return isset($this->cost_per_square_hour_after_quadratic_soft_max); - } - - public function clearCostPerSquareHourAfterQuadraticSoftMax() - { - unset($this->cost_per_square_hour_after_quadratic_soft_max); - } - - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - * @param float $var - * @return $this - */ - public function setCostPerSquareHourAfterQuadraticSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_square_hour_after_quadratic_soft_max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DurationLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_DurationLimit::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php deleted file mode 100644 index 076beefb96f4..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php +++ /dev/null @@ -1,270 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.LoadLimit - */ -class LoadLimit extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - */ - protected $max_load = null; - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - */ - protected $soft_max_load = 0; - /** - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - */ - protected $cost_per_unit_above_soft_max = 0.0; - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - */ - protected $start_load_interval = null; - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - */ - protected $end_load_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_load - * The maximum acceptable amount of load. - * @type int|string $soft_max_load - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * @type float $cost_per_unit_above_soft_max - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $start_load_interval - * The acceptable load interval of the vehicle at the start of the route. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $end_load_interval - * The acceptable load interval of the vehicle at the end of the route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - * @return int|string - */ - public function getMaxLoad() - { - return isset($this->max_load) ? $this->max_load : 0; - } - - public function hasMaxLoad() - { - return isset($this->max_load); - } - - public function clearMaxLoad() - { - unset($this->max_load); - } - - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - * @param int|string $var - * @return $this - */ - public function setMaxLoad($var) - { - GPBUtil::checkInt64($var); - $this->max_load = $var; - - return $this; - } - - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - * @return int|string - */ - public function getSoftMaxLoad() - { - return $this->soft_max_load; - } - - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - * @param int|string $var - * @return $this - */ - public function setSoftMaxLoad($var) - { - GPBUtil::checkInt64($var); - $this->soft_max_load = $var; - - return $this; - } - - /** - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - * @return float - */ - public function getCostPerUnitAboveSoftMax() - { - return $this->cost_per_unit_above_soft_max; - } - - /** - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerUnitAboveSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_unit_above_soft_max = $var; - - return $this; - } - - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null - */ - public function getStartLoadInterval() - { - return $this->start_load_interval; - } - - public function hasStartLoadInterval() - { - return isset($this->start_load_interval); - } - - public function clearStartLoadInterval() - { - unset($this->start_load_interval); - } - - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var - * @return $this - */ - public function setStartLoadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); - $this->start_load_interval = $var; - - return $this; - } - - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null - */ - public function getEndLoadInterval() - { - return $this->end_load_interval; - } - - public function hasEndLoadInterval() - { - return isset($this->end_load_interval); - } - - public function clearEndLoadInterval() - { - unset($this->end_load_interval); - } - - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var - * @return $this - */ - public function setEndLoadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); - $this->end_load_interval = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoadLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php deleted file mode 100644 index cc4429851ef7..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php +++ /dev/null @@ -1,150 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval - */ -class Interval extends \Google\Protobuf\Internal\Message -{ - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - */ - protected $min = 0; - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - */ - protected $max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $min - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * @type int|string $max - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - * @return int|string - */ - public function getMin() - { - return $this->min; - } - - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - * @param int|string $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkInt64($var); - $this->min = $var; - - return $this; - } - - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - * @return int|string - */ - public function getMax() - { - return isset($this->max) ? $this->max : 0; - } - - public function hasMax() - { - return isset($this->max); - } - - public function clearMax() - { - unset($this->max); - } - - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - * @param int|string $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkInt64($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interval::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit_Interval::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php deleted file mode 100644 index 29c7c3891265..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.TravelMode - */ -class TravelMode -{ - /** - * Unspecified travel mode, equivalent to `DRIVING`. - * - * Generated from protobuf enum TRAVEL_MODE_UNSPECIFIED = 0; - */ - const TRAVEL_MODE_UNSPECIFIED = 0; - /** - * Travel mode corresponding to driving directions (car, ...). - * - * Generated from protobuf enum DRIVING = 1; - */ - const DRIVING = 1; - /** - * Travel mode corresponding to walking directions. - * - * Generated from protobuf enum WALKING = 2; - */ - const WALKING = 2; - - private static $valueToName = [ - self::TRAVEL_MODE_UNSPECIFIED => 'TRAVEL_MODE_UNSPECIFIED', - self::DRIVING => 'DRIVING', - self::WALKING => 'WALKING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TravelMode::class, \Google\Maps\RouteOptimization\V1\Vehicle_TravelMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php deleted file mode 100644 index dc58c2f42b5b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php +++ /dev/null @@ -1,68 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy - */ -class UnloadingPolicy -{ - /** - * Unspecified unloading policy; deliveries must just occur after their - * corresponding pickups. - * - * Generated from protobuf enum UNLOADING_POLICY_UNSPECIFIED = 0; - */ - const UNLOADING_POLICY_UNSPECIFIED = 0; - /** - * Deliveries must occur in reverse order of pickups - * - * Generated from protobuf enum LAST_IN_FIRST_OUT = 1; - */ - const LAST_IN_FIRST_OUT = 1; - /** - * Deliveries must occur in the same order as pickups - * - * Generated from protobuf enum FIRST_IN_FIRST_OUT = 2; - */ - const FIRST_IN_FIRST_OUT = 2; - - private static $valueToName = [ - self::UNLOADING_POLICY_UNSPECIFIED => 'UNLOADING_POLICY_UNSPECIFIED', - self::LAST_IN_FIRST_OUT => 'LAST_IN_FIRST_OUT', - self::FIRST_IN_FIRST_OUT => 'FIRST_IN_FIRST_OUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnloadingPolicy::class, \Google\Maps\RouteOptimization\V1\Vehicle_UnloadingPolicy::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php deleted file mode 100644 index b691d5167b2b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.maps.routeoptimization.v1.Waypoint - */ -class Waypoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * - * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $side_of_road = false; - protected $location_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\Location $location - * A point specified using geographic coordinates, including an optional - * heading. - * @type string $place_id - * The POI Place ID associated with the waypoint. - * @type bool $side_of_road - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A point specified using geographic coordinates, including an optional - * heading. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; - * @return \Google\Maps\RouteOptimization\V1\Location|null - */ - public function getLocation() - { - return $this->readOneof(1); - } - - public function hasLocation() - { - return $this->hasOneof(1); - } - - /** - * A point specified using geographic coordinates, including an optional - * heading. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; - * @param \Google\Maps\RouteOptimization\V1\Location $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Location::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The POI Place ID associated with the waypoint. - * - * Generated from protobuf field string place_id = 2; - * @return string - */ - public function getPlaceId() - { - return $this->readOneof(2); - } - - public function hasPlaceId() - { - return $this->hasOneof(2); - } - - /** - * The POI Place ID associated with the waypoint. - * - * Generated from protobuf field string place_id = 2; - * @param string $var - * @return $this - */ - public function setPlaceId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * - * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSideOfRoad() - { - return $this->side_of_road; - } - - /** - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * - * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSideOfRoad($var) - { - GPBUtil::checkBool($var); - $this->side_of_road = $var; - - return $this; - } - - /** - * @return string - */ - public function getLocationType() - { - return $this->whichOneof("location_type"); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php deleted file mode 100644 index e118b4dbdf9b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php +++ /dev/null @@ -1,133 +0,0 @@ -setDataFormat($modelConfigsInputConfigDataFormat); - $modelConfigsOutputConfig = (new OutputConfig()) - ->setDataFormat($modelConfigsOutputConfigDataFormat); - $asyncModelConfig = (new AsyncModelConfig()) - ->setInputConfig($modelConfigsInputConfig) - ->setOutputConfig($modelConfigsOutputConfig); - $modelConfigs = [$asyncModelConfig,]; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $routeOptimizationClient->batchOptimizeTours($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchOptimizeToursResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $modelConfigsInputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; - $modelConfigsOutputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; - - batch_optimize_tours_sample( - $parent, - $modelConfigsInputConfigDataFormat, - $modelConfigsOutputConfigDataFormat - ); -} -// [END routeoptimization_v1_generated_RouteOptimization_BatchOptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php deleted file mode 100644 index 8ad98f631377..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var OptimizeToursResponse $response */ - $response = $routeOptimizationClient->optimizeTours($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - optimize_tours_sample($parent); -} -// [END routeoptimization_v1_generated_RouteOptimization_OptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php deleted file mode 100644 index f1a5d837752f..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php +++ /dev/null @@ -1,323 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/route_optimization_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/route_optimization_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/route_optimization_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/route_optimization_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'routeoptimization.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Optimizes vehicle tours for one or more `OptimizeToursRequest` - * messages as a batch. - * - * This method is a Long Running Operation (LRO). The inputs for optimization - * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` - * messages) are read from and written to Cloud Storage in user-specified - * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` - * contains a `ShipmentModel` and returns an `OptimizeToursResponse` - * containing `ShipmentRoute` fields, which are a set of routes to be - * performed by vehicles minimizing the overall cost. - * - * The user can poll `operations.get` to check the status of the LRO: - * - * If the LRO `done` field is false, then at least one request is still - * being processed. Other requests may have completed successfully and their - * results are available in Cloud Storage. - * - * If the LRO's `done` field is true, then all requests have been processed. - * Any successfully processed requests will have their results available in - * Cloud Storage. Any requests that failed will not have their results - * available in Cloud Storage. If the LRO's `error` field is set, then it - * contains the error from one of the failed requests. - * - * The async variant is {@see RouteOptimizationClient::batchOptimizeToursAsync()} . - * - * @example samples/V1/RouteOptimizationClient/batch_optimize_tours.php - * - * @param BatchOptimizeToursRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchOptimizeTours(BatchOptimizeToursRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchOptimizeTours', $request, $callOptions)->wait(); - } - - /** - * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an - * `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of - * routes to be performed by vehicles minimizing the overall cost. - * - * A `ShipmentModel` model consists mainly of `Shipment`s that need to be - * carried out and `Vehicle`s that can be used to transport the `Shipment`s. - * The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically, - * they assign a series of `Visit`s to each vehicle, where a `Visit` - * corresponds to a `VisitRequest`, which is a pickup or delivery for a - * `Shipment`. - * - * The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that - * minimizes the total cost where cost has many components defined in the - * `ShipmentModel`. - * - * The async variant is {@see RouteOptimizationClient::optimizeToursAsync()} . - * - * @example samples/V1/RouteOptimizationClient/optimize_tours.php - * - * @param OptimizeToursRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OptimizeToursResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function optimizeTours(OptimizeToursRequest $request, array $callOptions = []): OptimizeToursResponse - { - return $this->startApiCall('OptimizeTours', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 71f5ea3e4f9b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.maps.routeoptimization.v1", - "libraryPackage": "Google\\Maps\\RouteOptimization\\V1", - "services": { - "RouteOptimization": { - "clients": { - "grpc": { - "libraryClient": "RouteOptimizationGapicClient", - "rpcs": { - "BatchOptimizeTours": { - "methods": [ - "batchOptimizeTours" - ] - }, - "OptimizeTours": { - "methods": [ - "optimizeTours" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json deleted file mode 100644 index 0e5122e35b74..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "interfaces": { - "google.maps.routeoptimization.v1.RouteOptimization": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - } - }, - "methods": { - "BatchOptimizeTours": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "OptimizeTours": { - "timeout_millis": 3600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php deleted file mode 100644 index 0e8b84155c48..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php +++ /dev/null @@ -1,59 +0,0 @@ - [ - 'google.maps.routeoptimization.v1.RouteOptimization' => [ - 'BatchOptimizeTours' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursResponse', - 'metadataReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'OptimizeTours' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\RouteOptimization\V1\OptimizeToursResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php deleted file mode 100644 index 5087b38b87fd..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.maps.routeoptimization.v1.RouteOptimization' => [ - 'BatchOptimizeTours' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:batchOptimizeTours', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}:batchOptimizeTours', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'OptimizeTours' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:optimizeTours', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}:optimizeTours', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php b/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php deleted file mode 100644 index ce03ba07af40..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php +++ /dev/null @@ -1,327 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RouteOptimizationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RouteOptimizationClient($options); - } - - /** @test */ - public function batchOptimizeToursTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchOptimizeToursResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchOptimizeToursTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeTours($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getModelConfigs(); - $this->assertProtobufEquals($modelConfigs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function batchOptimizeToursExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeTours($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function optimizeToursTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $requestLabel = 'requestLabel1739091268'; - $expectedResponse = new OptimizeToursResponse(); - $expectedResponse->setRequestLabel($requestLabel); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new OptimizeToursRequest()) - ->setParent($parent); - $response = $gapicClient->optimizeTours($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/OptimizeTours', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function optimizeToursExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new OptimizeToursRequest()) - ->setParent($parent); - try { - $gapicClient->optimizeTours($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchOptimizeToursAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchOptimizeToursResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchOptimizeToursTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeToursAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getModelConfigs(); - $this->assertProtobufEquals($modelConfigs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}