//Definitionofoffersprovidedbymerchantsfortheirservices.messageOffer{//Anopaquestringfromanaggregatorpartnerwhichuniquelyidentifiesa//merchant.(required)//Thismerchant_idshouldmatchwiththemerchant_idssentaspartof//Merchantfeed/RealTimeUpdate(RTU).stringmerchant_id=1;//Anopaquestringfromanaggregatorpartnertoidentifyaserviceofthe//merchantwherethisofferapplies.repeatedstringservice_id=3;//Anopaquestringfromanaggregatorpartnertouniquelyidentifyanoffer.//(required)stringoffer_id=4;//Onesentenceunlocalized,unstructuredoffertitle(eg.10%offfoodand//drink).(required)stringunlocalized_title=5;//Urlassociatedwiththeoffer.Itshouldpointtothewebpagewherethis//offerispresentinthemostdetailedway.stringurl=6;//Theimagetobeshownwiththeoffer.Theurlshouldpointdirectlytoa//specificimage,whichalmostalwaysendswithjpg,gif,png,orbmp,rather//thanpointingtoanentireindexorwebsite.//Theimageshouldbeatleast250pixelsinbothwidthandheight.stringimage_url=7;//Thespecificoffer's Terms and Conditions displayed to user.Termsterms=8;//Trueiftheofferisonlyredeemableonlybyarestrictedgroupofusers//(eg:paidmembers,certaincreditcardholders,etc.).boolrestricted_to_certain_users=9;//Valid_periodandvalid_time_of_weekfieldsareusedtospecifytheregular//availabilityoftheoffer.Valid_periodrepresentstheoverarchingdate//rangewhentheofferisvalid,whereasvalid_time_of_weekfieldsrepresent//therecurringweeklyschedule.//Then,valid_time_exceptionfieldsareusedtorepresentspecial//schdulefortimeswheretheofferhasalternativeavailabilitythanthe//regularschedule,suchasspecialavailabilityscheduleduringholidays.//Toillustratetherelationshipamongthesefields,weconsider//atimeTisvalidifandonlyif//Tisinvalid_periodAND//((Tisinvalid_time_of_weekAND//(valid_time_exceptionisnotspecifiedOR//TisNOTinvalid_time_exception))OR//Tisinvalid_time_exception)//TimeRangemessageisusedtorepresenttheoverarchingvalidperiodofthe//offer.Itisaclosed-opentimerangeinsecondsofUTCtimesinceUnix//epoch.Itshouldhavethesecondofthedatewhentheofferstartstobe//validasthestart,andthesecondofthedatewhentheofferstartstobe//invalidastheend.Example:Tospecifythattheofferisvalidforthe//entireyearof2019,//valid_period{begin_sec:1546300800end_sec:1577836800}////Notethatbecausethevalidperiodisclosed-open,theendsecondisnot//consideredaswithinthevalidperiodofthisoffer.//(required)TimeRangevalid_period=10;//Thismessagestoresthestartandendtimeofacontinuousvalidtime//intervaloftheofferatagivendayoftheweek.Itisusedto//specifytherecurrenceavailabilityoftheofferonaweeklybasis.//Thistimeintervalisaclosed-openinterval,i.e.[start,end)messageValidTimeOfWeek{//Thedayofweekwherethefollowingvalidtimeapplies.(required)enumDayOfWeek{DAY_OF_WEEK_UNSPECIFIED=0;MON=1;TUE=2;WED=3;THU=4;FRI=5;SAT=6;SUN=7;}DayOfWeekday_of_week=1;//Starttime(inclusive)ofthisoffervalidtimeinterval,usingseconds//fromMidnight,inmerchant's local timezone. Must be in the range//[0,86400).(required)int64start=2;//Endtime(exclusive)ofthisoffervalidtimeinterval,usingseconds//fromMidnight,inmerchant's local timezone. Must be in the range//(0,86400].(required)int64end=3;}//Thevalidtimeoftheofferinmerchant's local timezone, specified with//multiplecontinuoustimeintervalsusingthemessageabove.Forexample,if//anofferisvalidonMondaysfrom11:30-13:00plus16:00-20:00,andon//Tuesdaysfrom12:00-23:00,youcanspecifythevalidhoursasfollows://valid_time_of_week{day_of_week:MONstart:41400end:46800}//valid_time_of_week{day_of_week:MONstart:57600end:72000}//valid_time_of_week{day_of_week:TUEstart:43200end:82800}////Notethatitisaclose-openinterval.Itmeansthattheofferwouldbe//availableforallbookingslotswhosestarttimeisfrom,forexample,//Monday11:30uptothelaststartingtimebefore13:00,buttheofferwould//notbeavailablefortheslotstartingatMonday13:00.////Ifvalid_time_of_weekisnotpresent,weconsidertheoffertobevalidat//alltimewithinthevalid_periodtimerangespecifiedabove.repeatedValidTimeOfWeekvalid_time_of_week=11;//Thismessagerepresentsthetimeperiodswhentheofferhasalternative//availabilityschedulethantheregularone,suchasspecialscheduleduring//holidays.messageValidTimeException{//Theoverarchingtimerangeoftheexceptioninthesameformat//astheregularvalid_periodfieldabove.Itisaclosed-openinterval//specifyingwhentheexpectional_time_of_weekbelowwouldapply,replacing//theregularvalid_time_of_weekschedule.(required)TimeRangeexceptional_period=1;//Theweeklyavailabilityscheduletobeappliedforthetimerange//specifiedintheexceptionalperiodabove.Itshouldbeinthesame//formatastheregularvalid_time_of_weekfieldabove.Ifnotpresent,all//timeswithintheexceptional_periodwillbeconsideredasvalidforthe//offer.repeatedValidTimeOfWeekexceptional_time_of_week=2;}//Exceptionstotheregularrecurringvalid_time_of_weekavailability//schedule.Ifset,anyregularvalid_time_of_weekwithinthis//exceptional_periodareignoredandreplacedbytheexceptional_time_of_week//specified.repeatedValidTimeExceptionvalid_time_exception=12;//Anumberfrom1-100indicatingthepriorityoftheofferunderthe//specifiedmerchantandservice.1isthemostimportantand100isthe//leastimportant.Offerswithsmallerprioritynumberswillbeshownbefore//offerswithlargerprioritynumberswhentheyareequallyavailable.int64priority=13;}
Définition de la plage de temps
// A closed-open time range, i.e. [begin_sec, end_sec)messageTimeRange{// Seconds of UTC time since Unix epoch (required)int64begin_sec=1;// Seconds of UTC time since Unix epoch (required)int64end_sec=2;}
Définition des termes
// A set of rules and guidelines that are displayed to the// user in order to make a booking through Reserve with Google.messageTerms{// The URL to the Terms and Conditions. (optional)stringurl=1;// The unlocalized text to be displayed to the user. (required)stringunlocalized_text=2;}
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/11/26 (UTC).
[null,null,["Dernière mise à jour le 2024/11/26 (UTC)."],[[["Merchants can provide offers for their services which are defined in the `Offer` message."],["Offers include details like title, URL, image, terms and conditions, validity period, and priority."],["The `TimeRange` message defines a closed-open time range using seconds since the Unix epoch."],["The `Terms` message provides a way to specify terms and conditions for offers, including a URL and unlocalized text."],["While the specification is defined in protobuffer format, it is recommended to upload feeds in JSON format, with sample feeds available for reference."]]],[]]