|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365 |
- // Copyright 2019 Google LLC.
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // Code generated file. DO NOT EDIT.
-
- // Package datastore provides access to the Cloud Datastore API.
- //
- // This package is DEPRECATED. Use package cloud.google.com/go/datastore instead.
- //
- // For product documentation, see: https://cloud.google.com/datastore/
- //
- // Creating a client
- //
- // Usage example:
- //
- // import "google.golang.org/api/datastore/v1beta3"
- // ...
- // ctx := context.Background()
- // datastoreService, err := datastore.NewService(ctx)
- //
- // In this example, Google Application Default Credentials are used for authentication.
- //
- // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
- //
- // Other authentication options
- //
- // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
- //
- // datastoreService, err := datastore.NewService(ctx, option.WithScopes(datastore.DatastoreScope))
- //
- // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
- //
- // datastoreService, err := datastore.NewService(ctx, option.WithAPIKey("AIza..."))
- //
- // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
- //
- // config := &oauth2.Config{...}
- // // ...
- // token, err := config.Exchange(ctx, ...)
- // datastoreService, err := datastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
- //
- // See https://godoc.org/google.golang.org/api/option/ for details on options.
- package datastore // import "google.golang.org/api/datastore/v1beta3"
-
- import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strconv"
- "strings"
-
- gensupport "google.golang.org/api/gensupport"
- googleapi "google.golang.org/api/googleapi"
- option "google.golang.org/api/option"
- htransport "google.golang.org/api/transport/http"
- )
-
- // Always reference these packages, just in case the auto-generated code
- // below doesn't.
- var _ = bytes.NewBuffer
- var _ = strconv.Itoa
- var _ = fmt.Sprintf
- var _ = json.NewDecoder
- var _ = io.Copy
- var _ = url.Parse
- var _ = gensupport.MarshalJSON
- var _ = googleapi.Version
- var _ = errors.New
- var _ = strings.Replace
- var _ = context.Canceled
-
- const apiId = "datastore:v1beta3"
- const apiName = "datastore"
- const apiVersion = "v1beta3"
- const basePath = "https://datastore.googleapis.com/"
-
- // OAuth2 scopes used by this API.
- const (
- // View and manage your data across Google Cloud Platform services
- CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
-
- // View and manage your Google Cloud Datastore data
- DatastoreScope = "https://www.googleapis.com/auth/datastore"
- )
-
- // NewService creates a new Service.
- func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
- scopesOption := option.WithScopes(
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/datastore",
- )
- // NOTE: prepend, so we don't override user-specified scopes.
- opts = append([]option.ClientOption{scopesOption}, opts...)
- client, endpoint, err := htransport.NewClient(ctx, opts...)
- if err != nil {
- return nil, err
- }
- s, err := New(client)
- if err != nil {
- return nil, err
- }
- if endpoint != "" {
- s.BasePath = endpoint
- }
- return s, nil
- }
-
- // New creates a new Service. It uses the provided http.Client for requests.
- //
- // Deprecated: please use NewService instead.
- // To provide a custom HTTP client, use option.WithHTTPClient.
- // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
- func New(client *http.Client) (*Service, error) {
- if client == nil {
- return nil, errors.New("client is nil")
- }
- s := &Service{client: client, BasePath: basePath}
- s.Projects = NewProjectsService(s)
- return s, nil
- }
-
- type Service struct {
- client *http.Client
- BasePath string // API endpoint base URL
- UserAgent string // optional additional User-Agent fragment
-
- Projects *ProjectsService
- }
-
- func (s *Service) userAgent() string {
- if s.UserAgent == "" {
- return googleapi.UserAgent
- }
- return googleapi.UserAgent + " " + s.UserAgent
- }
-
- func NewProjectsService(s *Service) *ProjectsService {
- rs := &ProjectsService{s: s}
- return rs
- }
-
- type ProjectsService struct {
- s *Service
- }
-
- // AllocateIdsRequest: The request for Datastore.AllocateIds.
- type AllocateIdsRequest struct {
- // Keys: A list of keys with incomplete key paths for which to allocate
- // IDs.
- // No key may be reserved/read-only.
- Keys []*Key `json:"keys,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Keys") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Keys") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AllocateIdsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod AllocateIdsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // AllocateIdsResponse: The response for Datastore.AllocateIds.
- type AllocateIdsResponse struct {
- // Keys: The keys specified in the request (in the same order), each
- // with
- // its key path completed with a newly allocated ID.
- Keys []*Key `json:"keys,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Keys") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Keys") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AllocateIdsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod AllocateIdsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ArrayValue: An array value.
- type ArrayValue struct {
- // Values: Values in the array.
- // The order of values in an array is preserved as long as all values
- // have
- // identical settings for 'exclude_from_indexes'.
- Values []*Value `json:"values,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Values") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Values") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ArrayValue) MarshalJSON() ([]byte, error) {
- type NoMethod ArrayValue
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // BeginTransactionRequest: The request for Datastore.BeginTransaction.
- type BeginTransactionRequest struct {
- // TransactionOptions: Options for a new transaction.
- TransactionOptions *TransactionOptions `json:"transactionOptions,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "TransactionOptions")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "TransactionOptions") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
- type NoMethod BeginTransactionRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // BeginTransactionResponse: The response for
- // Datastore.BeginTransaction.
- type BeginTransactionResponse struct {
- // Transaction: The transaction identifier (always present).
- Transaction string `json:"transaction,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Transaction") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Transaction") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) {
- type NoMethod BeginTransactionResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CommitRequest: The request for Datastore.Commit.
- type CommitRequest struct {
- // Mode: The type of commit to perform. Defaults to `TRANSACTIONAL`.
- //
- // Possible values:
- // "MODE_UNSPECIFIED" - Unspecified. This value must not be used.
- // "TRANSACTIONAL" - Transactional: The mutations are either all
- // applied, or none are applied.
- // Learn about transactions
- // [here](https://cloud.google.com/datastore/docs/concepts/transactions).
- // "NON_TRANSACTIONAL" - Non-transactional: The mutations may not
- // apply as all or none.
- Mode string `json:"mode,omitempty"`
-
- // Mutations: The mutations to perform.
- //
- // When mode is `TRANSACTIONAL`, mutations affecting a single entity
- // are
- // applied in order. The following sequences of mutations affecting a
- // single
- // entity are not permitted in a single `Commit` request:
- //
- // - `insert` followed by `insert`
- // - `update` followed by `insert`
- // - `upsert` followed by `insert`
- // - `delete` followed by `update`
- //
- // When mode is `NON_TRANSACTIONAL`, no two mutations may affect a
- // single
- // entity.
- Mutations []*Mutation `json:"mutations,omitempty"`
-
- // Transaction: The identifier of the transaction associated with the
- // commit. A
- // transaction identifier is returned by a call
- // to
- // Datastore.BeginTransaction.
- Transaction string `json:"transaction,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Mode") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Mode") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CommitRequest) MarshalJSON() ([]byte, error) {
- type NoMethod CommitRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CommitResponse: The response for Datastore.Commit.
- type CommitResponse struct {
- // IndexUpdates: The number of index entries updated during the commit,
- // or zero if none were
- // updated.
- IndexUpdates int64 `json:"indexUpdates,omitempty"`
-
- // MutationResults: The result of performing the mutations.
- // The i-th mutation result corresponds to the i-th mutation in the
- // request.
- MutationResults []*MutationResult `json:"mutationResults,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "IndexUpdates") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "IndexUpdates") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CommitResponse) MarshalJSON() ([]byte, error) {
- type NoMethod CommitResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CompositeFilter: A filter that merges multiple other filters using
- // the given operator.
- type CompositeFilter struct {
- // Filters: The list of filters to combine.
- // Must contain at least one filter.
- Filters []*Filter `json:"filters,omitempty"`
-
- // Op: The operator for combining multiple filters.
- //
- // Possible values:
- // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
- // "AND" - The results are required to satisfy each of the combined
- // filters.
- Op string `json:"op,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Filters") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Filters") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CompositeFilter) MarshalJSON() ([]byte, error) {
- type NoMethod CompositeFilter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Entity: A Datastore data object.
- //
- // An entity is limited to 1 megabyte when stored. That
- // _roughly_
- // corresponds to a limit of 1 megabyte for the serialized form of
- // this
- // message.
- type Entity struct {
- // Key: The entity's key.
- //
- // An entity must have a key, unless otherwise documented (for
- // example,
- // an entity in `Value.entity_value` may have no key).
- // An entity's kind is its key path's last element's kind,
- // or null if it has no key.
- Key *Key `json:"key,omitempty"`
-
- // Properties: The entity's properties.
- // The map's keys are property names.
- // A property name matching regex `__.*__` is reserved.
- // A reserved property name is forbidden in certain documented
- // contexts.
- // The name must not contain more than 500 characters.
- // The name cannot be "".
- Properties map[string]Value `json:"properties,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Key") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Key") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Entity) MarshalJSON() ([]byte, error) {
- type NoMethod Entity
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // EntityResult: The result of fetching an entity from Datastore.
- type EntityResult struct {
- // Cursor: A cursor that points to the position after the result
- // entity.
- // Set only when the `EntityResult` is part of a `QueryResultBatch`
- // message.
- Cursor string `json:"cursor,omitempty"`
-
- // Entity: The resulting entity.
- Entity *Entity `json:"entity,omitempty"`
-
- // Version: The version of the entity, a strictly positive number that
- // monotonically
- // increases with changes to the entity.
- //
- // This field is set for `FULL` entity
- // results.
- //
- // For missing entities in `LookupResponse`, this
- // is the version of the snapshot that was used to look up the entity,
- // and it
- // is always set except for eventually consistent reads.
- Version int64 `json:"version,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "Cursor") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Cursor") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *EntityResult) MarshalJSON() ([]byte, error) {
- type NoMethod EntityResult
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Filter: A holder for any type of filter.
- type Filter struct {
- // CompositeFilter: A composite filter.
- CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"`
-
- // PropertyFilter: A filter on a property.
- PropertyFilter *PropertyFilter `json:"propertyFilter,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "CompositeFilter") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CompositeFilter") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Filter) MarshalJSON() ([]byte, error) {
- type NoMethod Filter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1CommonMetadata: Metadata common to all
- // Datastore Admin operations.
- type GoogleDatastoreAdminV1CommonMetadata struct {
- // EndTime: The time the operation ended, either successfully or
- // otherwise.
- EndTime string `json:"endTime,omitempty"`
-
- // Labels: The client-assigned labels which were provided when the
- // operation was
- // created. May also include additional labels.
- Labels map[string]string `json:"labels,omitempty"`
-
- // OperationType: The type of the operation. Can be used as a filter
- // in
- // ListOperationsRequest.
- //
- // Possible values:
- // "OPERATION_TYPE_UNSPECIFIED" - Unspecified.
- // "EXPORT_ENTITIES" - ExportEntities.
- // "IMPORT_ENTITIES" - ImportEntities.
- // "CREATE_INDEX" - CreateIndex.
- // "DELETE_INDEX" - DeleteIndex.
- OperationType string `json:"operationType,omitempty"`
-
- // StartTime: The time that work began on the operation.
- StartTime string `json:"startTime,omitempty"`
-
- // State: The current state of the Operation.
- //
- // Possible values:
- // "STATE_UNSPECIFIED" - Unspecified.
- // "INITIALIZING" - Request is being prepared for processing.
- // "PROCESSING" - Request is actively being processed.
- // "CANCELLING" - Request is in the process of being cancelled after
- // user called
- // google.longrunning.Operations.CancelOperation on the operation.
- // "FINALIZING" - Request has been processed and is in its
- // finalization stage.
- // "SUCCESSFUL" - Request has completed successfully.
- // "FAILED" - Request has finished being processed, but encountered an
- // error.
- // "CANCELLED" - Request has finished being cancelled after user
- // called
- // google.longrunning.Operations.CancelOperation.
- State string `json:"state,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "EndTime") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EndTime") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1CommonMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1CommonMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1EntityFilter: Identifies a subset of entities
- // in a project. This is specified as
- // combinations of kinds and namespaces (either or both of which may be
- // all, as
- // described in the following examples).
- // Example usage:
- //
- // Entire project:
- // kinds=[], namespace_ids=[]
- //
- // Kinds Foo and Bar in all namespaces:
- // kinds=['Foo', 'Bar'], namespace_ids=[]
- //
- // Kinds Foo and Bar only in the default namespace:
- // kinds=['Foo', 'Bar'], namespace_ids=['']
- //
- // Kinds Foo and Bar in both the default and Baz namespaces:
- // kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
- //
- // The entire Baz namespace:
- // kinds=[], namespace_ids=['Baz']
- type GoogleDatastoreAdminV1EntityFilter struct {
- // Kinds: If empty, then this represents all kinds.
- Kinds []string `json:"kinds,omitempty"`
-
- // NamespaceIds: An empty list represents all namespaces. This is the
- // preferred
- // usage for projects that don't use namespaces.
- //
- // An empty string element represents the default namespace. This should
- // be
- // used if the project has data in non-default namespaces, but doesn't
- // want to
- // include them.
- // Each namespace in this list must be unique.
- NamespaceIds []string `json:"namespaceIds,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Kinds") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Kinds") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1EntityFilter) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1EntityFilter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1ExportEntitiesMetadata: Metadata for
- // ExportEntities operations.
- type GoogleDatastoreAdminV1ExportEntitiesMetadata struct {
- // Common: Metadata common to all Datastore Admin operations.
- Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"`
-
- // EntityFilter: Description of which entities are being exported.
- EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"`
-
- // OutputUrlPrefix: Location for the export metadata and data files.
- // This will be the same
- // value as
- // the
- // google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix
- //
- // field. The final output location is provided
- // in
- // google.datastore.admin.v1.ExportEntitiesResponse.output_url.
- OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"`
-
- // ProgressBytes: An estimate of the number of bytes processed.
- ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"`
-
- // ProgressEntities: An estimate of the number of entities processed.
- ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Common") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Common") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1ExportEntitiesMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1ExportEntitiesResponse: The response
- // for
- // google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
- type GoogleDatastoreAdminV1ExportEntitiesResponse struct {
- // OutputUrl: Location of the output metadata file. This can be used to
- // begin an import
- // into Cloud Datastore (this project or another project).
- // See
- // google.datastore.admin.v1.ImportEntitiesRequest.input_url.
- // Only present if the operation completed successfully.
- OutputUrl string `json:"outputUrl,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "OutputUrl") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "OutputUrl") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1ExportEntitiesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1ExportEntitiesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1ImportEntitiesMetadata: Metadata for
- // ImportEntities operations.
- type GoogleDatastoreAdminV1ImportEntitiesMetadata struct {
- // Common: Metadata common to all Datastore Admin operations.
- Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"`
-
- // EntityFilter: Description of which entities are being imported.
- EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"`
-
- // InputUrl: The location of the import metadata file. This will be the
- // same value as
- // the google.datastore.admin.v1.ExportEntitiesResponse.output_url
- // field.
- InputUrl string `json:"inputUrl,omitempty"`
-
- // ProgressBytes: An estimate of the number of bytes processed.
- ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"`
-
- // ProgressEntities: An estimate of the number of entities processed.
- ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Common") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Common") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1ImportEntitiesMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1IndexOperationMetadata: Metadata for Index
- // operations.
- type GoogleDatastoreAdminV1IndexOperationMetadata struct {
- // Common: Metadata common to all Datastore Admin operations.
- Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"`
-
- // IndexId: The index resource ID that this operation is acting on.
- IndexId string `json:"indexId,omitempty"`
-
- // ProgressEntities: An estimate of the number of entities processed.
- ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Common") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Common") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1IndexOperationMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1Progress: Measures the progress of a particular
- // metric.
- type GoogleDatastoreAdminV1Progress struct {
- // WorkCompleted: The amount of work that has been completed. Note that
- // this may be greater
- // than work_estimated.
- WorkCompleted int64 `json:"workCompleted,omitempty,string"`
-
- // WorkEstimated: An estimate of how much work needs to be performed.
- // May be zero if the
- // work estimate is unavailable.
- WorkEstimated int64 `json:"workEstimated,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "WorkCompleted") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "WorkCompleted") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1Progress
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all
- // Datastore Admin operations.
- type GoogleDatastoreAdminV1beta1CommonMetadata struct {
- // EndTime: The time the operation ended, either successfully or
- // otherwise.
- EndTime string `json:"endTime,omitempty"`
-
- // Labels: The client-assigned labels which were provided when the
- // operation was
- // created. May also include additional labels.
- Labels map[string]string `json:"labels,omitempty"`
-
- // OperationType: The type of the operation. Can be used as a filter
- // in
- // ListOperationsRequest.
- //
- // Possible values:
- // "OPERATION_TYPE_UNSPECIFIED" - Unspecified.
- // "EXPORT_ENTITIES" - ExportEntities.
- // "IMPORT_ENTITIES" - ImportEntities.
- OperationType string `json:"operationType,omitempty"`
-
- // StartTime: The time that work began on the operation.
- StartTime string `json:"startTime,omitempty"`
-
- // State: The current state of the Operation.
- //
- // Possible values:
- // "STATE_UNSPECIFIED" - Unspecified.
- // "INITIALIZING" - Request is being prepared for processing.
- // "PROCESSING" - Request is actively being processed.
- // "CANCELLING" - Request is in the process of being cancelled after
- // user called
- // google.longrunning.Operations.CancelOperation on the operation.
- // "FINALIZING" - Request has been processed and is in its
- // finalization stage.
- // "SUCCESSFUL" - Request has completed successfully.
- // "FAILED" - Request has finished being processed, but encountered an
- // error.
- // "CANCELLED" - Request has finished being cancelled after user
- // called
- // google.longrunning.Operations.CancelOperation.
- State string `json:"state,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "EndTime") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EndTime") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1beta1CommonMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of
- // entities in a project. This is specified as
- // combinations of kinds and namespaces (either or both of which may be
- // all, as
- // described in the following examples).
- // Example usage:
- //
- // Entire project:
- // kinds=[], namespace_ids=[]
- //
- // Kinds Foo and Bar in all namespaces:
- // kinds=['Foo', 'Bar'], namespace_ids=[]
- //
- // Kinds Foo and Bar only in the default namespace:
- // kinds=['Foo', 'Bar'], namespace_ids=['']
- //
- // Kinds Foo and Bar in both the default and Baz namespaces:
- // kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
- //
- // The entire Baz namespace:
- // kinds=[], namespace_ids=['Baz']
- type GoogleDatastoreAdminV1beta1EntityFilter struct {
- // Kinds: If empty, then this represents all kinds.
- Kinds []string `json:"kinds,omitempty"`
-
- // NamespaceIds: An empty list represents all namespaces. This is the
- // preferred
- // usage for projects that don't use namespaces.
- //
- // An empty string element represents the default namespace. This should
- // be
- // used if the project has data in non-default namespaces, but doesn't
- // want to
- // include them.
- // Each namespace in this list must be unique.
- NamespaceIds []string `json:"namespaceIds,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Kinds") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Kinds") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1beta1EntityFilter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for
- // ExportEntities operations.
- type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct {
- // Common: Metadata common to all Datastore Admin operations.
- Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"`
-
- // EntityFilter: Description of which entities are being exported.
- EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"`
-
- // OutputUrlPrefix: Location for the export metadata and data files.
- // This will be the same
- // value as
- // the
- // google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_pr
- // efix
- // field. The final output location is provided
- // in
- // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
- OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"`
-
- // ProgressBytes: An estimate of the number of bytes processed.
- ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"`
-
- // ProgressEntities: An estimate of the number of entities processed.
- ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Common") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Common") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response
- // for
- // google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.
- type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct {
- // OutputUrl: Location of the output metadata file. This can be used to
- // begin an import
- // into Cloud Datastore (this project or another project).
- // See
- // google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url.
- // On
- // ly present if the operation completed successfully.
- OutputUrl string `json:"outputUrl,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "OutputUrl") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "OutputUrl") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1beta1ExportEntitiesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for
- // ImportEntities operations.
- type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct {
- // Common: Metadata common to all Datastore Admin operations.
- Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"`
-
- // EntityFilter: Description of which entities are being imported.
- EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"`
-
- // InputUrl: The location of the import metadata file. This will be the
- // same value as
- // the
- // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url
- // field
- // .
- InputUrl string `json:"inputUrl,omitempty"`
-
- // ProgressBytes: An estimate of the number of bytes processed.
- ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"`
-
- // ProgressEntities: An estimate of the number of entities processed.
- ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Common") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Common") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GoogleDatastoreAdminV1beta1Progress: Measures the progress of a
- // particular metric.
- type GoogleDatastoreAdminV1beta1Progress struct {
- // WorkCompleted: The amount of work that has been completed. Note that
- // this may be greater
- // than work_estimated.
- WorkCompleted int64 `json:"workCompleted,omitempty,string"`
-
- // WorkEstimated: An estimate of how much work needs to be performed.
- // May be zero if the
- // work estimate is unavailable.
- WorkEstimated int64 `json:"workEstimated,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "WorkCompleted") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "WorkCompleted") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error) {
- type NoMethod GoogleDatastoreAdminV1beta1Progress
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GqlQuery: A [GQL
- // query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference)
- // .
- type GqlQuery struct {
- // AllowLiterals: When false, the query string must not contain any
- // literals and instead must
- // bind all values. For example,
- // `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed,
- // while
- // `SELECT * FROM Kind WHERE a = @value` is.
- AllowLiterals bool `json:"allowLiterals,omitempty"`
-
- // NamedBindings: For each non-reserved named binding site in the query
- // string, there must be
- // a named parameter with that name, but not necessarily the
- // inverse.
- //
- // Key must match regex `A-Za-z_$*`, must not match regex
- // `__.*__`, and must not be "".
- NamedBindings map[string]GqlQueryParameter `json:"namedBindings,omitempty"`
-
- // PositionalBindings: Numbered binding site @1 references the first
- // numbered parameter,
- // effectively using 1-based indexing, rather than the usual 0.
- //
- // For each binding site numbered i in `query_string`, there must be an
- // i-th
- // numbered parameter. The inverse must also be true.
- PositionalBindings []*GqlQueryParameter `json:"positionalBindings,omitempty"`
-
- // QueryString: A string of the format
- // described
- // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_
- // reference).
- QueryString string `json:"queryString,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AllowLiterals") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AllowLiterals") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GqlQuery) MarshalJSON() ([]byte, error) {
- type NoMethod GqlQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GqlQueryParameter: A binding parameter for a GQL query.
- type GqlQueryParameter struct {
- // Cursor: A query cursor. Query cursors are returned in query
- // result batches.
- Cursor string `json:"cursor,omitempty"`
-
- // Value: A value parameter.
- Value *Value `json:"value,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Cursor") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Cursor") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GqlQueryParameter) MarshalJSON() ([]byte, error) {
- type NoMethod GqlQueryParameter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Key: A unique identifier for an entity.
- // If a key's partition ID or any of its path kinds or names
- // are
- // reserved/read-only, the key is reserved/read-only.
- // A reserved/read-only key is forbidden in certain documented contexts.
- type Key struct {
- // PartitionId: Entities are partitioned into subsets, currently
- // identified by a project
- // ID and namespace ID.
- // Queries are scoped to a single partition.
- PartitionId *PartitionId `json:"partitionId,omitempty"`
-
- // Path: The entity path.
- // An entity path consists of one or more elements composed of a kind
- // and a
- // string or numerical identifier, which identify entities. The
- // first
- // element identifies a _root entity_, the second element identifies
- // a _child_ of the root entity, the third element identifies a child of
- // the
- // second entity, and so forth. The entities identified by all prefixes
- // of
- // the path are called the element's _ancestors_.
- //
- // An entity path is always fully complete: *all* of the entity's
- // ancestors
- // are required to be in the path along with the entity identifier
- // itself.
- // The only exception is that in some documented cases, the identifier
- // in the
- // last path element (for the entity) itself may be omitted. For
- // example,
- // the last path element of the key of `Mutation.insert` may have
- // no
- // identifier.
- //
- // A path can never be empty, and a path can have at most 100 elements.
- Path []*PathElement `json:"path,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "PartitionId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "PartitionId") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Key) MarshalJSON() ([]byte, error) {
- type NoMethod Key
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // KindExpression: A representation of a kind.
- type KindExpression struct {
- // Name: The name of the kind.
- Name string `json:"name,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Name") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Name") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *KindExpression) MarshalJSON() ([]byte, error) {
- type NoMethod KindExpression
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // LatLng: An object representing a latitude/longitude pair. This is
- // expressed as a pair
- // of doubles representing degrees latitude and degrees longitude.
- // Unless
- // specified otherwise, this must conform to the
- // <a
- // href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
- // st
- // andard</a>. Values must be within normalized ranges.
- type LatLng struct {
- // Latitude: The latitude in degrees. It must be in the range [-90.0,
- // +90.0].
- Latitude float64 `json:"latitude,omitempty"`
-
- // Longitude: The longitude in degrees. It must be in the range [-180.0,
- // +180.0].
- Longitude float64 `json:"longitude,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Latitude") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Latitude") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *LatLng) MarshalJSON() ([]byte, error) {
- type NoMethod LatLng
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- func (s *LatLng) UnmarshalJSON(data []byte) error {
- type NoMethod LatLng
- var s1 struct {
- Latitude gensupport.JSONFloat64 `json:"latitude"`
- Longitude gensupport.JSONFloat64 `json:"longitude"`
- *NoMethod
- }
- s1.NoMethod = (*NoMethod)(s)
- if err := json.Unmarshal(data, &s1); err != nil {
- return err
- }
- s.Latitude = float64(s1.Latitude)
- s.Longitude = float64(s1.Longitude)
- return nil
- }
-
- // LookupRequest: The request for Datastore.Lookup.
- type LookupRequest struct {
- // Keys: Keys of entities to look up.
- Keys []*Key `json:"keys,omitempty"`
-
- // ReadOptions: The options for this lookup request.
- ReadOptions *ReadOptions `json:"readOptions,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Keys") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Keys") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *LookupRequest) MarshalJSON() ([]byte, error) {
- type NoMethod LookupRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // LookupResponse: The response for Datastore.Lookup.
- type LookupResponse struct {
- // Deferred: A list of keys that were not looked up due to resource
- // constraints. The
- // order of results in this field is undefined and has no relation to
- // the
- // order of the keys in the input.
- Deferred []*Key `json:"deferred,omitempty"`
-
- // Found: Entities found as `ResultType.FULL` entities. The order of
- // results in this
- // field is undefined and has no relation to the order of the keys in
- // the
- // input.
- Found []*EntityResult `json:"found,omitempty"`
-
- // Missing: Entities not found as `ResultType.KEY_ONLY` entities. The
- // order of results
- // in this field is undefined and has no relation to the order of the
- // keys
- // in the input.
- Missing []*EntityResult `json:"missing,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Deferred") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Deferred") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *LookupResponse) MarshalJSON() ([]byte, error) {
- type NoMethod LookupResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Mutation: A mutation to apply to an entity.
- type Mutation struct {
- // BaseVersion: The version of the entity that this mutation is being
- // applied to. If this
- // does not match the current version on the server, the mutation
- // conflicts.
- BaseVersion int64 `json:"baseVersion,omitempty,string"`
-
- // Delete: The key of the entity to delete. The entity may or may not
- // already exist.
- // Must have a complete key path and must not be reserved/read-only.
- Delete *Key `json:"delete,omitempty"`
-
- // Insert: The entity to insert. The entity must not already exist.
- // The entity key's final path element may be incomplete.
- Insert *Entity `json:"insert,omitempty"`
-
- // Update: The entity to update. The entity must already exist.
- // Must have a complete key path.
- Update *Entity `json:"update,omitempty"`
-
- // Upsert: The entity to upsert. The entity may or may not already
- // exist.
- // The entity key's final path element may be incomplete.
- Upsert *Entity `json:"upsert,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "BaseVersion") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "BaseVersion") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Mutation) MarshalJSON() ([]byte, error) {
- type NoMethod Mutation
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // MutationResult: The result of applying a mutation.
- type MutationResult struct {
- // ConflictDetected: Whether a conflict was detected for this mutation.
- // Always false when a
- // conflict detection strategy field is not set in the mutation.
- ConflictDetected bool `json:"conflictDetected,omitempty"`
-
- // Key: The automatically allocated key.
- // Set only when the mutation allocated a key.
- Key *Key `json:"key,omitempty"`
-
- // Version: The version of the entity on the server after processing the
- // mutation. If
- // the mutation doesn't change anything on the server, then the version
- // will
- // be the version of the current entity or, if no entity is present, a
- // version
- // that is strictly greater than the version of any previous entity and
- // less
- // than the version of any possible future entity.
- Version int64 `json:"version,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "ConflictDetected") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ConflictDetected") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *MutationResult) MarshalJSON() ([]byte, error) {
- type NoMethod MutationResult
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // PartitionId: A partition ID identifies a grouping of entities. The
- // grouping is always
- // by project and namespace, however the namespace ID may be empty.
- //
- // A partition ID contains several dimensions:
- // project ID and namespace ID.
- //
- // Partition dimensions:
- //
- // - May be "".
- // - Must be valid UTF-8 bytes.
- // - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
- // If the value of any dimension matches regex `__.*__`, the partition
- // is
- // reserved/read-only.
- // A reserved/read-only partition ID is forbidden in certain
- // documented
- // contexts.
- //
- // Foreign partition IDs (in which the project ID does
- // not match the context project ID ) are discouraged.
- // Reads and writes of foreign partition IDs may fail if the project is
- // not in an active state.
- type PartitionId struct {
- // NamespaceId: If not empty, the ID of the namespace to which the
- // entities belong.
- NamespaceId string `json:"namespaceId,omitempty"`
-
- // ProjectId: The ID of the project to which the entities belong.
- ProjectId string `json:"projectId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "NamespaceId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NamespaceId") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *PartitionId) MarshalJSON() ([]byte, error) {
- type NoMethod PartitionId
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // PathElement: A (kind, ID/name) pair used to construct a key path.
- //
- // If either name or ID is set, the element is complete.
- // If neither is set, the element is incomplete.
- type PathElement struct {
- // Id: The auto-allocated ID of the entity.
- // Never equal to zero. Values less than zero are discouraged and may
- // not
- // be supported in the future.
- Id int64 `json:"id,omitempty,string"`
-
- // Kind: The kind of the entity.
- // A kind matching regex `__.*__` is reserved/read-only.
- // A kind must not contain more than 1500 bytes when UTF-8
- // encoded.
- // Cannot be "".
- Kind string `json:"kind,omitempty"`
-
- // Name: The name of the entity.
- // A name matching regex `__.*__` is reserved/read-only.
- // A name must not be more than 1500 bytes when UTF-8 encoded.
- // Cannot be "".
- Name string `json:"name,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Id") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Id") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *PathElement) MarshalJSON() ([]byte, error) {
- type NoMethod PathElement
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Projection: A representation of a property in a projection.
- type Projection struct {
- // Property: The property to project.
- Property *PropertyReference `json:"property,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Property") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Property") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Projection) MarshalJSON() ([]byte, error) {
- type NoMethod Projection
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // PropertyFilter: A filter on a specific property.
- type PropertyFilter struct {
- // Op: The operator to filter by.
- //
- // Possible values:
- // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
- // "LESS_THAN" - Less than.
- // "LESS_THAN_OR_EQUAL" - Less than or equal.
- // "GREATER_THAN" - Greater than.
- // "GREATER_THAN_OR_EQUAL" - Greater than or equal.
- // "EQUAL" - Equal.
- // "HAS_ANCESTOR" - Has ancestor.
- Op string `json:"op,omitempty"`
-
- // Property: The property to filter by.
- Property *PropertyReference `json:"property,omitempty"`
-
- // Value: The value to compare the property to.
- Value *Value `json:"value,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Op") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Op") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *PropertyFilter) MarshalJSON() ([]byte, error) {
- type NoMethod PropertyFilter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // PropertyOrder: The desired order for a specific property.
- type PropertyOrder struct {
- // Direction: The direction to order by. Defaults to `ASCENDING`.
- //
- // Possible values:
- // "DIRECTION_UNSPECIFIED" - Unspecified. This value must not be used.
- // "ASCENDING" - Ascending.
- // "DESCENDING" - Descending.
- Direction string `json:"direction,omitempty"`
-
- // Property: The property to order by.
- Property *PropertyReference `json:"property,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Direction") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Direction") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *PropertyOrder) MarshalJSON() ([]byte, error) {
- type NoMethod PropertyOrder
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // PropertyReference: A reference to a property relative to the kind
- // expressions.
- type PropertyReference struct {
- // Name: The name of the property.
- // If name includes "."s, it may be interpreted as a property name path.
- Name string `json:"name,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Name") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Name") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *PropertyReference) MarshalJSON() ([]byte, error) {
- type NoMethod PropertyReference
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Query: A query for entities.
- type Query struct {
- // DistinctOn: The properties to make distinct. The query results will
- // contain the first
- // result for each distinct combination of values for the given
- // properties
- // (if empty, all results are returned).
- DistinctOn []*PropertyReference `json:"distinctOn,omitempty"`
-
- // EndCursor: An ending point for the query results. Query cursors
- // are
- // returned in query result batches and
- // [can only be used to limit the same
- // query](https://cloud.google.com/datastore/docs/concepts/queries#cursor
- // s_limits_and_offsets).
- EndCursor string `json:"endCursor,omitempty"`
-
- // Filter: The filter to apply.
- Filter *Filter `json:"filter,omitempty"`
-
- // Kind: The kinds to query (if empty, returns entities of all
- // kinds).
- // Currently at most 1 kind may be specified.
- Kind []*KindExpression `json:"kind,omitempty"`
-
- // Limit: The maximum number of results to return. Applies after all
- // other
- // constraints. Optional.
- // Unspecified is interpreted as no limit.
- // Must be >= 0 if specified.
- Limit int64 `json:"limit,omitempty"`
-
- // Offset: The number of results to skip. Applies before limit, but
- // after all other
- // constraints. Optional. Must be >= 0 if specified.
- Offset int64 `json:"offset,omitempty"`
-
- // Order: The order to apply to the query results (if empty, order is
- // unspecified).
- Order []*PropertyOrder `json:"order,omitempty"`
-
- // Projection: The projection to return. Defaults to returning all
- // properties.
- Projection []*Projection `json:"projection,omitempty"`
-
- // StartCursor: A starting point for the query results. Query cursors
- // are
- // returned in query result batches and
- // [can only be used to continue the same
- // query](https://cloud.google.com/datastore/docs/concepts/queries#cursor
- // s_limits_and_offsets).
- StartCursor string `json:"startCursor,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DistinctOn") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DistinctOn") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Query) MarshalJSON() ([]byte, error) {
- type NoMethod Query
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // QueryResultBatch: A batch of results produced by a query.
- type QueryResultBatch struct {
- // EndCursor: A cursor that points to the position after the last result
- // in the batch.
- EndCursor string `json:"endCursor,omitempty"`
-
- // EntityResultType: The result type for every entity in
- // `entity_results`.
- //
- // Possible values:
- // "RESULT_TYPE_UNSPECIFIED" - Unspecified. This value is never used.
- // "FULL" - The key and properties.
- // "PROJECTION" - A projected subset of properties. The entity may
- // have no key.
- // "KEY_ONLY" - Only the key.
- EntityResultType string `json:"entityResultType,omitempty"`
-
- // EntityResults: The results for this batch.
- EntityResults []*EntityResult `json:"entityResults,omitempty"`
-
- // MoreResults: The state of the query after the current batch.
- //
- // Possible values:
- // "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never
- // used.
- // "NOT_FINISHED" - There may be additional batches to fetch from this
- // query.
- // "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may
- // be more results after the limit.
- // "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may
- // be more results after the end
- // cursor.
- // "NO_MORE_RESULTS" - The query is finished, and there are no more
- // results.
- MoreResults string `json:"moreResults,omitempty"`
-
- // SkippedCursor: A cursor that points to the position after the last
- // skipped result.
- // Will be set when `skipped_results` != 0.
- SkippedCursor string `json:"skippedCursor,omitempty"`
-
- // SkippedResults: The number of results skipped, typically because of
- // an offset.
- SkippedResults int64 `json:"skippedResults,omitempty"`
-
- // SnapshotVersion: The version number of the snapshot this batch was
- // returned from.
- // This applies to the range of results from the query's `start_cursor`
- // (or
- // the beginning of the query if no cursor was given) to this
- // batch's
- // `end_cursor` (not the query's `end_cursor`).
- //
- // In a single transaction, subsequent query result batches for the same
- // query
- // can have a greater snapshot version number. Each batch's snapshot
- // version
- // is valid for all preceding batches.
- // The value will be zero for eventually consistent queries.
- SnapshotVersion int64 `json:"snapshotVersion,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "EndCursor") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EndCursor") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *QueryResultBatch) MarshalJSON() ([]byte, error) {
- type NoMethod QueryResultBatch
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReadOnly: Options specific to read-only transactions.
- type ReadOnly struct {
- }
-
- // ReadOptions: The options shared by read requests.
- type ReadOptions struct {
- // ReadConsistency: The non-transactional read consistency to
- // use.
- // Cannot be set to `STRONG` for global queries.
- //
- // Possible values:
- // "READ_CONSISTENCY_UNSPECIFIED" - Unspecified. This value must not
- // be used.
- // "STRONG" - Strong consistency.
- // "EVENTUAL" - Eventual consistency.
- ReadConsistency string `json:"readConsistency,omitempty"`
-
- // Transaction: The identifier of the transaction in which to read.
- // A
- // transaction identifier is returned by a call
- // to
- // Datastore.BeginTransaction.
- Transaction string `json:"transaction,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ReadConsistency") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ReadConsistency") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReadOptions) MarshalJSON() ([]byte, error) {
- type NoMethod ReadOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReadWrite: Options specific to read / write transactions.
- type ReadWrite struct {
- // PreviousTransaction: The transaction identifier of the transaction
- // being retried.
- PreviousTransaction string `json:"previousTransaction,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "PreviousTransaction")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "PreviousTransaction") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReadWrite) MarshalJSON() ([]byte, error) {
- type NoMethod ReadWrite
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReserveIdsRequest: The request for Datastore.ReserveIds.
- type ReserveIdsRequest struct {
- // DatabaseId: If not empty, the ID of the database against which to
- // make the request.
- DatabaseId string `json:"databaseId,omitempty"`
-
- // Keys: A list of keys with complete key paths whose numeric IDs should
- // not be
- // auto-allocated.
- Keys []*Key `json:"keys,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DatabaseId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DatabaseId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReserveIdsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod ReserveIdsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReserveIdsResponse: The response for Datastore.ReserveIds.
- type ReserveIdsResponse struct {
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
- }
-
- // RollbackRequest: The request for Datastore.Rollback.
- type RollbackRequest struct {
- // Transaction: The transaction identifier, returned by a call
- // to
- // Datastore.BeginTransaction.
- Transaction string `json:"transaction,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Transaction") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Transaction") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
- type NoMethod RollbackRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RollbackResponse: The response for Datastore.Rollback.
- // (an empty message).
- type RollbackResponse struct {
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
- }
-
- // RunQueryRequest: The request for Datastore.RunQuery.
- type RunQueryRequest struct {
- // GqlQuery: The GQL query to run.
- GqlQuery *GqlQuery `json:"gqlQuery,omitempty"`
-
- // PartitionId: Entities are partitioned into subsets, identified by a
- // partition ID.
- // Queries are scoped to a single partition.
- // This partition ID is normalized with the standard default
- // context
- // partition ID.
- PartitionId *PartitionId `json:"partitionId,omitempty"`
-
- // Query: The query to run.
- Query *Query `json:"query,omitempty"`
-
- // ReadOptions: The options for this query.
- ReadOptions *ReadOptions `json:"readOptions,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "GqlQuery") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "GqlQuery") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
- type NoMethod RunQueryRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RunQueryResponse: The response for Datastore.RunQuery.
- type RunQueryResponse struct {
- // Batch: A batch of query results (always present).
- Batch *QueryResultBatch `json:"batch,omitempty"`
-
- // Query: The parsed form of the `GqlQuery` from the request, if it was
- // set.
- Query *Query `json:"query,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Batch") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Batch") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RunQueryResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RunQueryResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // TransactionOptions: Options for beginning a new
- // transaction.
- //
- // Transactions can be created explicitly with calls
- // to
- // Datastore.BeginTransaction or implicitly by
- // setting
- // ReadOptions.new_transaction in read requests.
- type TransactionOptions struct {
- // ReadOnly: The transaction should only allow reads.
- ReadOnly *ReadOnly `json:"readOnly,omitempty"`
-
- // ReadWrite: The transaction should allow both reads and writes.
- ReadWrite *ReadWrite `json:"readWrite,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ReadOnly") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ReadOnly") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
- type NoMethod TransactionOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Value: A message that can hold any of the supported value types and
- // associated
- // metadata.
- type Value struct {
- // ArrayValue: An array value.
- // Cannot contain another array value.
- // A `Value` instance that sets field `array_value` must not set
- // fields
- // `meaning` or `exclude_from_indexes`.
- ArrayValue *ArrayValue `json:"arrayValue,omitempty"`
-
- // BlobValue: A blob value.
- // May have at most 1,000,000 bytes.
- // When `exclude_from_indexes` is false, may have at most 1500 bytes.
- // In JSON requests, must be base64-encoded.
- BlobValue *string `json:"blobValue,omitempty"`
-
- // BooleanValue: A boolean value.
- BooleanValue *bool `json:"booleanValue,omitempty"`
-
- // DoubleValue: A double value.
- DoubleValue *float64 `json:"doubleValue,omitempty"`
-
- // EntityValue: An entity value.
- //
- // - May have no key.
- // - May have a key with an incomplete key path.
- // - May have a reserved/read-only key.
- EntityValue *Entity `json:"entityValue,omitempty"`
-
- // ExcludeFromIndexes: If the value should be excluded from all indexes
- // including those defined
- // explicitly.
- ExcludeFromIndexes bool `json:"excludeFromIndexes,omitempty"`
-
- // GeoPointValue: A geo point value representing a point on the surface
- // of Earth.
- GeoPointValue *LatLng `json:"geoPointValue,omitempty"`
-
- // IntegerValue: An integer value.
- IntegerValue *int64 `json:"integerValue,omitempty,string"`
-
- // KeyValue: A key value.
- KeyValue *Key `json:"keyValue,omitempty"`
-
- // Meaning: The `meaning` field should only be populated for backwards
- // compatibility.
- Meaning int64 `json:"meaning,omitempty"`
-
- // NullValue: A null value.
- //
- // Possible values:
- // "NULL_VALUE" - Null value.
- NullValue string `json:"nullValue,omitempty"`
-
- // StringValue: A UTF-8 encoded string value.
- // When `exclude_from_indexes` is false (it is indexed) , may have at
- // most 1500 bytes.
- // Otherwise, may be set to at least 1,000,000 bytes.
- StringValue *string `json:"stringValue,omitempty"`
-
- // TimestampValue: A timestamp value.
- // When stored in the Datastore, precise only to microseconds;
- // any additional precision is rounded down.
- TimestampValue *string `json:"timestampValue,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ArrayValue") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ArrayValue") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Value) MarshalJSON() ([]byte, error) {
- type NoMethod Value
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- func (s *Value) UnmarshalJSON(data []byte) error {
- type NoMethod Value
- var s1 struct {
- DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"`
- *NoMethod
- }
- s1.NoMethod = (*NoMethod)(s)
- if err := json.Unmarshal(data, &s1); err != nil {
- return err
- }
- if s1.DoubleValue != nil {
- s.DoubleValue = (*float64)(s1.DoubleValue)
- }
- return nil
- }
-
- // method id "datastore.projects.allocateIds":
-
- type ProjectsAllocateIdsCall struct {
- s *Service
- projectId string
- allocateidsrequest *AllocateIdsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // AllocateIds: Allocates IDs for the given keys, which is useful for
- // referencing an entity
- // before it is inserted.
- func (r *ProjectsService) AllocateIds(projectId string, allocateidsrequest *AllocateIdsRequest) *ProjectsAllocateIdsCall {
- c := &ProjectsAllocateIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.allocateidsrequest = allocateidsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsAllocateIdsCall) Fields(s ...googleapi.Field) *ProjectsAllocateIdsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsAllocateIdsCall) Context(ctx context.Context) *ProjectsAllocateIdsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsAllocateIdsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsAllocateIdsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocateidsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:allocateIds")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.allocateIds" call.
- // Exactly one of *AllocateIdsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *AllocateIdsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsAllocateIdsCall) Do(opts ...googleapi.CallOption) (*AllocateIdsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &AllocateIdsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.",
- // "flatPath": "v1beta3/projects/{projectId}:allocateIds",
- // "httpMethod": "POST",
- // "id": "datastore.projects.allocateIds",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:allocateIds",
- // "request": {
- // "$ref": "AllocateIdsRequest"
- // },
- // "response": {
- // "$ref": "AllocateIdsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
-
- // method id "datastore.projects.beginTransaction":
-
- type ProjectsBeginTransactionCall struct {
- s *Service
- projectId string
- begintransactionrequest *BeginTransactionRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // BeginTransaction: Begins a new transaction.
- func (r *ProjectsService) BeginTransaction(projectId string, begintransactionrequest *BeginTransactionRequest) *ProjectsBeginTransactionCall {
- c := &ProjectsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.begintransactionrequest = begintransactionrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsBeginTransactionCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsBeginTransactionCall) Context(ctx context.Context) *ProjectsBeginTransactionCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsBeginTransactionCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:beginTransaction")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.beginTransaction" call.
- // Exactly one of *BeginTransactionResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *BeginTransactionResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &BeginTransactionResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Begins a new transaction.",
- // "flatPath": "v1beta3/projects/{projectId}:beginTransaction",
- // "httpMethod": "POST",
- // "id": "datastore.projects.beginTransaction",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:beginTransaction",
- // "request": {
- // "$ref": "BeginTransactionRequest"
- // },
- // "response": {
- // "$ref": "BeginTransactionResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
-
- // method id "datastore.projects.commit":
-
- type ProjectsCommitCall struct {
- s *Service
- projectId string
- commitrequest *CommitRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Commit: Commits a transaction, optionally creating, deleting or
- // modifying some
- // entities.
- func (r *ProjectsService) Commit(projectId string, commitrequest *CommitRequest) *ProjectsCommitCall {
- c := &ProjectsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.commitrequest = commitrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsCommitCall) Fields(s ...googleapi.Field) *ProjectsCommitCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsCommitCall) Context(ctx context.Context) *ProjectsCommitCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsCommitCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsCommitCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:commit")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.commit" call.
- // Exactly one of *CommitResponse or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *CommitResponse.ServerResponse.Header or (if a response was returned
- // at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &CommitResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.",
- // "flatPath": "v1beta3/projects/{projectId}:commit",
- // "httpMethod": "POST",
- // "id": "datastore.projects.commit",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:commit",
- // "request": {
- // "$ref": "CommitRequest"
- // },
- // "response": {
- // "$ref": "CommitResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
-
- // method id "datastore.projects.lookup":
-
- type ProjectsLookupCall struct {
- s *Service
- projectId string
- lookuprequest *LookupRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Lookup: Looks up entities by key.
- func (r *ProjectsService) Lookup(projectId string, lookuprequest *LookupRequest) *ProjectsLookupCall {
- c := &ProjectsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.lookuprequest = lookuprequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsLookupCall) Fields(s ...googleapi.Field) *ProjectsLookupCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsLookupCall) Context(ctx context.Context) *ProjectsLookupCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsLookupCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsLookupCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuprequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:lookup")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.lookup" call.
- // Exactly one of *LookupResponse or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *LookupResponse.ServerResponse.Header or (if a response was returned
- // at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsLookupCall) Do(opts ...googleapi.CallOption) (*LookupResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &LookupResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Looks up entities by key.",
- // "flatPath": "v1beta3/projects/{projectId}:lookup",
- // "httpMethod": "POST",
- // "id": "datastore.projects.lookup",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:lookup",
- // "request": {
- // "$ref": "LookupRequest"
- // },
- // "response": {
- // "$ref": "LookupResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
-
- // method id "datastore.projects.reserveIds":
-
- type ProjectsReserveIdsCall struct {
- s *Service
- projectId string
- reserveidsrequest *ReserveIdsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // ReserveIds: Prevents the supplied keys' IDs from being auto-allocated
- // by Cloud
- // Datastore.
- func (r *ProjectsService) ReserveIds(projectId string, reserveidsrequest *ReserveIdsRequest) *ProjectsReserveIdsCall {
- c := &ProjectsReserveIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.reserveidsrequest = reserveidsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsReserveIdsCall) Fields(s ...googleapi.Field) *ProjectsReserveIdsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsReserveIdsCall) Context(ctx context.Context) *ProjectsReserveIdsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsReserveIdsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsReserveIdsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.reserveidsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:reserveIds")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.reserveIds" call.
- // Exactly one of *ReserveIdsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ReserveIdsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsReserveIdsCall) Do(opts ...googleapi.CallOption) (*ReserveIdsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ReserveIdsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Prevents the supplied keys' IDs from being auto-allocated by Cloud\nDatastore.",
- // "flatPath": "v1beta3/projects/{projectId}:reserveIds",
- // "httpMethod": "POST",
- // "id": "datastore.projects.reserveIds",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:reserveIds",
- // "request": {
- // "$ref": "ReserveIdsRequest"
- // },
- // "response": {
- // "$ref": "ReserveIdsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
-
- // method id "datastore.projects.rollback":
-
- type ProjectsRollbackCall struct {
- s *Service
- projectId string
- rollbackrequest *RollbackRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Rollback: Rolls back a transaction.
- func (r *ProjectsService) Rollback(projectId string, rollbackrequest *RollbackRequest) *ProjectsRollbackCall {
- c := &ProjectsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.rollbackrequest = rollbackrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsRollbackCall) Fields(s ...googleapi.Field) *ProjectsRollbackCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsRollbackCall) Context(ctx context.Context) *ProjectsRollbackCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsRollbackCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsRollbackCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:rollback")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.rollback" call.
- // Exactly one of *RollbackResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RollbackResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RollbackResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Rolls back a transaction.",
- // "flatPath": "v1beta3/projects/{projectId}:rollback",
- // "httpMethod": "POST",
- // "id": "datastore.projects.rollback",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:rollback",
- // "request": {
- // "$ref": "RollbackRequest"
- // },
- // "response": {
- // "$ref": "RollbackResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
-
- // method id "datastore.projects.runQuery":
-
- type ProjectsRunQueryCall struct {
- s *Service
- projectId string
- runqueryrequest *RunQueryRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // RunQuery: Queries for entities.
- func (r *ProjectsService) RunQuery(projectId string, runqueryrequest *RunQueryRequest) *ProjectsRunQueryCall {
- c := &ProjectsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.projectId = projectId
- c.runqueryrequest = runqueryrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ProjectsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsRunQueryCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ProjectsRunQueryCall) Context(ctx context.Context) *ProjectsRunQueryCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ProjectsRunQueryCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ProjectsRunQueryCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:runQuery")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "projectId": c.projectId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "datastore.projects.runQuery" call.
- // Exactly one of *RunQueryResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RunQueryResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ProjectsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RunQueryResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Queries for entities.",
- // "flatPath": "v1beta3/projects/{projectId}:runQuery",
- // "httpMethod": "POST",
- // "id": "datastore.projects.runQuery",
- // "parameterOrder": [
- // "projectId"
- // ],
- // "parameters": {
- // "projectId": {
- // "description": "The ID of the project against which to make the request.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1beta3/projects/{projectId}:runQuery",
- // "request": {
- // "$ref": "RunQueryRequest"
- // },
- // "response": {
- // "$ref": "RunQueryResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/datastore"
- // ]
- // }
-
- }
|