appengine-gen.go 114 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215
  1. // Package appengine provides access to the Google App Engine Admin API.
  2. //
  3. // See https://cloud.google.com/appengine/docs/admin-api/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/appengine/v1beta4"
  8. // ...
  9. // appengineService, err := appengine.New(oauthHttpClient)
  10. package appengine // import "google.golang.org/api/appengine/v1beta4"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "appengine:v1beta4"
  41. const apiName = "appengine"
  42. const apiVersion = "v1beta4"
  43. const basePath = "https://appengine.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. )
  49. func New(client *http.Client) (*Service, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &Service{client: client, BasePath: basePath}
  54. s.Apps = NewAppsService(s)
  55. return s, nil
  56. }
  57. type Service struct {
  58. client *http.Client
  59. BasePath string // API endpoint base URL
  60. UserAgent string // optional additional User-Agent fragment
  61. Apps *AppsService
  62. }
  63. func (s *Service) userAgent() string {
  64. if s.UserAgent == "" {
  65. return googleapi.UserAgent
  66. }
  67. return googleapi.UserAgent + " " + s.UserAgent
  68. }
  69. func NewAppsService(s *Service) *AppsService {
  70. rs := &AppsService{s: s}
  71. rs.Modules = NewAppsModulesService(s)
  72. rs.Operations = NewAppsOperationsService(s)
  73. return rs
  74. }
  75. type AppsService struct {
  76. s *Service
  77. Modules *AppsModulesService
  78. Operations *AppsOperationsService
  79. }
  80. func NewAppsModulesService(s *Service) *AppsModulesService {
  81. rs := &AppsModulesService{s: s}
  82. rs.Versions = NewAppsModulesVersionsService(s)
  83. return rs
  84. }
  85. type AppsModulesService struct {
  86. s *Service
  87. Versions *AppsModulesVersionsService
  88. }
  89. func NewAppsModulesVersionsService(s *Service) *AppsModulesVersionsService {
  90. rs := &AppsModulesVersionsService{s: s}
  91. return rs
  92. }
  93. type AppsModulesVersionsService struct {
  94. s *Service
  95. }
  96. func NewAppsOperationsService(s *Service) *AppsOperationsService {
  97. rs := &AppsOperationsService{s: s}
  98. return rs
  99. }
  100. type AppsOperationsService struct {
  101. s *Service
  102. }
  103. // ApiConfigHandler: API Serving configuration for Cloud Endpoints.
  104. type ApiConfigHandler struct {
  105. // AuthFailAction: For users not logged in, how to handle access to
  106. // resources with required login. Defaults to "redirect".
  107. //
  108. // Possible values:
  109. // "AUTH_FAIL_ACTION_UNSPECIFIED"
  110. // "AUTH_FAIL_ACTION_REDIRECT"
  111. // "AUTH_FAIL_ACTION_UNAUTHORIZED"
  112. AuthFailAction string `json:"authFailAction,omitempty"`
  113. // Login: What level of login is required to access this resource.
  114. // Default is "optional".
  115. //
  116. // Possible values:
  117. // "LOGIN_UNSPECIFIED"
  118. // "LOGIN_OPTIONAL"
  119. // "LOGIN_ADMIN"
  120. // "LOGIN_REQUIRED"
  121. Login string `json:"login,omitempty"`
  122. // Script: Specifies the path to the script from the application root
  123. // directory.
  124. Script string `json:"script,omitempty"`
  125. // SecurityLevel: Configures whether security (HTTPS) should be enforced
  126. // for this URL.
  127. //
  128. // Possible values:
  129. // "SECURE_UNSPECIFIED"
  130. // "SECURE_DEFAULT"
  131. // "SECURE_NEVER"
  132. // "SECURE_OPTIONAL"
  133. // "SECURE_ALWAYS"
  134. SecurityLevel string `json:"securityLevel,omitempty"`
  135. // Url: URL to serve the endpoint at.
  136. Url string `json:"url,omitempty"`
  137. // ForceSendFields is a list of field names (e.g. "AuthFailAction") to
  138. // unconditionally include in API requests. By default, fields with
  139. // empty values are omitted from API requests. However, any non-pointer,
  140. // non-interface field appearing in ForceSendFields will be sent to the
  141. // server regardless of whether the field is empty or not. This may be
  142. // used to include empty fields in Patch requests.
  143. ForceSendFields []string `json:"-"`
  144. }
  145. func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) {
  146. type noMethod ApiConfigHandler
  147. raw := noMethod(*s)
  148. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  149. }
  150. // ApiEndpointHandler: Use Google Cloud Endpoints to handle requests.
  151. type ApiEndpointHandler struct {
  152. // ScriptPath: Specifies the path to the script from the application
  153. // root directory.
  154. ScriptPath string `json:"scriptPath,omitempty"`
  155. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  156. // unconditionally include in API requests. By default, fields with
  157. // empty values are omitted from API requests. However, any non-pointer,
  158. // non-interface field appearing in ForceSendFields will be sent to the
  159. // server regardless of whether the field is empty or not. This may be
  160. // used to include empty fields in Patch requests.
  161. ForceSendFields []string `json:"-"`
  162. }
  163. func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) {
  164. type noMethod ApiEndpointHandler
  165. raw := noMethod(*s)
  166. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  167. }
  168. // Application: An Application contains the top-level configuration of
  169. // an App Engine application.
  170. type Application struct {
  171. // CodeBucket: A Google Cloud Storage bucket which can be used for
  172. // storing files associated with an application. This bucket is
  173. // associated with the application and can be used by the gcloud
  174. // deployment commands. @OutputOnly
  175. CodeBucket string `json:"codeBucket,omitempty"`
  176. // DefaultBucket: A Google Cloud Storage bucket which can be used by the
  177. // application to store content. @OutputOnly
  178. DefaultBucket string `json:"defaultBucket,omitempty"`
  179. // DispatchRules: HTTP path dispatch rules for requests to the app that
  180. // do not explicitly target a module or version. The rules are
  181. // order-dependent.
  182. DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"`
  183. // Id: The relative name/path of the application. Example: "myapp".
  184. // @OutputOnly
  185. Id string `json:"id,omitempty"`
  186. // Location: The location from which the application will be run.
  187. // Choices are "us-central" for United States and "europe-west" for
  188. // European Union. Application instances will run out of data centers in
  189. // the chosen location and all of the application's End User Content
  190. // will be stored at rest in the chosen location. The default is
  191. // "us-central".
  192. Location string `json:"location,omitempty"`
  193. // Name: The full path to the application in the API. Example:
  194. // "apps/myapp". @OutputOnly
  195. Name string `json:"name,omitempty"`
  196. // ServerResponse contains the HTTP response code and headers from the
  197. // server.
  198. googleapi.ServerResponse `json:"-"`
  199. // ForceSendFields is a list of field names (e.g. "CodeBucket") to
  200. // unconditionally include in API requests. By default, fields with
  201. // empty values are omitted from API requests. However, any non-pointer,
  202. // non-interface field appearing in ForceSendFields will be sent to the
  203. // server regardless of whether the field is empty or not. This may be
  204. // used to include empty fields in Patch requests.
  205. ForceSendFields []string `json:"-"`
  206. }
  207. func (s *Application) MarshalJSON() ([]byte, error) {
  208. type noMethod Application
  209. raw := noMethod(*s)
  210. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  211. }
  212. // AutomaticScaling: Automatic scaling is the scaling policy that App
  213. // Engine has used since its inception. It is based on request rate,
  214. // response latencies, and other application metrics.
  215. type AutomaticScaling struct {
  216. // CoolDownPeriod: The amount of time that the
  217. // [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
  218. // should wait between changes to the number of virtual machines.
  219. // Applies only to the VM runtime.
  220. CoolDownPeriod string `json:"coolDownPeriod,omitempty"`
  221. // CpuUtilization: Target scaling by CPU usage.
  222. CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"`
  223. // DiskUtilization: Target scaling by disk usage.
  224. DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
  225. // MaxConcurrentRequests: The number of concurrent requests an automatic
  226. // scaling instance can accept before the scheduler spawns a new
  227. // instance. Default value is chosen based on the runtime.
  228. MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
  229. // MaxIdleInstances: The maximum number of idle instances that App
  230. // Engine should maintain for this version.
  231. MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
  232. // MaxPendingLatency: The maximum amount of time that App Engine should
  233. // allow a request to wait in the pending queue before starting a new
  234. // instance to handle it.
  235. MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
  236. // MaxTotalInstances: Max number of instances that App Engine should
  237. // start to handle requests.
  238. MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
  239. // MinIdleInstances: The minimum number of idle instances that App
  240. // Engine should maintain for this version. Only applies to the default
  241. // version of a module, since other versions are not expected to receive
  242. // significant traffic.
  243. MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
  244. // MinPendingLatency: The minimum amount of time that App Engine should
  245. // allow a request to wait in the pending queue before starting a new
  246. // instance to handle it.
  247. MinPendingLatency string `json:"minPendingLatency,omitempty"`
  248. // MinTotalInstances: Minimum number of instances that App Engine should
  249. // maintain.
  250. MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
  251. // NetworkUtilization: Target scaling by network usage.
  252. NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
  253. // RequestUtilization: Target scaling by request utilization.
  254. RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
  255. // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
  256. // unconditionally include in API requests. By default, fields with
  257. // empty values are omitted from API requests. However, any non-pointer,
  258. // non-interface field appearing in ForceSendFields will be sent to the
  259. // server regardless of whether the field is empty or not. This may be
  260. // used to include empty fields in Patch requests.
  261. ForceSendFields []string `json:"-"`
  262. }
  263. func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
  264. type noMethod AutomaticScaling
  265. raw := noMethod(*s)
  266. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  267. }
  268. // BasicScaling: A module with basic scaling will create an instance
  269. // when the application receives a request. The instance will be turned
  270. // down when the app becomes idle. Basic scaling is ideal for work that
  271. // is intermittent or driven by user activity.
  272. type BasicScaling struct {
  273. // IdleTimeout: The instance will be shut down this amount of time after
  274. // receiving its last request.
  275. IdleTimeout string `json:"idleTimeout,omitempty"`
  276. // MaxInstances: The maximum number of instances for App Engine to
  277. // create for this version.
  278. MaxInstances int64 `json:"maxInstances,omitempty"`
  279. // ForceSendFields is a list of field names (e.g. "IdleTimeout") to
  280. // unconditionally include in API requests. By default, fields with
  281. // empty values are omitted from API requests. However, any non-pointer,
  282. // non-interface field appearing in ForceSendFields will be sent to the
  283. // server regardless of whether the field is empty or not. This may be
  284. // used to include empty fields in Patch requests.
  285. ForceSendFields []string `json:"-"`
  286. }
  287. func (s *BasicScaling) MarshalJSON() ([]byte, error) {
  288. type noMethod BasicScaling
  289. raw := noMethod(*s)
  290. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  291. }
  292. // ContainerInfo: A Docker (container) image which should be used to
  293. // start the application.
  294. type ContainerInfo struct {
  295. // Image: Reference to a hosted container image. Must be a URI to a
  296. // resource in a Docker repository. Must be fully qualified, including
  297. // tag or digest. e.g. gcr.io/my-project/image:tag or
  298. // gcr.io/my-project/image@digest
  299. Image string `json:"image,omitempty"`
  300. // ForceSendFields is a list of field names (e.g. "Image") to
  301. // unconditionally include in API requests. By default, fields with
  302. // empty values are omitted from API requests. However, any non-pointer,
  303. // non-interface field appearing in ForceSendFields will be sent to the
  304. // server regardless of whether the field is empty or not. This may be
  305. // used to include empty fields in Patch requests.
  306. ForceSendFields []string `json:"-"`
  307. }
  308. func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
  309. type noMethod ContainerInfo
  310. raw := noMethod(*s)
  311. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  312. }
  313. // CpuUtilization: Target scaling by CPU usage.
  314. type CpuUtilization struct {
  315. // AggregationWindowLength: The period of time over which CPU
  316. // utilization is calculated.
  317. AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
  318. // TargetUtilization: Target (0-1) CPU utilization ratio to maintain
  319. // when scaling.
  320. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  321. // ForceSendFields is a list of field names (e.g.
  322. // "AggregationWindowLength") to unconditionally include in API
  323. // requests. By default, fields with empty values are omitted from API
  324. // requests. However, any non-pointer, non-interface field appearing in
  325. // ForceSendFields will be sent to the server regardless of whether the
  326. // field is empty or not. This may be used to include empty fields in
  327. // Patch requests.
  328. ForceSendFields []string `json:"-"`
  329. }
  330. func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
  331. type noMethod CpuUtilization
  332. raw := noMethod(*s)
  333. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  334. }
  335. // Deployment: Code and application artifacts used to deploy a version
  336. // to App Engine.
  337. type Deployment struct {
  338. // Container: If supplied, a docker (container) image which should be
  339. // used to start the application. Only applicable to the 'vm' runtime.
  340. Container *ContainerInfo `json:"container,omitempty"`
  341. // Files: A manifest of files stored in Google Cloud Storage which
  342. // should be included as part of this application. All files must be
  343. // readable using the credentials supplied with this call.
  344. Files map[string]FileInfo `json:"files,omitempty"`
  345. // SourceReferences: The origin of the source code for this deployment.
  346. // There can be more than one source reference per Version if source
  347. // code is distributed among multiple repositories.
  348. SourceReferences []*SourceReference `json:"sourceReferences,omitempty"`
  349. // ForceSendFields is a list of field names (e.g. "Container") to
  350. // unconditionally include in API requests. By default, fields with
  351. // empty values are omitted from API requests. However, any non-pointer,
  352. // non-interface field appearing in ForceSendFields will be sent to the
  353. // server regardless of whether the field is empty or not. This may be
  354. // used to include empty fields in Patch requests.
  355. ForceSendFields []string `json:"-"`
  356. }
  357. func (s *Deployment) MarshalJSON() ([]byte, error) {
  358. type noMethod Deployment
  359. raw := noMethod(*s)
  360. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  361. }
  362. // DiskUtilization: Target scaling by disk usage (for VM runtimes only).
  363. type DiskUtilization struct {
  364. // TargetReadBytesPerSec: Target bytes per second read.
  365. TargetReadBytesPerSec int64 `json:"targetReadBytesPerSec,omitempty"`
  366. // TargetReadOpsPerSec: Target ops per second read.
  367. TargetReadOpsPerSec int64 `json:"targetReadOpsPerSec,omitempty"`
  368. // TargetWriteBytesPerSec: Target bytes per second written.
  369. TargetWriteBytesPerSec int64 `json:"targetWriteBytesPerSec,omitempty"`
  370. // TargetWriteOpsPerSec: Target ops per second written.
  371. TargetWriteOpsPerSec int64 `json:"targetWriteOpsPerSec,omitempty"`
  372. // ForceSendFields is a list of field names (e.g.
  373. // "TargetReadBytesPerSec") to unconditionally include in API requests.
  374. // By default, fields with empty values are omitted from API requests.
  375. // However, any non-pointer, non-interface field appearing in
  376. // ForceSendFields will be sent to the server regardless of whether the
  377. // field is empty or not. This may be used to include empty fields in
  378. // Patch requests.
  379. ForceSendFields []string `json:"-"`
  380. }
  381. func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
  382. type noMethod DiskUtilization
  383. raw := noMethod(*s)
  384. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  385. }
  386. // ErrorHandler: A custom static error page to be served when an error
  387. // occurs.
  388. type ErrorHandler struct {
  389. // ErrorCode: The error condition this handler applies to.
  390. //
  391. // Possible values:
  392. // "ERROR_CODE_UNSPECIFIED"
  393. // "ERROR_CODE_DEFAULT"
  394. // "ERROR_CODE_OVER_QUOTA"
  395. // "ERROR_CODE_DOS_API_DENIAL"
  396. // "ERROR_CODE_TIMEOUT"
  397. ErrorCode string `json:"errorCode,omitempty"`
  398. // MimeType: MIME type of file. If unspecified, "text/html" is assumed.
  399. MimeType string `json:"mimeType,omitempty"`
  400. // StaticFile: Static file content to be served for this error.
  401. StaticFile string `json:"staticFile,omitempty"`
  402. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  403. // unconditionally include in API requests. By default, fields with
  404. // empty values are omitted from API requests. However, any non-pointer,
  405. // non-interface field appearing in ForceSendFields will be sent to the
  406. // server regardless of whether the field is empty or not. This may be
  407. // used to include empty fields in Patch requests.
  408. ForceSendFields []string `json:"-"`
  409. }
  410. func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
  411. type noMethod ErrorHandler
  412. raw := noMethod(*s)
  413. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  414. }
  415. // FileInfo: A single source file which is part of the application to be
  416. // deployed.
  417. type FileInfo struct {
  418. // MimeType: The MIME type of the file; if unspecified, the value from
  419. // Google Cloud Storage will be used.
  420. MimeType string `json:"mimeType,omitempty"`
  421. // Sha1Sum: The SHA1 (160 bits) hash of the file in hex.
  422. Sha1Sum string `json:"sha1Sum,omitempty"`
  423. // SourceUrl: The URL source to use to fetch this file. Must be a URL to
  424. // a resource in Google Cloud Storage in the form
  425. // 'http(s)://storage.googleapis.com/\/\'.
  426. SourceUrl string `json:"sourceUrl,omitempty"`
  427. // ForceSendFields is a list of field names (e.g. "MimeType") to
  428. // unconditionally include in API requests. By default, fields with
  429. // empty values are omitted from API requests. However, any non-pointer,
  430. // non-interface field appearing in ForceSendFields will be sent to the
  431. // server regardless of whether the field is empty or not. This may be
  432. // used to include empty fields in Patch requests.
  433. ForceSendFields []string `json:"-"`
  434. }
  435. func (s *FileInfo) MarshalJSON() ([]byte, error) {
  436. type noMethod FileInfo
  437. raw := noMethod(*s)
  438. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  439. }
  440. // HealthCheck: Configure health checking for the VM instances.
  441. // Unhealthy VM instances will be killed and replaced with new
  442. // instances.
  443. type HealthCheck struct {
  444. // CheckInterval: The interval between health checks.
  445. CheckInterval string `json:"checkInterval,omitempty"`
  446. // DisableHealthCheck: Whether to explicitly disable health checks for
  447. // this instance.
  448. DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
  449. // HealthyThreshold: The number of consecutive successful health checks
  450. // before receiving traffic.
  451. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  452. // Host: The host header to send when performing an HTTP health check
  453. // (e.g. myapp.appspot.com)
  454. Host string `json:"host,omitempty"`
  455. // RestartThreshold: The number of consecutive failed health checks
  456. // before an instance is restarted.
  457. RestartThreshold int64 `json:"restartThreshold,omitempty"`
  458. // Timeout: The amount of time before the health check is considered
  459. // failed.
  460. Timeout string `json:"timeout,omitempty"`
  461. // UnhealthyThreshold: The number of consecutive failed health checks
  462. // before removing traffic.
  463. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  464. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  465. // unconditionally include in API requests. By default, fields with
  466. // empty values are omitted from API requests. However, any non-pointer,
  467. // non-interface field appearing in ForceSendFields will be sent to the
  468. // server regardless of whether the field is empty or not. This may be
  469. // used to include empty fields in Patch requests.
  470. ForceSendFields []string `json:"-"`
  471. }
  472. func (s *HealthCheck) MarshalJSON() ([]byte, error) {
  473. type noMethod HealthCheck
  474. raw := noMethod(*s)
  475. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  476. }
  477. // Library: A Python runtime third-party library required by the
  478. // application.
  479. type Library struct {
  480. // Name: The name of the library, e.g. "PIL" or "django".
  481. Name string `json:"name,omitempty"`
  482. // Version: The version of the library to select, or "latest".
  483. Version string `json:"version,omitempty"`
  484. // ForceSendFields is a list of field names (e.g. "Name") to
  485. // unconditionally include in API requests. By default, fields with
  486. // empty values are omitted from API requests. However, any non-pointer,
  487. // non-interface field appearing in ForceSendFields will be sent to the
  488. // server regardless of whether the field is empty or not. This may be
  489. // used to include empty fields in Patch requests.
  490. ForceSendFields []string `json:"-"`
  491. }
  492. func (s *Library) MarshalJSON() ([]byte, error) {
  493. type noMethod Library
  494. raw := noMethod(*s)
  495. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  496. }
  497. // ListModulesResponse: Response message for `Modules.ListModules`.
  498. type ListModulesResponse struct {
  499. // Modules: The modules belonging to the requested application.
  500. Modules []*Module `json:"modules,omitempty"`
  501. // NextPageToken: Continuation token for fetching the next page of
  502. // results.
  503. NextPageToken string `json:"nextPageToken,omitempty"`
  504. // ServerResponse contains the HTTP response code and headers from the
  505. // server.
  506. googleapi.ServerResponse `json:"-"`
  507. // ForceSendFields is a list of field names (e.g. "Modules") to
  508. // unconditionally include in API requests. By default, fields with
  509. // empty values are omitted from API requests. However, any non-pointer,
  510. // non-interface field appearing in ForceSendFields will be sent to the
  511. // server regardless of whether the field is empty or not. This may be
  512. // used to include empty fields in Patch requests.
  513. ForceSendFields []string `json:"-"`
  514. }
  515. func (s *ListModulesResponse) MarshalJSON() ([]byte, error) {
  516. type noMethod ListModulesResponse
  517. raw := noMethod(*s)
  518. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  519. }
  520. // ListOperationsResponse: The response message for
  521. // Operations.ListOperations.
  522. type ListOperationsResponse struct {
  523. // NextPageToken: The standard List next-page token.
  524. NextPageToken string `json:"nextPageToken,omitempty"`
  525. // Operations: A list of operations that matches the specified filter in
  526. // the request.
  527. Operations []*Operation `json:"operations,omitempty"`
  528. // ServerResponse contains the HTTP response code and headers from the
  529. // server.
  530. googleapi.ServerResponse `json:"-"`
  531. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  532. // unconditionally include in API requests. By default, fields with
  533. // empty values are omitted from API requests. However, any non-pointer,
  534. // non-interface field appearing in ForceSendFields will be sent to the
  535. // server regardless of whether the field is empty or not. This may be
  536. // used to include empty fields in Patch requests.
  537. ForceSendFields []string `json:"-"`
  538. }
  539. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  540. type noMethod ListOperationsResponse
  541. raw := noMethod(*s)
  542. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  543. }
  544. // ListVersionsResponse: Response message for `Versions.ListVersions`.
  545. type ListVersionsResponse struct {
  546. // NextPageToken: Continuation token for fetching the next page of
  547. // results.
  548. NextPageToken string `json:"nextPageToken,omitempty"`
  549. // Versions: The versions belonging to the requested application module.
  550. Versions []*Version `json:"versions,omitempty"`
  551. // ServerResponse contains the HTTP response code and headers from the
  552. // server.
  553. googleapi.ServerResponse `json:"-"`
  554. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  555. // unconditionally include in API requests. By default, fields with
  556. // empty values are omitted from API requests. However, any non-pointer,
  557. // non-interface field appearing in ForceSendFields will be sent to the
  558. // server regardless of whether the field is empty or not. This may be
  559. // used to include empty fields in Patch requests.
  560. ForceSendFields []string `json:"-"`
  561. }
  562. func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  563. type noMethod ListVersionsResponse
  564. raw := noMethod(*s)
  565. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  566. }
  567. // ManualScaling: A module with manual scaling runs continuously,
  568. // allowing you to perform complex initialization and rely on the state
  569. // of its memory over time.
  570. type ManualScaling struct {
  571. // Instances: The number of instances to assign to the module at the
  572. // start. This number can later be altered by using the [Modules
  573. // API](https://cloud.google.com/appengine/docs/python/modules/functions)
  574. // `set_num_instances()` function.
  575. Instances int64 `json:"instances,omitempty"`
  576. // ForceSendFields is a list of field names (e.g. "Instances") to
  577. // unconditionally include in API requests. By default, fields with
  578. // empty values are omitted from API requests. However, any non-pointer,
  579. // non-interface field appearing in ForceSendFields will be sent to the
  580. // server regardless of whether the field is empty or not. This may be
  581. // used to include empty fields in Patch requests.
  582. ForceSendFields []string `json:"-"`
  583. }
  584. func (s *ManualScaling) MarshalJSON() ([]byte, error) {
  585. type noMethod ManualScaling
  586. raw := noMethod(*s)
  587. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  588. }
  589. // Module: A module is a component of an application that provides a
  590. // single service or configuration. A module has a collection of
  591. // versions that define a specific set of code used to implement the
  592. // functionality of that module.
  593. type Module struct {
  594. // Id: The relative name/path of the module within the application.
  595. // Example: "default" @OutputOnly
  596. Id string `json:"id,omitempty"`
  597. // Name: The full path to the Module resource in the API. Example:
  598. // "apps/myapp/modules/default" @OutputOnly
  599. Name string `json:"name,omitempty"`
  600. // Split: A mapping that defines fractional HTTP traffic diversion to
  601. // different versions within the module.
  602. Split *TrafficSplit `json:"split,omitempty"`
  603. // ServerResponse contains the HTTP response code and headers from the
  604. // server.
  605. googleapi.ServerResponse `json:"-"`
  606. // ForceSendFields is a list of field names (e.g. "Id") to
  607. // unconditionally include in API requests. By default, fields with
  608. // empty values are omitted from API requests. However, any non-pointer,
  609. // non-interface field appearing in ForceSendFields will be sent to the
  610. // server regardless of whether the field is empty or not. This may be
  611. // used to include empty fields in Patch requests.
  612. ForceSendFields []string `json:"-"`
  613. }
  614. func (s *Module) MarshalJSON() ([]byte, error) {
  615. type noMethod Module
  616. raw := noMethod(*s)
  617. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  618. }
  619. // Network: Used to specify extra network settings (for VM runtimes
  620. // only).
  621. type Network struct {
  622. // ForwardedPorts: A list of ports (or port pairs) to forward from the
  623. // VM into the app container.
  624. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  625. // InstanceTag: A tag to apply to the VM instance during creation.
  626. InstanceTag string `json:"instanceTag,omitempty"`
  627. // Name: The Google Compute Engine network where the VMs will be
  628. // created. If not specified, or empty, the network named "default" will
  629. // be used. (The short name should be specified, not the resource path.)
  630. Name string `json:"name,omitempty"`
  631. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  632. // unconditionally include in API requests. By default, fields with
  633. // empty values are omitted from API requests. However, any non-pointer,
  634. // non-interface field appearing in ForceSendFields will be sent to the
  635. // server regardless of whether the field is empty or not. This may be
  636. // used to include empty fields in Patch requests.
  637. ForceSendFields []string `json:"-"`
  638. }
  639. func (s *Network) MarshalJSON() ([]byte, error) {
  640. type noMethod Network
  641. raw := noMethod(*s)
  642. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  643. }
  644. // NetworkUtilization: Target scaling by network usage (for VM runtimes
  645. // only).
  646. type NetworkUtilization struct {
  647. // TargetReceivedBytesPerSec: Target bytes per second received.
  648. TargetReceivedBytesPerSec int64 `json:"targetReceivedBytesPerSec,omitempty"`
  649. // TargetReceivedPacketsPerSec: Target packets per second received.
  650. TargetReceivedPacketsPerSec int64 `json:"targetReceivedPacketsPerSec,omitempty"`
  651. // TargetSentBytesPerSec: Target bytes per second sent.
  652. TargetSentBytesPerSec int64 `json:"targetSentBytesPerSec,omitempty"`
  653. // TargetSentPacketsPerSec: Target packets per second sent.
  654. TargetSentPacketsPerSec int64 `json:"targetSentPacketsPerSec,omitempty"`
  655. // ForceSendFields is a list of field names (e.g.
  656. // "TargetReceivedBytesPerSec") to unconditionally include in API
  657. // requests. By default, fields with empty values are omitted from API
  658. // requests. However, any non-pointer, non-interface field appearing in
  659. // ForceSendFields will be sent to the server regardless of whether the
  660. // field is empty or not. This may be used to include empty fields in
  661. // Patch requests.
  662. ForceSendFields []string `json:"-"`
  663. }
  664. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  665. type noMethod NetworkUtilization
  666. raw := noMethod(*s)
  667. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  668. }
  669. // Operation: This resource represents a long-running operation that is
  670. // the result of a network API call.
  671. type Operation struct {
  672. // Done: If the value is `false`, it means the operation is still in
  673. // progress. If true, the operation is completed, and either `error` or
  674. // `response` is available.
  675. Done bool `json:"done,omitempty"`
  676. // Error: The error result of the operation in case of failure.
  677. Error *Status `json:"error,omitempty"`
  678. // Metadata: Service-specific metadata associated with the operation. It
  679. // typically contains progress information and common metadata such as
  680. // create time. Some services might not provide such metadata. Any
  681. // method that returns a long-running operation should document the
  682. // metadata type, if any.
  683. Metadata OperationMetadata `json:"metadata,omitempty"`
  684. // Name: The server-assigned name, which is only unique within the same
  685. // service that originally returns it. If you use the default HTTP
  686. // mapping above, the `name` should have the format of
  687. // `operations/some/unique/name`.
  688. Name string `json:"name,omitempty"`
  689. // Response: The normal response of the operation in case of success. If
  690. // the original method returns no data on success, such as `Delete`, the
  691. // response is `google.protobuf.Empty`. If the original method is
  692. // standard `Get`/`Create`/`Update`, the response should be the
  693. // resource. For other methods, the response should have the type
  694. // `XxxResponse`, where `Xxx` is the original method name. For example,
  695. // if the original method name is `TakeSnapshot()`, the inferred
  696. // response type is `TakeSnapshotResponse`.
  697. Response OperationResponse `json:"response,omitempty"`
  698. // ServerResponse contains the HTTP response code and headers from the
  699. // server.
  700. googleapi.ServerResponse `json:"-"`
  701. // ForceSendFields is a list of field names (e.g. "Done") to
  702. // unconditionally include in API requests. By default, fields with
  703. // empty values are omitted from API requests. However, any non-pointer,
  704. // non-interface field appearing in ForceSendFields will be sent to the
  705. // server regardless of whether the field is empty or not. This may be
  706. // used to include empty fields in Patch requests.
  707. ForceSendFields []string `json:"-"`
  708. }
  709. func (s *Operation) MarshalJSON() ([]byte, error) {
  710. type noMethod Operation
  711. raw := noMethod(*s)
  712. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  713. }
  714. type OperationMetadata interface{}
  715. type OperationResponse interface{}
  716. // OperationMetadata1: Metadata for the given
  717. // google.longrunning.Operation.
  718. type OperationMetadata1 struct {
  719. // EndTime: Timestamp that this operation was completed. (Not present if
  720. // the operation is still in progress.) @OutputOnly
  721. EndTime string `json:"endTime,omitempty"`
  722. // InsertTime: Timestamp that this operation was received. @OutputOnly
  723. InsertTime string `json:"insertTime,omitempty"`
  724. // Method: API method name that initiated the operation. Example:
  725. // "google.appengine.v1beta4.Version.CreateVersion". @OutputOnly
  726. Method string `json:"method,omitempty"`
  727. // OperationType: The type of the operation (deprecated, use method
  728. // field instead). Example: "create_version". @OutputOnly
  729. OperationType string `json:"operationType,omitempty"`
  730. // Target: Resource that this operation is acting on. Example:
  731. // "apps/myapp/modules/default". @OutputOnly
  732. Target string `json:"target,omitempty"`
  733. // User: The user who requested this operation. @OutputOnly
  734. User string `json:"user,omitempty"`
  735. // ForceSendFields is a list of field names (e.g. "EndTime") to
  736. // unconditionally include in API requests. By default, fields with
  737. // empty values are omitted from API requests. However, any non-pointer,
  738. // non-interface field appearing in ForceSendFields will be sent to the
  739. // server regardless of whether the field is empty or not. This may be
  740. // used to include empty fields in Patch requests.
  741. ForceSendFields []string `json:"-"`
  742. }
  743. func (s *OperationMetadata1) MarshalJSON() ([]byte, error) {
  744. type noMethod OperationMetadata1
  745. raw := noMethod(*s)
  746. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  747. }
  748. // OperationMetadataV1Beta5: Metadata for the given
  749. // google.longrunning.Operation.
  750. type OperationMetadataV1Beta5 struct {
  751. // EndTime: Timestamp that this operation was completed. (Not present if
  752. // the operation is still in progress.) @OutputOnly
  753. EndTime string `json:"endTime,omitempty"`
  754. // InsertTime: Timestamp that this operation was received. @OutputOnly
  755. InsertTime string `json:"insertTime,omitempty"`
  756. // Method: API method name that initiated the operation. Example:
  757. // "google.appengine.v1beta5.Version.CreateVersion". @OutputOnly
  758. Method string `json:"method,omitempty"`
  759. // Target: Resource that this operation is acting on. Example:
  760. // "apps/myapp/services/default". @OutputOnly
  761. Target string `json:"target,omitempty"`
  762. // User: The user who requested this operation. @OutputOnly
  763. User string `json:"user,omitempty"`
  764. // ForceSendFields is a list of field names (e.g. "EndTime") to
  765. // unconditionally include in API requests. By default, fields with
  766. // empty values are omitted from API requests. However, any non-pointer,
  767. // non-interface field appearing in ForceSendFields will be sent to the
  768. // server regardless of whether the field is empty or not. This may be
  769. // used to include empty fields in Patch requests.
  770. ForceSendFields []string `json:"-"`
  771. }
  772. func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) {
  773. type noMethod OperationMetadataV1Beta5
  774. raw := noMethod(*s)
  775. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  776. }
  777. // RequestUtilization: Target scaling by request utilization (for VM
  778. // runtimes only).
  779. type RequestUtilization struct {
  780. // TargetConcurrentRequests: Target number of concurrent requests.
  781. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  782. // TargetRequestCountPerSec: Target requests per second.
  783. TargetRequestCountPerSec int64 `json:"targetRequestCountPerSec,omitempty"`
  784. // ForceSendFields is a list of field names (e.g.
  785. // "TargetConcurrentRequests") to unconditionally include in API
  786. // requests. By default, fields with empty values are omitted from API
  787. // requests. However, any non-pointer, non-interface field appearing in
  788. // ForceSendFields will be sent to the server regardless of whether the
  789. // field is empty or not. This may be used to include empty fields in
  790. // Patch requests.
  791. ForceSendFields []string `json:"-"`
  792. }
  793. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  794. type noMethod RequestUtilization
  795. raw := noMethod(*s)
  796. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  797. }
  798. // Resources: Used to specify how many machine resources an app version
  799. // needs.
  800. type Resources struct {
  801. // Cpu: How many CPU cores an app version needs.
  802. Cpu float64 `json:"cpu,omitempty"`
  803. // DiskGb: How much disk size, in GB, an app version needs.
  804. DiskGb float64 `json:"diskGb,omitempty"`
  805. // MemoryGb: How much memory, in GB, an app version needs.
  806. MemoryGb float64 `json:"memoryGb,omitempty"`
  807. // ForceSendFields is a list of field names (e.g. "Cpu") to
  808. // unconditionally include in API requests. By default, fields with
  809. // empty values are omitted from API requests. However, any non-pointer,
  810. // non-interface field appearing in ForceSendFields will be sent to the
  811. // server regardless of whether the field is empty or not. This may be
  812. // used to include empty fields in Patch requests.
  813. ForceSendFields []string `json:"-"`
  814. }
  815. func (s *Resources) MarshalJSON() ([]byte, error) {
  816. type noMethod Resources
  817. raw := noMethod(*s)
  818. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  819. }
  820. // ScriptHandler: Executes a script to handle the request that matches
  821. // the URL pattern.
  822. type ScriptHandler struct {
  823. // ScriptPath: Specifies the path to the script from the application
  824. // root directory.
  825. ScriptPath string `json:"scriptPath,omitempty"`
  826. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  827. // unconditionally include in API requests. By default, fields with
  828. // empty values are omitted from API requests. However, any non-pointer,
  829. // non-interface field appearing in ForceSendFields will be sent to the
  830. // server regardless of whether the field is empty or not. This may be
  831. // used to include empty fields in Patch requests.
  832. ForceSendFields []string `json:"-"`
  833. }
  834. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  835. type noMethod ScriptHandler
  836. raw := noMethod(*s)
  837. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  838. }
  839. // SourceReference: A reference to a particular snapshot of the source
  840. // tree used to build and deploy the application.
  841. type SourceReference struct {
  842. // Repository: Optional. A URI string identifying the repository.
  843. // Example: "https://source.developers.google.com/p/app-123/r/default"
  844. Repository string `json:"repository,omitempty"`
  845. // RevisionId: The canonical (and persistent) identifier of the deployed
  846. // revision, i.e. any kind of aliases including tags or branch names are
  847. // not allowed. Example (git):
  848. // "2198322f89e0bb2e25021667c2ed489d1fd34e6b"
  849. RevisionId string `json:"revisionId,omitempty"`
  850. // ForceSendFields is a list of field names (e.g. "Repository") to
  851. // unconditionally include in API requests. By default, fields with
  852. // empty values are omitted from API requests. However, any non-pointer,
  853. // non-interface field appearing in ForceSendFields will be sent to the
  854. // server regardless of whether the field is empty or not. This may be
  855. // used to include empty fields in Patch requests.
  856. ForceSendFields []string `json:"-"`
  857. }
  858. func (s *SourceReference) MarshalJSON() ([]byte, error) {
  859. type noMethod SourceReference
  860. raw := noMethod(*s)
  861. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  862. }
  863. // StaticDirectoryHandler: Files served directly to the user for a given
  864. // URL, such as images, CSS stylesheets, or JavaScript source files.
  865. // Static directory handlers make it easy to serve the entire contents
  866. // of a directory as static files.
  867. type StaticDirectoryHandler struct {
  868. // ApplicationReadable: By default, files declared in static file
  869. // handlers are uploaded as static data and are only served to end
  870. // users, they cannot be read by an application. If this field is set to
  871. // true, the files are also uploaded as code data so your application
  872. // can read them. Both uploads are charged against your code and static
  873. // data storage resource quotas.
  874. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  875. // Directory: The path to the directory containing the static files,
  876. // from the application root directory. Everything after the end of the
  877. // matched url pattern is appended to static_dir to form the full path
  878. // to the requested file.
  879. Directory string `json:"directory,omitempty"`
  880. // Expiration: The length of time a static file served by this handler
  881. // ought to be cached by web proxies and browsers.
  882. Expiration string `json:"expiration,omitempty"`
  883. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  884. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  885. // MimeType: If specified, all files served by this handler will be
  886. // served using the specified MIME type. If not specified, the MIME type
  887. // for a file will be derived from the file's filename extension.
  888. MimeType string `json:"mimeType,omitempty"`
  889. // RequireMatchingFile: If true, this UrlMap entry does not match the
  890. // request unless the file referenced by the handler also exists. If no
  891. // such file exists, processing will continue with the next UrlMap that
  892. // matches the requested URL.
  893. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  894. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  895. // to unconditionally include in API requests. By default, fields with
  896. // empty values are omitted from API requests. However, any non-pointer,
  897. // non-interface field appearing in ForceSendFields will be sent to the
  898. // server regardless of whether the field is empty or not. This may be
  899. // used to include empty fields in Patch requests.
  900. ForceSendFields []string `json:"-"`
  901. }
  902. func (s *StaticDirectoryHandler) MarshalJSON() ([]byte, error) {
  903. type noMethod StaticDirectoryHandler
  904. raw := noMethod(*s)
  905. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  906. }
  907. // StaticFilesHandler: Files served directly to the user for a given
  908. // URL, such as images, CSS stylesheets, or JavaScript source files.
  909. // Static file handlers describe which files in the application
  910. // directory are static files, and which URLs serve them.
  911. type StaticFilesHandler struct {
  912. // ApplicationReadable: By default, files declared in static file
  913. // handlers are uploaded as static data and are only served to end
  914. // users, they cannot be read by an application. If this field is set to
  915. // true, the files are also uploaded as code data so your application
  916. // can read them. Both uploads are charged against your code and static
  917. // data storage resource quotas.
  918. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  919. // Expiration: The length of time a static file served by this handler
  920. // ought to be cached by web proxies and browsers.
  921. Expiration string `json:"expiration,omitempty"`
  922. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  923. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  924. // MimeType: If specified, all files served by this handler will be
  925. // served using the specified MIME type. If not specified, the MIME type
  926. // for a file will be derived from the file's filename extension.
  927. MimeType string `json:"mimeType,omitempty"`
  928. // Path: The path to the static files matched by the URL pattern, from
  929. // the application root directory. The path can refer to text matched in
  930. // groupings in the URL pattern.
  931. Path string `json:"path,omitempty"`
  932. // RequireMatchingFile: If true, this UrlMap entry does not match the
  933. // request unless the file referenced by the handler also exists. If no
  934. // such file exists, processing will continue with the next UrlMap that
  935. // matches the requested URL.
  936. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  937. // UploadPathRegex: A regular expression that matches the file paths for
  938. // all files that will be referenced by this handler.
  939. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  940. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  941. // to unconditionally include in API requests. By default, fields with
  942. // empty values are omitted from API requests. However, any non-pointer,
  943. // non-interface field appearing in ForceSendFields will be sent to the
  944. // server regardless of whether the field is empty or not. This may be
  945. // used to include empty fields in Patch requests.
  946. ForceSendFields []string `json:"-"`
  947. }
  948. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  949. type noMethod StaticFilesHandler
  950. raw := noMethod(*s)
  951. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  952. }
  953. // Status: The `Status` type defines a logical error model that is
  954. // suitable for different programming environments, including REST APIs
  955. // and RPC APIs. It is used by [gRPC](https://github.com/grpc). The
  956. // error model is designed to be: - Simple to use and understand for
  957. // most users - Flexible enough to meet unexpected needs # Overview The
  958. // `Status` message contains three pieces of data: error code, error
  959. // message, and error details. The error code should be an enum value of
  960. // google.rpc.Code, but it may accept additional error codes if needed.
  961. // The error message should be a developer-facing English message that
  962. // helps developers *understand* and *resolve* the error. If a localized
  963. // user-facing error message is needed, put the localized message in the
  964. // error details or localize it in the client. The optional error
  965. // details may contain arbitrary information about the error. There is a
  966. // predefined set of error detail types in the package `google.rpc`
  967. // which can be used for common error conditions. # Language mapping The
  968. // `Status` message is the logical representation of the error model,
  969. // but it is not necessarily the actual wire format. When the `Status`
  970. // message is exposed in different client libraries and different wire
  971. // protocols, it can be mapped differently. For example, it will likely
  972. // be mapped to some exceptions in Java, but more likely mapped to some
  973. // error codes in C. # Other uses The error model and the `Status`
  974. // message can be used in a variety of environments, either with or
  975. // without APIs, to provide a consistent developer experience across
  976. // different environments. Example uses of this error model include: -
  977. // Partial errors. If a service needs to return partial errors to the
  978. // client, it may embed the `Status` in the normal response to indicate
  979. // the partial errors. - Workflow errors. A typical workflow has
  980. // multiple steps. Each step may have a `Status` message for error
  981. // reporting purpose. - Batch operations. If a client uses batch request
  982. // and batch response, the `Status` message should be used directly
  983. // inside batch response, one for each error sub-response. -
  984. // Asynchronous operations. If an API call embeds asynchronous operation
  985. // results in its response, the status of those operations should be
  986. // represented directly using the `Status` message. - Logging. If some
  987. // API errors are stored in logs, the message `Status` could be used
  988. // directly after any stripping needed for security/privacy reasons.
  989. type Status struct {
  990. // Code: The status code, which should be an enum value of
  991. // google.rpc.Code.
  992. Code int64 `json:"code,omitempty"`
  993. // Details: A list of messages that carry the error details. There will
  994. // be a common set of message types for APIs to use.
  995. Details []StatusDetails `json:"details,omitempty"`
  996. // Message: A developer-facing error message, which should be in
  997. // English. Any user-facing error message should be localized and sent
  998. // in the google.rpc.Status.details field, or localized by the client.
  999. Message string `json:"message,omitempty"`
  1000. // ForceSendFields is a list of field names (e.g. "Code") to
  1001. // unconditionally include in API requests. By default, fields with
  1002. // empty values are omitted from API requests. However, any non-pointer,
  1003. // non-interface field appearing in ForceSendFields will be sent to the
  1004. // server regardless of whether the field is empty or not. This may be
  1005. // used to include empty fields in Patch requests.
  1006. ForceSendFields []string `json:"-"`
  1007. }
  1008. func (s *Status) MarshalJSON() ([]byte, error) {
  1009. type noMethod Status
  1010. raw := noMethod(*s)
  1011. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1012. }
  1013. type StatusDetails interface{}
  1014. // TrafficSplit: Configuration for traffic splitting for versions within
  1015. // a single module. Traffic splitting allows traffic directed to the
  1016. // module to be assigned to one of several versions in a fractional way,
  1017. // enabling experiments and canarying new builds, for example.
  1018. type TrafficSplit struct {
  1019. // Allocations: Mapping from module version IDs within the module to
  1020. // fractional (0.000, 1] allocations of traffic for that version. Each
  1021. // version may only be specified once, but some versions in the module
  1022. // may not have any traffic allocation. Modules that have traffic
  1023. // allocated in this field may not be deleted until the module is
  1024. // deleted, or their traffic allocation is removed. Allocations must sum
  1025. // to 1. Supports precision up to two decimal places for IP-based splits
  1026. // and up to three decimal places for cookie-based splits.
  1027. Allocations *TrafficSplitAllocations `json:"allocations,omitempty"`
  1028. // ShardBy: Which mechanism should be used as a selector when choosing a
  1029. // version to send a request to. The traffic selection algorithm will be
  1030. // stable for either type until allocations are changed.
  1031. //
  1032. // Possible values:
  1033. // "UNSPECIFIED"
  1034. // "COOKIE"
  1035. // "IP"
  1036. ShardBy string `json:"shardBy,omitempty"`
  1037. // ForceSendFields is a list of field names (e.g. "Allocations") to
  1038. // unconditionally include in API requests. By default, fields with
  1039. // empty values are omitted from API requests. However, any non-pointer,
  1040. // non-interface field appearing in ForceSendFields will be sent to the
  1041. // server regardless of whether the field is empty or not. This may be
  1042. // used to include empty fields in Patch requests.
  1043. ForceSendFields []string `json:"-"`
  1044. }
  1045. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  1046. type noMethod TrafficSplit
  1047. raw := noMethod(*s)
  1048. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1049. }
  1050. // TrafficSplitAllocations: Mapping from module version IDs within the
  1051. // module to fractional (0.000, 1] allocations of traffic for that
  1052. // version. Each version may only be specified once, but some versions
  1053. // in the module may not have any traffic allocation. Modules that have
  1054. // traffic allocated in this field may not be deleted until the module
  1055. // is deleted, or their traffic allocation is removed. Allocations must
  1056. // sum to 1. Supports precision up to two decimal places for IP-based
  1057. // splits and up to three decimal places for cookie-based splits.
  1058. type TrafficSplitAllocations struct {
  1059. }
  1060. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  1061. // request to a module.
  1062. type UrlDispatchRule struct {
  1063. // Domain: The domain name to match on. Supports '*' (glob) wildcarding
  1064. // on the left-hand side of a '.'. If empty, all domains will be matched
  1065. // (the same as '*').
  1066. Domain string `json:"domain,omitempty"`
  1067. // Module: The resource id of a Module in this application that should
  1068. // service the matched request. The Module must already exist. Example:
  1069. // "default".
  1070. Module string `json:"module,omitempty"`
  1071. // Path: The pathname within the host. This must start with a '/'. A
  1072. // single '*' (glob) can be included at the end of the path. The sum of
  1073. // the lengths of the domain and path may not exceed 100 characters.
  1074. Path string `json:"path,omitempty"`
  1075. // ForceSendFields is a list of field names (e.g. "Domain") to
  1076. // unconditionally include in API requests. By default, fields with
  1077. // empty values are omitted from API requests. However, any non-pointer,
  1078. // non-interface field appearing in ForceSendFields will be sent to the
  1079. // server regardless of whether the field is empty or not. This may be
  1080. // used to include empty fields in Patch requests.
  1081. ForceSendFields []string `json:"-"`
  1082. }
  1083. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  1084. type noMethod UrlDispatchRule
  1085. raw := noMethod(*s)
  1086. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1087. }
  1088. // UrlMap: A URL pattern and description of how it should be handled.
  1089. // App Engine can handle URLs by executing application code, or by
  1090. // serving static files uploaded with the code, such as images, CSS or
  1091. // JavaScript.
  1092. type UrlMap struct {
  1093. // ApiEndpoint: Use API Endpoints to handle requests.
  1094. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  1095. // AuthFailAction: For users not logged in, how to handle access to
  1096. // resources with required login. Defaults to "redirect".
  1097. //
  1098. // Possible values:
  1099. // "AUTH_FAIL_ACTION_UNSPECIFIED"
  1100. // "AUTH_FAIL_ACTION_REDIRECT"
  1101. // "AUTH_FAIL_ACTION_UNAUTHORIZED"
  1102. AuthFailAction string `json:"authFailAction,omitempty"`
  1103. // Login: What level of login is required to access this resource.
  1104. //
  1105. // Possible values:
  1106. // "LOGIN_UNSPECIFIED"
  1107. // "LOGIN_OPTIONAL"
  1108. // "LOGIN_ADMIN"
  1109. // "LOGIN_REQUIRED"
  1110. Login string `json:"login,omitempty"`
  1111. // RedirectHttpResponseCode: `30x` code to use when performing redirects
  1112. // for the `secure` field. A `302` is used by default.
  1113. //
  1114. // Possible values:
  1115. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED"
  1116. // "REDIRECT_HTTP_RESPONSE_CODE_301"
  1117. // "REDIRECT_HTTP_RESPONSE_CODE_302"
  1118. // "REDIRECT_HTTP_RESPONSE_CODE_303"
  1119. // "REDIRECT_HTTP_RESPONSE_CODE_307"
  1120. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  1121. // Script: Executes a script to handle the request that matches the URL
  1122. // pattern.
  1123. Script *ScriptHandler `json:"script,omitempty"`
  1124. // SecurityLevel: Configures whether security (HTTPS) should be enforced
  1125. // for this URL.
  1126. //
  1127. // Possible values:
  1128. // "SECURE_UNSPECIFIED"
  1129. // "SECURE_DEFAULT"
  1130. // "SECURE_NEVER"
  1131. // "SECURE_OPTIONAL"
  1132. // "SECURE_ALWAYS"
  1133. SecurityLevel string `json:"securityLevel,omitempty"`
  1134. // StaticDirectory: Serves the entire contents of a directory as static
  1135. // files. This attribute is deprecated. You can mimic the behavior of
  1136. // static directories using static files.
  1137. StaticDirectory *StaticDirectoryHandler `json:"staticDirectory,omitempty"`
  1138. // StaticFiles: Returns the contents of a file, such as an image, as the
  1139. // response.
  1140. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  1141. // UrlRegex: A URL prefix. This value uses regular expression syntax
  1142. // (and so regexp special characters must be escaped), but it should not
  1143. // contain groupings. All URLs that begin with this prefix are handled
  1144. // by this handler, using the portion of the URL after the prefix as
  1145. // part of the file path. This is always required.
  1146. UrlRegex string `json:"urlRegex,omitempty"`
  1147. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  1148. // unconditionally include in API requests. By default, fields with
  1149. // empty values are omitted from API requests. However, any non-pointer,
  1150. // non-interface field appearing in ForceSendFields will be sent to the
  1151. // server regardless of whether the field is empty or not. This may be
  1152. // used to include empty fields in Patch requests.
  1153. ForceSendFields []string `json:"-"`
  1154. }
  1155. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  1156. type noMethod UrlMap
  1157. raw := noMethod(*s)
  1158. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1159. }
  1160. // Version: A Version is a specific set of source code and configuration
  1161. // files deployed to a module.
  1162. type Version struct {
  1163. // ApiConfig: Serving configuration for Google Cloud Endpoints. Only
  1164. // returned in `GET` requests if `view=FULL` is set. May only be set on
  1165. // create requests; once created, is immutable.
  1166. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  1167. // AutomaticScaling: Automatic scaling is the scaling policy that App
  1168. // Engine has used since its inception. It is based on request rate,
  1169. // response latencies, and other application metrics.
  1170. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  1171. // BasicScaling: A module with basic scaling will create an instance
  1172. // when the application receives a request. The instance will be turned
  1173. // down when the app becomes idle. Basic scaling is ideal for work that
  1174. // is intermittent or driven by user activity.
  1175. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  1176. // BetaSettings: Beta settings supplied to the application via metadata.
  1177. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  1178. // CreationTime: Creation time of this version. This will be between the
  1179. // start and end times of the operation that creates this version.
  1180. // @OutputOnly
  1181. CreationTime string `json:"creationTime,omitempty"`
  1182. // DefaultExpiration: The length of time a static file served by a
  1183. // static file handler ought to be cached by web proxies and browsers,
  1184. // if the handler does not specify its own expiration. Only returned in
  1185. // `GET` requests if `view=FULL` is set. May only be set on create
  1186. // requests; once created, is immutable.
  1187. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  1188. // Deployer: The email address of the user who created this version.
  1189. // @OutputOnly
  1190. Deployer string `json:"deployer,omitempty"`
  1191. // Deployment: Code and application artifacts that make up this version.
  1192. // Only returned in `GET` requests if `view=FULL` is set. May only be
  1193. // set on create requests; once created, is immutable.
  1194. Deployment *Deployment `json:"deployment,omitempty"`
  1195. // Env: The App Engine execution environment to use for this version.
  1196. // Default: "1"
  1197. Env string `json:"env,omitempty"`
  1198. // EnvVariables: Environment variables made available to the
  1199. // application. Only returned in `GET` requests if `view=FULL` is set.
  1200. // May only be set on create requests; once created, is immutable.
  1201. EnvVariables map[string]string `json:"envVariables,omitempty"`
  1202. // ErrorHandlers: Custom static error pages instead of these generic
  1203. // error pages, (limit 10 KB/page) Only returned in `GET` requests if
  1204. // `view=FULL` is set. May only be set on create requests; once created,
  1205. // is immutable.
  1206. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  1207. // Handlers: An ordered list of URL Matching patterns that should be
  1208. // applied to incoming requests. The first matching URL consumes the
  1209. // request, and subsequent handlers are not attempted. Only returned in
  1210. // `GET` requests if `view=FULL` is set. May only be set on create
  1211. // requests; once created, is immutable.
  1212. Handlers []*UrlMap `json:"handlers,omitempty"`
  1213. // HealthCheck: Configure health checking for the VM instances.
  1214. // Unhealthy VM instances will be stopped and replaced with new
  1215. // instances. Only returned in `GET` requests if `view=FULL` is set. May
  1216. // only be set on create requests; once created, is immutable.
  1217. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  1218. // Id: The relative name/path of the Version within the module. Example:
  1219. // "v1". Version specifiers can contain lowercase letters, digits, and
  1220. // hyphens. It cannot begin with the prefix `ah-` and the names
  1221. // `default` and `latest` are reserved and cannot be used.
  1222. Id string `json:"id,omitempty"`
  1223. // InboundServices: Before an application can receive email or XMPP
  1224. // messages, the application must be configured to enable the service.
  1225. //
  1226. // Possible values:
  1227. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  1228. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  1229. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application receive email
  1230. // bound notifications.
  1231. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  1232. // error stanzas.
  1233. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  1234. // instant messages.
  1235. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  1236. // user subscription POSTs.
  1237. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  1238. // a user's chat presence.
  1239. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  1240. // notifications when a client connects or disconnects from a channel.
  1241. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  1242. InboundServices []string `json:"inboundServices,omitempty"`
  1243. // InstanceClass: The frontend instance class to use to run this app.
  1244. // Valid values are `[F1, F2, F4, F4_1G]`. Default: "F1"
  1245. InstanceClass string `json:"instanceClass,omitempty"`
  1246. // Libraries: Configuration for Python runtime third-party libraries
  1247. // required by the application. Only returned in `GET` requests if
  1248. // `view=FULL` is set. May only be set on create requests; once created,
  1249. // is immutable.
  1250. Libraries []*Library `json:"libraries,omitempty"`
  1251. // ManualScaling: A module with manual scaling runs continuously,
  1252. // allowing you to perform complex initialization and rely on the state
  1253. // of its memory over time.
  1254. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  1255. // Name: The full path to the Version resource in the API. Example:
  1256. // "apps/myapp/modules/default/versions/v1". @OutputOnly
  1257. Name string `json:"name,omitempty"`
  1258. // Network: Used to specify extra network settings (for VM runtimes
  1259. // only).
  1260. Network *Network `json:"network,omitempty"`
  1261. // NobuildFilesRegex: Go only. Files that match this pattern will not be
  1262. // built into the app. May only be set on create requests.
  1263. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  1264. // Resources: Used to specify how many machine resources an app version
  1265. // needs (for VM runtimes only).
  1266. Resources *Resources `json:"resources,omitempty"`
  1267. // Runtime: The desired runtime. Values can include python27, java7, go,
  1268. // etc.
  1269. Runtime string `json:"runtime,omitempty"`
  1270. // ServingStatus: The current serving status of this version. Only
  1271. // `SERVING` versions will have instances created or billed for. If this
  1272. // field is unset when a version is created, `SERVING` status will be
  1273. // assumed. It is an error to explicitly set this field to
  1274. // `SERVING_STATUS_UNSPECIFIED`.
  1275. //
  1276. // Possible values:
  1277. // "SERVING_STATUS_UNSPECIFIED"
  1278. // "SERVING"
  1279. // "STOPPED"
  1280. ServingStatus string `json:"servingStatus,omitempty"`
  1281. // Threadsafe: If true, multiple requests can be dispatched to the app
  1282. // at once.
  1283. Threadsafe bool `json:"threadsafe,omitempty"`
  1284. // Vm: Whether to deploy this app in a VM container.
  1285. Vm bool `json:"vm,omitempty"`
  1286. // ServerResponse contains the HTTP response code and headers from the
  1287. // server.
  1288. googleapi.ServerResponse `json:"-"`
  1289. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  1290. // unconditionally include in API requests. By default, fields with
  1291. // empty values are omitted from API requests. However, any non-pointer,
  1292. // non-interface field appearing in ForceSendFields will be sent to the
  1293. // server regardless of whether the field is empty or not. This may be
  1294. // used to include empty fields in Patch requests.
  1295. ForceSendFields []string `json:"-"`
  1296. }
  1297. func (s *Version) MarshalJSON() ([]byte, error) {
  1298. type noMethod Version
  1299. raw := noMethod(*s)
  1300. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1301. }
  1302. // method id "appengine.apps.get":
  1303. type AppsGetCall struct {
  1304. s *Service
  1305. appsId string
  1306. urlParams_ gensupport.URLParams
  1307. ifNoneMatch_ string
  1308. ctx_ context.Context
  1309. }
  1310. // Get: Gets information about an application.
  1311. func (r *AppsService) Get(appsId string) *AppsGetCall {
  1312. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1313. c.appsId = appsId
  1314. return c
  1315. }
  1316. // EnsureResourcesExist sets the optional parameter
  1317. // "ensureResourcesExist": Certain resources associated with an
  1318. // application are created on-demand. Controls whether these resources
  1319. // should be created when performing the `GET` operation. If specified
  1320. // and any resources could not be created, the request will fail with an
  1321. // error code. Additionally, this parameter can cause the request to
  1322. // take longer to complete.
  1323. func (c *AppsGetCall) EnsureResourcesExist(ensureResourcesExist bool) *AppsGetCall {
  1324. c.urlParams_.Set("ensureResourcesExist", fmt.Sprint(ensureResourcesExist))
  1325. return c
  1326. }
  1327. // Fields allows partial responses to be retrieved. See
  1328. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1329. // for more information.
  1330. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  1331. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1332. return c
  1333. }
  1334. // IfNoneMatch sets the optional parameter which makes the operation
  1335. // fail if the object's ETag matches the given value. This is useful for
  1336. // getting updates only after the object has changed since the last
  1337. // request. Use googleapi.IsNotModified to check whether the response
  1338. // error from Do is the result of In-None-Match.
  1339. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  1340. c.ifNoneMatch_ = entityTag
  1341. return c
  1342. }
  1343. // Context sets the context to be used in this call's Do method. Any
  1344. // pending HTTP request will be aborted if the provided context is
  1345. // canceled.
  1346. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  1347. c.ctx_ = ctx
  1348. return c
  1349. }
  1350. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  1351. var body io.Reader = nil
  1352. c.urlParams_.Set("alt", alt)
  1353. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}")
  1354. urls += "?" + c.urlParams_.Encode()
  1355. req, _ := http.NewRequest("GET", urls, body)
  1356. googleapi.Expand(req.URL, map[string]string{
  1357. "appsId": c.appsId,
  1358. })
  1359. req.Header.Set("User-Agent", c.s.userAgent())
  1360. if c.ifNoneMatch_ != "" {
  1361. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1362. }
  1363. if c.ctx_ != nil {
  1364. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1365. }
  1366. return c.s.client.Do(req)
  1367. }
  1368. // Do executes the "appengine.apps.get" call.
  1369. // Exactly one of *Application or error will be non-nil. Any non-2xx
  1370. // status code is an error. Response headers are in either
  1371. // *Application.ServerResponse.Header or (if a response was returned at
  1372. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1373. // to check whether the returned error was because
  1374. // http.StatusNotModified was returned.
  1375. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  1376. gensupport.SetOptions(c.urlParams_, opts...)
  1377. res, err := c.doRequest("json")
  1378. if res != nil && res.StatusCode == http.StatusNotModified {
  1379. if res.Body != nil {
  1380. res.Body.Close()
  1381. }
  1382. return nil, &googleapi.Error{
  1383. Code: res.StatusCode,
  1384. Header: res.Header,
  1385. }
  1386. }
  1387. if err != nil {
  1388. return nil, err
  1389. }
  1390. defer googleapi.CloseBody(res)
  1391. if err := googleapi.CheckResponse(res); err != nil {
  1392. return nil, err
  1393. }
  1394. ret := &Application{
  1395. ServerResponse: googleapi.ServerResponse{
  1396. Header: res.Header,
  1397. HTTPStatusCode: res.StatusCode,
  1398. },
  1399. }
  1400. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1401. return nil, err
  1402. }
  1403. return ret, nil
  1404. // {
  1405. // "description": "Gets information about an application.",
  1406. // "httpMethod": "GET",
  1407. // "id": "appengine.apps.get",
  1408. // "parameterOrder": [
  1409. // "appsId"
  1410. // ],
  1411. // "parameters": {
  1412. // "appsId": {
  1413. // "description": "Part of `name`. Name of the application to get. For example: \"apps/myapp\".",
  1414. // "location": "path",
  1415. // "required": true,
  1416. // "type": "string"
  1417. // },
  1418. // "ensureResourcesExist": {
  1419. // "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the `GET` operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete.",
  1420. // "location": "query",
  1421. // "type": "boolean"
  1422. // }
  1423. // },
  1424. // "path": "v1beta4/apps/{appsId}",
  1425. // "response": {
  1426. // "$ref": "Application"
  1427. // },
  1428. // "scopes": [
  1429. // "https://www.googleapis.com/auth/cloud-platform"
  1430. // ]
  1431. // }
  1432. }
  1433. // method id "appengine.apps.modules.delete":
  1434. type AppsModulesDeleteCall struct {
  1435. s *Service
  1436. appsId string
  1437. modulesId string
  1438. urlParams_ gensupport.URLParams
  1439. ctx_ context.Context
  1440. }
  1441. // Delete: Deletes a module and all enclosed versions.
  1442. func (r *AppsModulesService) Delete(appsId string, modulesId string) *AppsModulesDeleteCall {
  1443. c := &AppsModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1444. c.appsId = appsId
  1445. c.modulesId = modulesId
  1446. return c
  1447. }
  1448. // Fields allows partial responses to be retrieved. See
  1449. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1450. // for more information.
  1451. func (c *AppsModulesDeleteCall) Fields(s ...googleapi.Field) *AppsModulesDeleteCall {
  1452. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1453. return c
  1454. }
  1455. // Context sets the context to be used in this call's Do method. Any
  1456. // pending HTTP request will be aborted if the provided context is
  1457. // canceled.
  1458. func (c *AppsModulesDeleteCall) Context(ctx context.Context) *AppsModulesDeleteCall {
  1459. c.ctx_ = ctx
  1460. return c
  1461. }
  1462. func (c *AppsModulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1463. var body io.Reader = nil
  1464. c.urlParams_.Set("alt", alt)
  1465. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}")
  1466. urls += "?" + c.urlParams_.Encode()
  1467. req, _ := http.NewRequest("DELETE", urls, body)
  1468. googleapi.Expand(req.URL, map[string]string{
  1469. "appsId": c.appsId,
  1470. "modulesId": c.modulesId,
  1471. })
  1472. req.Header.Set("User-Agent", c.s.userAgent())
  1473. if c.ctx_ != nil {
  1474. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1475. }
  1476. return c.s.client.Do(req)
  1477. }
  1478. // Do executes the "appengine.apps.modules.delete" call.
  1479. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  1480. // status code is an error. Response headers are in either
  1481. // *Operation.ServerResponse.Header or (if a response was returned at
  1482. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1483. // to check whether the returned error was because
  1484. // http.StatusNotModified was returned.
  1485. func (c *AppsModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1486. gensupport.SetOptions(c.urlParams_, opts...)
  1487. res, err := c.doRequest("json")
  1488. if res != nil && res.StatusCode == http.StatusNotModified {
  1489. if res.Body != nil {
  1490. res.Body.Close()
  1491. }
  1492. return nil, &googleapi.Error{
  1493. Code: res.StatusCode,
  1494. Header: res.Header,
  1495. }
  1496. }
  1497. if err != nil {
  1498. return nil, err
  1499. }
  1500. defer googleapi.CloseBody(res)
  1501. if err := googleapi.CheckResponse(res); err != nil {
  1502. return nil, err
  1503. }
  1504. ret := &Operation{
  1505. ServerResponse: googleapi.ServerResponse{
  1506. Header: res.Header,
  1507. HTTPStatusCode: res.StatusCode,
  1508. },
  1509. }
  1510. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1511. return nil, err
  1512. }
  1513. return ret, nil
  1514. // {
  1515. // "description": "Deletes a module and all enclosed versions.",
  1516. // "httpMethod": "DELETE",
  1517. // "id": "appengine.apps.modules.delete",
  1518. // "parameterOrder": [
  1519. // "appsId",
  1520. // "modulesId"
  1521. // ],
  1522. // "parameters": {
  1523. // "appsId": {
  1524. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/modules/default\".",
  1525. // "location": "path",
  1526. // "required": true,
  1527. // "type": "string"
  1528. // },
  1529. // "modulesId": {
  1530. // "description": "Part of `name`. See documentation of `appsId`.",
  1531. // "location": "path",
  1532. // "required": true,
  1533. // "type": "string"
  1534. // }
  1535. // },
  1536. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}",
  1537. // "response": {
  1538. // "$ref": "Operation"
  1539. // },
  1540. // "scopes": [
  1541. // "https://www.googleapis.com/auth/cloud-platform"
  1542. // ]
  1543. // }
  1544. }
  1545. // method id "appengine.apps.modules.get":
  1546. type AppsModulesGetCall struct {
  1547. s *Service
  1548. appsId string
  1549. modulesId string
  1550. urlParams_ gensupport.URLParams
  1551. ifNoneMatch_ string
  1552. ctx_ context.Context
  1553. }
  1554. // Get: Gets the current configuration of the module.
  1555. func (r *AppsModulesService) Get(appsId string, modulesId string) *AppsModulesGetCall {
  1556. c := &AppsModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1557. c.appsId = appsId
  1558. c.modulesId = modulesId
  1559. return c
  1560. }
  1561. // Fields allows partial responses to be retrieved. See
  1562. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1563. // for more information.
  1564. func (c *AppsModulesGetCall) Fields(s ...googleapi.Field) *AppsModulesGetCall {
  1565. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1566. return c
  1567. }
  1568. // IfNoneMatch sets the optional parameter which makes the operation
  1569. // fail if the object's ETag matches the given value. This is useful for
  1570. // getting updates only after the object has changed since the last
  1571. // request. Use googleapi.IsNotModified to check whether the response
  1572. // error from Do is the result of In-None-Match.
  1573. func (c *AppsModulesGetCall) IfNoneMatch(entityTag string) *AppsModulesGetCall {
  1574. c.ifNoneMatch_ = entityTag
  1575. return c
  1576. }
  1577. // Context sets the context to be used in this call's Do method. Any
  1578. // pending HTTP request will be aborted if the provided context is
  1579. // canceled.
  1580. func (c *AppsModulesGetCall) Context(ctx context.Context) *AppsModulesGetCall {
  1581. c.ctx_ = ctx
  1582. return c
  1583. }
  1584. func (c *AppsModulesGetCall) doRequest(alt string) (*http.Response, error) {
  1585. var body io.Reader = nil
  1586. c.urlParams_.Set("alt", alt)
  1587. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}")
  1588. urls += "?" + c.urlParams_.Encode()
  1589. req, _ := http.NewRequest("GET", urls, body)
  1590. googleapi.Expand(req.URL, map[string]string{
  1591. "appsId": c.appsId,
  1592. "modulesId": c.modulesId,
  1593. })
  1594. req.Header.Set("User-Agent", c.s.userAgent())
  1595. if c.ifNoneMatch_ != "" {
  1596. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1597. }
  1598. if c.ctx_ != nil {
  1599. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1600. }
  1601. return c.s.client.Do(req)
  1602. }
  1603. // Do executes the "appengine.apps.modules.get" call.
  1604. // Exactly one of *Module or error will be non-nil. Any non-2xx status
  1605. // code is an error. Response headers are in either
  1606. // *Module.ServerResponse.Header or (if a response was returned at all)
  1607. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1608. // check whether the returned error was because http.StatusNotModified
  1609. // was returned.
  1610. func (c *AppsModulesGetCall) Do(opts ...googleapi.CallOption) (*Module, error) {
  1611. gensupport.SetOptions(c.urlParams_, opts...)
  1612. res, err := c.doRequest("json")
  1613. if res != nil && res.StatusCode == http.StatusNotModified {
  1614. if res.Body != nil {
  1615. res.Body.Close()
  1616. }
  1617. return nil, &googleapi.Error{
  1618. Code: res.StatusCode,
  1619. Header: res.Header,
  1620. }
  1621. }
  1622. if err != nil {
  1623. return nil, err
  1624. }
  1625. defer googleapi.CloseBody(res)
  1626. if err := googleapi.CheckResponse(res); err != nil {
  1627. return nil, err
  1628. }
  1629. ret := &Module{
  1630. ServerResponse: googleapi.ServerResponse{
  1631. Header: res.Header,
  1632. HTTPStatusCode: res.StatusCode,
  1633. },
  1634. }
  1635. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1636. return nil, err
  1637. }
  1638. return ret, nil
  1639. // {
  1640. // "description": "Gets the current configuration of the module.",
  1641. // "httpMethod": "GET",
  1642. // "id": "appengine.apps.modules.get",
  1643. // "parameterOrder": [
  1644. // "appsId",
  1645. // "modulesId"
  1646. // ],
  1647. // "parameters": {
  1648. // "appsId": {
  1649. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/modules/default\".",
  1650. // "location": "path",
  1651. // "required": true,
  1652. // "type": "string"
  1653. // },
  1654. // "modulesId": {
  1655. // "description": "Part of `name`. See documentation of `appsId`.",
  1656. // "location": "path",
  1657. // "required": true,
  1658. // "type": "string"
  1659. // }
  1660. // },
  1661. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}",
  1662. // "response": {
  1663. // "$ref": "Module"
  1664. // },
  1665. // "scopes": [
  1666. // "https://www.googleapis.com/auth/cloud-platform"
  1667. // ]
  1668. // }
  1669. }
  1670. // method id "appengine.apps.modules.list":
  1671. type AppsModulesListCall struct {
  1672. s *Service
  1673. appsId string
  1674. urlParams_ gensupport.URLParams
  1675. ifNoneMatch_ string
  1676. ctx_ context.Context
  1677. }
  1678. // List: Lists all the modules in the application.
  1679. func (r *AppsModulesService) List(appsId string) *AppsModulesListCall {
  1680. c := &AppsModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1681. c.appsId = appsId
  1682. return c
  1683. }
  1684. // PageSize sets the optional parameter "pageSize": Maximum results to
  1685. // return per page.
  1686. func (c *AppsModulesListCall) PageSize(pageSize int64) *AppsModulesListCall {
  1687. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1688. return c
  1689. }
  1690. // PageToken sets the optional parameter "pageToken": Continuation token
  1691. // for fetching the next page of results.
  1692. func (c *AppsModulesListCall) PageToken(pageToken string) *AppsModulesListCall {
  1693. c.urlParams_.Set("pageToken", pageToken)
  1694. return c
  1695. }
  1696. // Fields allows partial responses to be retrieved. See
  1697. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1698. // for more information.
  1699. func (c *AppsModulesListCall) Fields(s ...googleapi.Field) *AppsModulesListCall {
  1700. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1701. return c
  1702. }
  1703. // IfNoneMatch sets the optional parameter which makes the operation
  1704. // fail if the object's ETag matches the given value. This is useful for
  1705. // getting updates only after the object has changed since the last
  1706. // request. Use googleapi.IsNotModified to check whether the response
  1707. // error from Do is the result of In-None-Match.
  1708. func (c *AppsModulesListCall) IfNoneMatch(entityTag string) *AppsModulesListCall {
  1709. c.ifNoneMatch_ = entityTag
  1710. return c
  1711. }
  1712. // Context sets the context to be used in this call's Do method. Any
  1713. // pending HTTP request will be aborted if the provided context is
  1714. // canceled.
  1715. func (c *AppsModulesListCall) Context(ctx context.Context) *AppsModulesListCall {
  1716. c.ctx_ = ctx
  1717. return c
  1718. }
  1719. func (c *AppsModulesListCall) doRequest(alt string) (*http.Response, error) {
  1720. var body io.Reader = nil
  1721. c.urlParams_.Set("alt", alt)
  1722. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules")
  1723. urls += "?" + c.urlParams_.Encode()
  1724. req, _ := http.NewRequest("GET", urls, body)
  1725. googleapi.Expand(req.URL, map[string]string{
  1726. "appsId": c.appsId,
  1727. })
  1728. req.Header.Set("User-Agent", c.s.userAgent())
  1729. if c.ifNoneMatch_ != "" {
  1730. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1731. }
  1732. if c.ctx_ != nil {
  1733. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1734. }
  1735. return c.s.client.Do(req)
  1736. }
  1737. // Do executes the "appengine.apps.modules.list" call.
  1738. // Exactly one of *ListModulesResponse or error will be non-nil. Any
  1739. // non-2xx status code is an error. Response headers are in either
  1740. // *ListModulesResponse.ServerResponse.Header or (if a response was
  1741. // returned at all) in error.(*googleapi.Error).Header. Use
  1742. // googleapi.IsNotModified to check whether the returned error was
  1743. // because http.StatusNotModified was returned.
  1744. func (c *AppsModulesListCall) Do(opts ...googleapi.CallOption) (*ListModulesResponse, error) {
  1745. gensupport.SetOptions(c.urlParams_, opts...)
  1746. res, err := c.doRequest("json")
  1747. if res != nil && res.StatusCode == http.StatusNotModified {
  1748. if res.Body != nil {
  1749. res.Body.Close()
  1750. }
  1751. return nil, &googleapi.Error{
  1752. Code: res.StatusCode,
  1753. Header: res.Header,
  1754. }
  1755. }
  1756. if err != nil {
  1757. return nil, err
  1758. }
  1759. defer googleapi.CloseBody(res)
  1760. if err := googleapi.CheckResponse(res); err != nil {
  1761. return nil, err
  1762. }
  1763. ret := &ListModulesResponse{
  1764. ServerResponse: googleapi.ServerResponse{
  1765. Header: res.Header,
  1766. HTTPStatusCode: res.StatusCode,
  1767. },
  1768. }
  1769. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1770. return nil, err
  1771. }
  1772. return ret, nil
  1773. // {
  1774. // "description": "Lists all the modules in the application.",
  1775. // "httpMethod": "GET",
  1776. // "id": "appengine.apps.modules.list",
  1777. // "parameterOrder": [
  1778. // "appsId"
  1779. // ],
  1780. // "parameters": {
  1781. // "appsId": {
  1782. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp\".",
  1783. // "location": "path",
  1784. // "required": true,
  1785. // "type": "string"
  1786. // },
  1787. // "pageSize": {
  1788. // "description": "Maximum results to return per page.",
  1789. // "format": "int32",
  1790. // "location": "query",
  1791. // "type": "integer"
  1792. // },
  1793. // "pageToken": {
  1794. // "description": "Continuation token for fetching the next page of results.",
  1795. // "location": "query",
  1796. // "type": "string"
  1797. // }
  1798. // },
  1799. // "path": "v1beta4/apps/{appsId}/modules",
  1800. // "response": {
  1801. // "$ref": "ListModulesResponse"
  1802. // },
  1803. // "scopes": [
  1804. // "https://www.googleapis.com/auth/cloud-platform"
  1805. // ]
  1806. // }
  1807. }
  1808. // Pages invokes f for each page of results.
  1809. // A non-nil error returned from f will halt the iteration.
  1810. // The provided context supersedes any context provided to the Context method.
  1811. func (c *AppsModulesListCall) Pages(ctx context.Context, f func(*ListModulesResponse) error) error {
  1812. c.ctx_ = ctx
  1813. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1814. for {
  1815. x, err := c.Do()
  1816. if err != nil {
  1817. return err
  1818. }
  1819. if err := f(x); err != nil {
  1820. return err
  1821. }
  1822. if x.NextPageToken == "" {
  1823. return nil
  1824. }
  1825. c.PageToken(x.NextPageToken)
  1826. }
  1827. }
  1828. // method id "appengine.apps.modules.patch":
  1829. type AppsModulesPatchCall struct {
  1830. s *Service
  1831. appsId string
  1832. modulesId string
  1833. module *Module
  1834. urlParams_ gensupport.URLParams
  1835. ctx_ context.Context
  1836. }
  1837. // Patch: Updates the configuration of the specified module.
  1838. func (r *AppsModulesService) Patch(appsId string, modulesId string, module *Module) *AppsModulesPatchCall {
  1839. c := &AppsModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1840. c.appsId = appsId
  1841. c.modulesId = modulesId
  1842. c.module = module
  1843. return c
  1844. }
  1845. // Mask sets the optional parameter "mask": Standard field mask for the
  1846. // set of fields to be updated.
  1847. func (c *AppsModulesPatchCall) Mask(mask string) *AppsModulesPatchCall {
  1848. c.urlParams_.Set("mask", mask)
  1849. return c
  1850. }
  1851. // MigrateTraffic sets the optional parameter "migrateTraffic": Whether
  1852. // to use Traffic Migration to shift traffic gradually. Traffic can only
  1853. // be migrated from a single version to another single version.
  1854. func (c *AppsModulesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsModulesPatchCall {
  1855. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  1856. return c
  1857. }
  1858. // Fields allows partial responses to be retrieved. See
  1859. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1860. // for more information.
  1861. func (c *AppsModulesPatchCall) Fields(s ...googleapi.Field) *AppsModulesPatchCall {
  1862. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1863. return c
  1864. }
  1865. // Context sets the context to be used in this call's Do method. Any
  1866. // pending HTTP request will be aborted if the provided context is
  1867. // canceled.
  1868. func (c *AppsModulesPatchCall) Context(ctx context.Context) *AppsModulesPatchCall {
  1869. c.ctx_ = ctx
  1870. return c
  1871. }
  1872. func (c *AppsModulesPatchCall) doRequest(alt string) (*http.Response, error) {
  1873. var body io.Reader = nil
  1874. body, err := googleapi.WithoutDataWrapper.JSONReader(c.module)
  1875. if err != nil {
  1876. return nil, err
  1877. }
  1878. ctype := "application/json"
  1879. c.urlParams_.Set("alt", alt)
  1880. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}")
  1881. urls += "?" + c.urlParams_.Encode()
  1882. req, _ := http.NewRequest("PATCH", urls, body)
  1883. googleapi.Expand(req.URL, map[string]string{
  1884. "appsId": c.appsId,
  1885. "modulesId": c.modulesId,
  1886. })
  1887. req.Header.Set("Content-Type", ctype)
  1888. req.Header.Set("User-Agent", c.s.userAgent())
  1889. if c.ctx_ != nil {
  1890. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1891. }
  1892. return c.s.client.Do(req)
  1893. }
  1894. // Do executes the "appengine.apps.modules.patch" call.
  1895. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  1896. // status code is an error. Response headers are in either
  1897. // *Operation.ServerResponse.Header or (if a response was returned at
  1898. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1899. // to check whether the returned error was because
  1900. // http.StatusNotModified was returned.
  1901. func (c *AppsModulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1902. gensupport.SetOptions(c.urlParams_, opts...)
  1903. res, err := c.doRequest("json")
  1904. if res != nil && res.StatusCode == http.StatusNotModified {
  1905. if res.Body != nil {
  1906. res.Body.Close()
  1907. }
  1908. return nil, &googleapi.Error{
  1909. Code: res.StatusCode,
  1910. Header: res.Header,
  1911. }
  1912. }
  1913. if err != nil {
  1914. return nil, err
  1915. }
  1916. defer googleapi.CloseBody(res)
  1917. if err := googleapi.CheckResponse(res); err != nil {
  1918. return nil, err
  1919. }
  1920. ret := &Operation{
  1921. ServerResponse: googleapi.ServerResponse{
  1922. Header: res.Header,
  1923. HTTPStatusCode: res.StatusCode,
  1924. },
  1925. }
  1926. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1927. return nil, err
  1928. }
  1929. return ret, nil
  1930. // {
  1931. // "description": "Updates the configuration of the specified module.",
  1932. // "httpMethod": "PATCH",
  1933. // "id": "appengine.apps.modules.patch",
  1934. // "parameterOrder": [
  1935. // "appsId",
  1936. // "modulesId"
  1937. // ],
  1938. // "parameters": {
  1939. // "appsId": {
  1940. // "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/modules/default\".",
  1941. // "location": "path",
  1942. // "required": true,
  1943. // "type": "string"
  1944. // },
  1945. // "mask": {
  1946. // "description": "Standard field mask for the set of fields to be updated.",
  1947. // "location": "query",
  1948. // "type": "string"
  1949. // },
  1950. // "migrateTraffic": {
  1951. // "description": "Whether to use Traffic Migration to shift traffic gradually. Traffic can only be migrated from a single version to another single version.",
  1952. // "location": "query",
  1953. // "type": "boolean"
  1954. // },
  1955. // "modulesId": {
  1956. // "description": "Part of `name`. See documentation of `appsId`.",
  1957. // "location": "path",
  1958. // "required": true,
  1959. // "type": "string"
  1960. // }
  1961. // },
  1962. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}",
  1963. // "request": {
  1964. // "$ref": "Module"
  1965. // },
  1966. // "response": {
  1967. // "$ref": "Operation"
  1968. // },
  1969. // "scopes": [
  1970. // "https://www.googleapis.com/auth/cloud-platform"
  1971. // ]
  1972. // }
  1973. }
  1974. // method id "appengine.apps.modules.versions.create":
  1975. type AppsModulesVersionsCreateCall struct {
  1976. s *Service
  1977. appsId string
  1978. modulesId string
  1979. version *Version
  1980. urlParams_ gensupport.URLParams
  1981. ctx_ context.Context
  1982. }
  1983. // Create: Deploys new code and resource files to a version.
  1984. func (r *AppsModulesVersionsService) Create(appsId string, modulesId string, version *Version) *AppsModulesVersionsCreateCall {
  1985. c := &AppsModulesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1986. c.appsId = appsId
  1987. c.modulesId = modulesId
  1988. c.version = version
  1989. return c
  1990. }
  1991. // Fields allows partial responses to be retrieved. See
  1992. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1993. // for more information.
  1994. func (c *AppsModulesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsModulesVersionsCreateCall {
  1995. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1996. return c
  1997. }
  1998. // Context sets the context to be used in this call's Do method. Any
  1999. // pending HTTP request will be aborted if the provided context is
  2000. // canceled.
  2001. func (c *AppsModulesVersionsCreateCall) Context(ctx context.Context) *AppsModulesVersionsCreateCall {
  2002. c.ctx_ = ctx
  2003. return c
  2004. }
  2005. func (c *AppsModulesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  2006. var body io.Reader = nil
  2007. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  2008. if err != nil {
  2009. return nil, err
  2010. }
  2011. ctype := "application/json"
  2012. c.urlParams_.Set("alt", alt)
  2013. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions")
  2014. urls += "?" + c.urlParams_.Encode()
  2015. req, _ := http.NewRequest("POST", urls, body)
  2016. googleapi.Expand(req.URL, map[string]string{
  2017. "appsId": c.appsId,
  2018. "modulesId": c.modulesId,
  2019. })
  2020. req.Header.Set("Content-Type", ctype)
  2021. req.Header.Set("User-Agent", c.s.userAgent())
  2022. if c.ctx_ != nil {
  2023. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2024. }
  2025. return c.s.client.Do(req)
  2026. }
  2027. // Do executes the "appengine.apps.modules.versions.create" call.
  2028. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2029. // status code is an error. Response headers are in either
  2030. // *Operation.ServerResponse.Header or (if a response was returned at
  2031. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2032. // to check whether the returned error was because
  2033. // http.StatusNotModified was returned.
  2034. func (c *AppsModulesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2035. gensupport.SetOptions(c.urlParams_, opts...)
  2036. res, err := c.doRequest("json")
  2037. if res != nil && res.StatusCode == http.StatusNotModified {
  2038. if res.Body != nil {
  2039. res.Body.Close()
  2040. }
  2041. return nil, &googleapi.Error{
  2042. Code: res.StatusCode,
  2043. Header: res.Header,
  2044. }
  2045. }
  2046. if err != nil {
  2047. return nil, err
  2048. }
  2049. defer googleapi.CloseBody(res)
  2050. if err := googleapi.CheckResponse(res); err != nil {
  2051. return nil, err
  2052. }
  2053. ret := &Operation{
  2054. ServerResponse: googleapi.ServerResponse{
  2055. Header: res.Header,
  2056. HTTPStatusCode: res.StatusCode,
  2057. },
  2058. }
  2059. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2060. return nil, err
  2061. }
  2062. return ret, nil
  2063. // {
  2064. // "description": "Deploys new code and resource files to a version.",
  2065. // "httpMethod": "POST",
  2066. // "id": "appengine.apps.modules.versions.create",
  2067. // "parameterOrder": [
  2068. // "appsId",
  2069. // "modulesId"
  2070. // ],
  2071. // "parameters": {
  2072. // "appsId": {
  2073. // "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/modules/default\".",
  2074. // "location": "path",
  2075. // "required": true,
  2076. // "type": "string"
  2077. // },
  2078. // "modulesId": {
  2079. // "description": "Part of `name`. See documentation of `appsId`.",
  2080. // "location": "path",
  2081. // "required": true,
  2082. // "type": "string"
  2083. // }
  2084. // },
  2085. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions",
  2086. // "request": {
  2087. // "$ref": "Version"
  2088. // },
  2089. // "response": {
  2090. // "$ref": "Operation"
  2091. // },
  2092. // "scopes": [
  2093. // "https://www.googleapis.com/auth/cloud-platform"
  2094. // ]
  2095. // }
  2096. }
  2097. // method id "appengine.apps.modules.versions.delete":
  2098. type AppsModulesVersionsDeleteCall struct {
  2099. s *Service
  2100. appsId string
  2101. modulesId string
  2102. versionsId string
  2103. urlParams_ gensupport.URLParams
  2104. ctx_ context.Context
  2105. }
  2106. // Delete: Deletes an existing version.
  2107. func (r *AppsModulesVersionsService) Delete(appsId string, modulesId string, versionsId string) *AppsModulesVersionsDeleteCall {
  2108. c := &AppsModulesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2109. c.appsId = appsId
  2110. c.modulesId = modulesId
  2111. c.versionsId = versionsId
  2112. return c
  2113. }
  2114. // Fields allows partial responses to be retrieved. See
  2115. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2116. // for more information.
  2117. func (c *AppsModulesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsModulesVersionsDeleteCall {
  2118. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2119. return c
  2120. }
  2121. // Context sets the context to be used in this call's Do method. Any
  2122. // pending HTTP request will be aborted if the provided context is
  2123. // canceled.
  2124. func (c *AppsModulesVersionsDeleteCall) Context(ctx context.Context) *AppsModulesVersionsDeleteCall {
  2125. c.ctx_ = ctx
  2126. return c
  2127. }
  2128. func (c *AppsModulesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2129. var body io.Reader = nil
  2130. c.urlParams_.Set("alt", alt)
  2131. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}")
  2132. urls += "?" + c.urlParams_.Encode()
  2133. req, _ := http.NewRequest("DELETE", urls, body)
  2134. googleapi.Expand(req.URL, map[string]string{
  2135. "appsId": c.appsId,
  2136. "modulesId": c.modulesId,
  2137. "versionsId": c.versionsId,
  2138. })
  2139. req.Header.Set("User-Agent", c.s.userAgent())
  2140. if c.ctx_ != nil {
  2141. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2142. }
  2143. return c.s.client.Do(req)
  2144. }
  2145. // Do executes the "appengine.apps.modules.versions.delete" call.
  2146. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2147. // status code is an error. Response headers are in either
  2148. // *Operation.ServerResponse.Header or (if a response was returned at
  2149. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2150. // to check whether the returned error was because
  2151. // http.StatusNotModified was returned.
  2152. func (c *AppsModulesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2153. gensupport.SetOptions(c.urlParams_, opts...)
  2154. res, err := c.doRequest("json")
  2155. if res != nil && res.StatusCode == http.StatusNotModified {
  2156. if res.Body != nil {
  2157. res.Body.Close()
  2158. }
  2159. return nil, &googleapi.Error{
  2160. Code: res.StatusCode,
  2161. Header: res.Header,
  2162. }
  2163. }
  2164. if err != nil {
  2165. return nil, err
  2166. }
  2167. defer googleapi.CloseBody(res)
  2168. if err := googleapi.CheckResponse(res); err != nil {
  2169. return nil, err
  2170. }
  2171. ret := &Operation{
  2172. ServerResponse: googleapi.ServerResponse{
  2173. Header: res.Header,
  2174. HTTPStatusCode: res.StatusCode,
  2175. },
  2176. }
  2177. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2178. return nil, err
  2179. }
  2180. return ret, nil
  2181. // {
  2182. // "description": "Deletes an existing version.",
  2183. // "httpMethod": "DELETE",
  2184. // "id": "appengine.apps.modules.versions.delete",
  2185. // "parameterOrder": [
  2186. // "appsId",
  2187. // "modulesId",
  2188. // "versionsId"
  2189. // ],
  2190. // "parameters": {
  2191. // "appsId": {
  2192. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/modules/default/versions/v1\".",
  2193. // "location": "path",
  2194. // "required": true,
  2195. // "type": "string"
  2196. // },
  2197. // "modulesId": {
  2198. // "description": "Part of `name`. See documentation of `appsId`.",
  2199. // "location": "path",
  2200. // "required": true,
  2201. // "type": "string"
  2202. // },
  2203. // "versionsId": {
  2204. // "description": "Part of `name`. See documentation of `appsId`.",
  2205. // "location": "path",
  2206. // "required": true,
  2207. // "type": "string"
  2208. // }
  2209. // },
  2210. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  2211. // "response": {
  2212. // "$ref": "Operation"
  2213. // },
  2214. // "scopes": [
  2215. // "https://www.googleapis.com/auth/cloud-platform"
  2216. // ]
  2217. // }
  2218. }
  2219. // method id "appengine.apps.modules.versions.get":
  2220. type AppsModulesVersionsGetCall struct {
  2221. s *Service
  2222. appsId string
  2223. modulesId string
  2224. versionsId string
  2225. urlParams_ gensupport.URLParams
  2226. ifNoneMatch_ string
  2227. ctx_ context.Context
  2228. }
  2229. // Get: Gets application deployment information.
  2230. func (r *AppsModulesVersionsService) Get(appsId string, modulesId string, versionsId string) *AppsModulesVersionsGetCall {
  2231. c := &AppsModulesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2232. c.appsId = appsId
  2233. c.modulesId = modulesId
  2234. c.versionsId = versionsId
  2235. return c
  2236. }
  2237. // View sets the optional parameter "view": Controls the set of fields
  2238. // returned in the `Get` response.
  2239. //
  2240. // Possible values:
  2241. // "BASIC"
  2242. // "FULL"
  2243. func (c *AppsModulesVersionsGetCall) View(view string) *AppsModulesVersionsGetCall {
  2244. c.urlParams_.Set("view", view)
  2245. return c
  2246. }
  2247. // Fields allows partial responses to be retrieved. See
  2248. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2249. // for more information.
  2250. func (c *AppsModulesVersionsGetCall) Fields(s ...googleapi.Field) *AppsModulesVersionsGetCall {
  2251. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2252. return c
  2253. }
  2254. // IfNoneMatch sets the optional parameter which makes the operation
  2255. // fail if the object's ETag matches the given value. This is useful for
  2256. // getting updates only after the object has changed since the last
  2257. // request. Use googleapi.IsNotModified to check whether the response
  2258. // error from Do is the result of In-None-Match.
  2259. func (c *AppsModulesVersionsGetCall) IfNoneMatch(entityTag string) *AppsModulesVersionsGetCall {
  2260. c.ifNoneMatch_ = entityTag
  2261. return c
  2262. }
  2263. // Context sets the context to be used in this call's Do method. Any
  2264. // pending HTTP request will be aborted if the provided context is
  2265. // canceled.
  2266. func (c *AppsModulesVersionsGetCall) Context(ctx context.Context) *AppsModulesVersionsGetCall {
  2267. c.ctx_ = ctx
  2268. return c
  2269. }
  2270. func (c *AppsModulesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  2271. var body io.Reader = nil
  2272. c.urlParams_.Set("alt", alt)
  2273. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}")
  2274. urls += "?" + c.urlParams_.Encode()
  2275. req, _ := http.NewRequest("GET", urls, body)
  2276. googleapi.Expand(req.URL, map[string]string{
  2277. "appsId": c.appsId,
  2278. "modulesId": c.modulesId,
  2279. "versionsId": c.versionsId,
  2280. })
  2281. req.Header.Set("User-Agent", c.s.userAgent())
  2282. if c.ifNoneMatch_ != "" {
  2283. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  2284. }
  2285. if c.ctx_ != nil {
  2286. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2287. }
  2288. return c.s.client.Do(req)
  2289. }
  2290. // Do executes the "appengine.apps.modules.versions.get" call.
  2291. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  2292. // code is an error. Response headers are in either
  2293. // *Version.ServerResponse.Header or (if a response was returned at all)
  2294. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2295. // check whether the returned error was because http.StatusNotModified
  2296. // was returned.
  2297. func (c *AppsModulesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  2298. gensupport.SetOptions(c.urlParams_, opts...)
  2299. res, err := c.doRequest("json")
  2300. if res != nil && res.StatusCode == http.StatusNotModified {
  2301. if res.Body != nil {
  2302. res.Body.Close()
  2303. }
  2304. return nil, &googleapi.Error{
  2305. Code: res.StatusCode,
  2306. Header: res.Header,
  2307. }
  2308. }
  2309. if err != nil {
  2310. return nil, err
  2311. }
  2312. defer googleapi.CloseBody(res)
  2313. if err := googleapi.CheckResponse(res); err != nil {
  2314. return nil, err
  2315. }
  2316. ret := &Version{
  2317. ServerResponse: googleapi.ServerResponse{
  2318. Header: res.Header,
  2319. HTTPStatusCode: res.StatusCode,
  2320. },
  2321. }
  2322. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2323. return nil, err
  2324. }
  2325. return ret, nil
  2326. // {
  2327. // "description": "Gets application deployment information.",
  2328. // "httpMethod": "GET",
  2329. // "id": "appengine.apps.modules.versions.get",
  2330. // "parameterOrder": [
  2331. // "appsId",
  2332. // "modulesId",
  2333. // "versionsId"
  2334. // ],
  2335. // "parameters": {
  2336. // "appsId": {
  2337. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/modules/default/versions/v1\".",
  2338. // "location": "path",
  2339. // "required": true,
  2340. // "type": "string"
  2341. // },
  2342. // "modulesId": {
  2343. // "description": "Part of `name`. See documentation of `appsId`.",
  2344. // "location": "path",
  2345. // "required": true,
  2346. // "type": "string"
  2347. // },
  2348. // "versionsId": {
  2349. // "description": "Part of `name`. See documentation of `appsId`.",
  2350. // "location": "path",
  2351. // "required": true,
  2352. // "type": "string"
  2353. // },
  2354. // "view": {
  2355. // "description": "Controls the set of fields returned in the `Get` response.",
  2356. // "enum": [
  2357. // "BASIC",
  2358. // "FULL"
  2359. // ],
  2360. // "location": "query",
  2361. // "type": "string"
  2362. // }
  2363. // },
  2364. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  2365. // "response": {
  2366. // "$ref": "Version"
  2367. // },
  2368. // "scopes": [
  2369. // "https://www.googleapis.com/auth/cloud-platform"
  2370. // ]
  2371. // }
  2372. }
  2373. // method id "appengine.apps.modules.versions.list":
  2374. type AppsModulesVersionsListCall struct {
  2375. s *Service
  2376. appsId string
  2377. modulesId string
  2378. urlParams_ gensupport.URLParams
  2379. ifNoneMatch_ string
  2380. ctx_ context.Context
  2381. }
  2382. // List: Lists the versions of a module.
  2383. func (r *AppsModulesVersionsService) List(appsId string, modulesId string) *AppsModulesVersionsListCall {
  2384. c := &AppsModulesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2385. c.appsId = appsId
  2386. c.modulesId = modulesId
  2387. return c
  2388. }
  2389. // PageSize sets the optional parameter "pageSize": Maximum results to
  2390. // return per page.
  2391. func (c *AppsModulesVersionsListCall) PageSize(pageSize int64) *AppsModulesVersionsListCall {
  2392. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2393. return c
  2394. }
  2395. // PageToken sets the optional parameter "pageToken": Continuation token
  2396. // for fetching the next page of results.
  2397. func (c *AppsModulesVersionsListCall) PageToken(pageToken string) *AppsModulesVersionsListCall {
  2398. c.urlParams_.Set("pageToken", pageToken)
  2399. return c
  2400. }
  2401. // View sets the optional parameter "view": Controls the set of fields
  2402. // returned in the `List` response.
  2403. //
  2404. // Possible values:
  2405. // "BASIC"
  2406. // "FULL"
  2407. func (c *AppsModulesVersionsListCall) View(view string) *AppsModulesVersionsListCall {
  2408. c.urlParams_.Set("view", view)
  2409. return c
  2410. }
  2411. // Fields allows partial responses to be retrieved. See
  2412. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2413. // for more information.
  2414. func (c *AppsModulesVersionsListCall) Fields(s ...googleapi.Field) *AppsModulesVersionsListCall {
  2415. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2416. return c
  2417. }
  2418. // IfNoneMatch sets the optional parameter which makes the operation
  2419. // fail if the object's ETag matches the given value. This is useful for
  2420. // getting updates only after the object has changed since the last
  2421. // request. Use googleapi.IsNotModified to check whether the response
  2422. // error from Do is the result of In-None-Match.
  2423. func (c *AppsModulesVersionsListCall) IfNoneMatch(entityTag string) *AppsModulesVersionsListCall {
  2424. c.ifNoneMatch_ = entityTag
  2425. return c
  2426. }
  2427. // Context sets the context to be used in this call's Do method. Any
  2428. // pending HTTP request will be aborted if the provided context is
  2429. // canceled.
  2430. func (c *AppsModulesVersionsListCall) Context(ctx context.Context) *AppsModulesVersionsListCall {
  2431. c.ctx_ = ctx
  2432. return c
  2433. }
  2434. func (c *AppsModulesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  2435. var body io.Reader = nil
  2436. c.urlParams_.Set("alt", alt)
  2437. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions")
  2438. urls += "?" + c.urlParams_.Encode()
  2439. req, _ := http.NewRequest("GET", urls, body)
  2440. googleapi.Expand(req.URL, map[string]string{
  2441. "appsId": c.appsId,
  2442. "modulesId": c.modulesId,
  2443. })
  2444. req.Header.Set("User-Agent", c.s.userAgent())
  2445. if c.ifNoneMatch_ != "" {
  2446. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  2447. }
  2448. if c.ctx_ != nil {
  2449. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2450. }
  2451. return c.s.client.Do(req)
  2452. }
  2453. // Do executes the "appengine.apps.modules.versions.list" call.
  2454. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  2455. // non-2xx status code is an error. Response headers are in either
  2456. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  2457. // returned at all) in error.(*googleapi.Error).Header. Use
  2458. // googleapi.IsNotModified to check whether the returned error was
  2459. // because http.StatusNotModified was returned.
  2460. func (c *AppsModulesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  2461. gensupport.SetOptions(c.urlParams_, opts...)
  2462. res, err := c.doRequest("json")
  2463. if res != nil && res.StatusCode == http.StatusNotModified {
  2464. if res.Body != nil {
  2465. res.Body.Close()
  2466. }
  2467. return nil, &googleapi.Error{
  2468. Code: res.StatusCode,
  2469. Header: res.Header,
  2470. }
  2471. }
  2472. if err != nil {
  2473. return nil, err
  2474. }
  2475. defer googleapi.CloseBody(res)
  2476. if err := googleapi.CheckResponse(res); err != nil {
  2477. return nil, err
  2478. }
  2479. ret := &ListVersionsResponse{
  2480. ServerResponse: googleapi.ServerResponse{
  2481. Header: res.Header,
  2482. HTTPStatusCode: res.StatusCode,
  2483. },
  2484. }
  2485. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2486. return nil, err
  2487. }
  2488. return ret, nil
  2489. // {
  2490. // "description": "Lists the versions of a module.",
  2491. // "httpMethod": "GET",
  2492. // "id": "appengine.apps.modules.versions.list",
  2493. // "parameterOrder": [
  2494. // "appsId",
  2495. // "modulesId"
  2496. // ],
  2497. // "parameters": {
  2498. // "appsId": {
  2499. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/modules/default\".",
  2500. // "location": "path",
  2501. // "required": true,
  2502. // "type": "string"
  2503. // },
  2504. // "modulesId": {
  2505. // "description": "Part of `name`. See documentation of `appsId`.",
  2506. // "location": "path",
  2507. // "required": true,
  2508. // "type": "string"
  2509. // },
  2510. // "pageSize": {
  2511. // "description": "Maximum results to return per page.",
  2512. // "format": "int32",
  2513. // "location": "query",
  2514. // "type": "integer"
  2515. // },
  2516. // "pageToken": {
  2517. // "description": "Continuation token for fetching the next page of results.",
  2518. // "location": "query",
  2519. // "type": "string"
  2520. // },
  2521. // "view": {
  2522. // "description": "Controls the set of fields returned in the `List` response.",
  2523. // "enum": [
  2524. // "BASIC",
  2525. // "FULL"
  2526. // ],
  2527. // "location": "query",
  2528. // "type": "string"
  2529. // }
  2530. // },
  2531. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions",
  2532. // "response": {
  2533. // "$ref": "ListVersionsResponse"
  2534. // },
  2535. // "scopes": [
  2536. // "https://www.googleapis.com/auth/cloud-platform"
  2537. // ]
  2538. // }
  2539. }
  2540. // Pages invokes f for each page of results.
  2541. // A non-nil error returned from f will halt the iteration.
  2542. // The provided context supersedes any context provided to the Context method.
  2543. func (c *AppsModulesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  2544. c.ctx_ = ctx
  2545. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2546. for {
  2547. x, err := c.Do()
  2548. if err != nil {
  2549. return err
  2550. }
  2551. if err := f(x); err != nil {
  2552. return err
  2553. }
  2554. if x.NextPageToken == "" {
  2555. return nil
  2556. }
  2557. c.PageToken(x.NextPageToken)
  2558. }
  2559. }
  2560. // method id "appengine.apps.operations.get":
  2561. type AppsOperationsGetCall struct {
  2562. s *Service
  2563. appsId string
  2564. operationsId string
  2565. urlParams_ gensupport.URLParams
  2566. ifNoneMatch_ string
  2567. ctx_ context.Context
  2568. }
  2569. // Get: Gets the latest state of a long-running operation. Clients can
  2570. // use this method to poll the operation result at intervals as
  2571. // recommended by the API service.
  2572. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  2573. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2574. c.appsId = appsId
  2575. c.operationsId = operationsId
  2576. return c
  2577. }
  2578. // Fields allows partial responses to be retrieved. See
  2579. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2580. // for more information.
  2581. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  2582. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2583. return c
  2584. }
  2585. // IfNoneMatch sets the optional parameter which makes the operation
  2586. // fail if the object's ETag matches the given value. This is useful for
  2587. // getting updates only after the object has changed since the last
  2588. // request. Use googleapi.IsNotModified to check whether the response
  2589. // error from Do is the result of In-None-Match.
  2590. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  2591. c.ifNoneMatch_ = entityTag
  2592. return c
  2593. }
  2594. // Context sets the context to be used in this call's Do method. Any
  2595. // pending HTTP request will be aborted if the provided context is
  2596. // canceled.
  2597. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  2598. c.ctx_ = ctx
  2599. return c
  2600. }
  2601. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2602. var body io.Reader = nil
  2603. c.urlParams_.Set("alt", alt)
  2604. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/operations/{operationsId}")
  2605. urls += "?" + c.urlParams_.Encode()
  2606. req, _ := http.NewRequest("GET", urls, body)
  2607. googleapi.Expand(req.URL, map[string]string{
  2608. "appsId": c.appsId,
  2609. "operationsId": c.operationsId,
  2610. })
  2611. req.Header.Set("User-Agent", c.s.userAgent())
  2612. if c.ifNoneMatch_ != "" {
  2613. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  2614. }
  2615. if c.ctx_ != nil {
  2616. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2617. }
  2618. return c.s.client.Do(req)
  2619. }
  2620. // Do executes the "appengine.apps.operations.get" call.
  2621. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2622. // status code is an error. Response headers are in either
  2623. // *Operation.ServerResponse.Header or (if a response was returned at
  2624. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2625. // to check whether the returned error was because
  2626. // http.StatusNotModified was returned.
  2627. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2628. gensupport.SetOptions(c.urlParams_, opts...)
  2629. res, err := c.doRequest("json")
  2630. if res != nil && res.StatusCode == http.StatusNotModified {
  2631. if res.Body != nil {
  2632. res.Body.Close()
  2633. }
  2634. return nil, &googleapi.Error{
  2635. Code: res.StatusCode,
  2636. Header: res.Header,
  2637. }
  2638. }
  2639. if err != nil {
  2640. return nil, err
  2641. }
  2642. defer googleapi.CloseBody(res)
  2643. if err := googleapi.CheckResponse(res); err != nil {
  2644. return nil, err
  2645. }
  2646. ret := &Operation{
  2647. ServerResponse: googleapi.ServerResponse{
  2648. Header: res.Header,
  2649. HTTPStatusCode: res.StatusCode,
  2650. },
  2651. }
  2652. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2653. return nil, err
  2654. }
  2655. return ret, nil
  2656. // {
  2657. // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
  2658. // "httpMethod": "GET",
  2659. // "id": "appengine.apps.operations.get",
  2660. // "parameterOrder": [
  2661. // "appsId",
  2662. // "operationsId"
  2663. // ],
  2664. // "parameters": {
  2665. // "appsId": {
  2666. // "description": "Part of `name`. The name of the operation resource.",
  2667. // "location": "path",
  2668. // "required": true,
  2669. // "type": "string"
  2670. // },
  2671. // "operationsId": {
  2672. // "description": "Part of `name`. See documentation of `appsId`.",
  2673. // "location": "path",
  2674. // "required": true,
  2675. // "type": "string"
  2676. // }
  2677. // },
  2678. // "path": "v1beta4/apps/{appsId}/operations/{operationsId}",
  2679. // "response": {
  2680. // "$ref": "Operation"
  2681. // },
  2682. // "scopes": [
  2683. // "https://www.googleapis.com/auth/cloud-platform"
  2684. // ]
  2685. // }
  2686. }
  2687. // method id "appengine.apps.operations.list":
  2688. type AppsOperationsListCall struct {
  2689. s *Service
  2690. appsId string
  2691. urlParams_ gensupport.URLParams
  2692. ifNoneMatch_ string
  2693. ctx_ context.Context
  2694. }
  2695. // List: Lists operations that match the specified filter in the
  2696. // request. If the server doesn't support this method, it returns
  2697. // `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services
  2698. // to override the binding to use different resource name schemes, such
  2699. // as `users/*/operations`.
  2700. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  2701. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2702. c.appsId = appsId
  2703. return c
  2704. }
  2705. // Filter sets the optional parameter "filter": The standard list
  2706. // filter.
  2707. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  2708. c.urlParams_.Set("filter", filter)
  2709. return c
  2710. }
  2711. // PageSize sets the optional parameter "pageSize": The standard list
  2712. // page size.
  2713. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  2714. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2715. return c
  2716. }
  2717. // PageToken sets the optional parameter "pageToken": The standard list
  2718. // page token.
  2719. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  2720. c.urlParams_.Set("pageToken", pageToken)
  2721. return c
  2722. }
  2723. // Fields allows partial responses to be retrieved. See
  2724. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2725. // for more information.
  2726. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  2727. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2728. return c
  2729. }
  2730. // IfNoneMatch sets the optional parameter which makes the operation
  2731. // fail if the object's ETag matches the given value. This is useful for
  2732. // getting updates only after the object has changed since the last
  2733. // request. Use googleapi.IsNotModified to check whether the response
  2734. // error from Do is the result of In-None-Match.
  2735. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  2736. c.ifNoneMatch_ = entityTag
  2737. return c
  2738. }
  2739. // Context sets the context to be used in this call's Do method. Any
  2740. // pending HTTP request will be aborted if the provided context is
  2741. // canceled.
  2742. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  2743. c.ctx_ = ctx
  2744. return c
  2745. }
  2746. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2747. var body io.Reader = nil
  2748. c.urlParams_.Set("alt", alt)
  2749. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/operations")
  2750. urls += "?" + c.urlParams_.Encode()
  2751. req, _ := http.NewRequest("GET", urls, body)
  2752. googleapi.Expand(req.URL, map[string]string{
  2753. "appsId": c.appsId,
  2754. })
  2755. req.Header.Set("User-Agent", c.s.userAgent())
  2756. if c.ifNoneMatch_ != "" {
  2757. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  2758. }
  2759. if c.ctx_ != nil {
  2760. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2761. }
  2762. return c.s.client.Do(req)
  2763. }
  2764. // Do executes the "appengine.apps.operations.list" call.
  2765. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  2766. // non-2xx status code is an error. Response headers are in either
  2767. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  2768. // returned at all) in error.(*googleapi.Error).Header. Use
  2769. // googleapi.IsNotModified to check whether the returned error was
  2770. // because http.StatusNotModified was returned.
  2771. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2772. gensupport.SetOptions(c.urlParams_, opts...)
  2773. res, err := c.doRequest("json")
  2774. if res != nil && res.StatusCode == http.StatusNotModified {
  2775. if res.Body != nil {
  2776. res.Body.Close()
  2777. }
  2778. return nil, &googleapi.Error{
  2779. Code: res.StatusCode,
  2780. Header: res.Header,
  2781. }
  2782. }
  2783. if err != nil {
  2784. return nil, err
  2785. }
  2786. defer googleapi.CloseBody(res)
  2787. if err := googleapi.CheckResponse(res); err != nil {
  2788. return nil, err
  2789. }
  2790. ret := &ListOperationsResponse{
  2791. ServerResponse: googleapi.ServerResponse{
  2792. Header: res.Header,
  2793. HTTPStatusCode: res.StatusCode,
  2794. },
  2795. }
  2796. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2797. return nil, err
  2798. }
  2799. return ret, nil
  2800. // {
  2801. // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`.",
  2802. // "httpMethod": "GET",
  2803. // "id": "appengine.apps.operations.list",
  2804. // "parameterOrder": [
  2805. // "appsId"
  2806. // ],
  2807. // "parameters": {
  2808. // "appsId": {
  2809. // "description": "Part of `name`. The name of the operation collection.",
  2810. // "location": "path",
  2811. // "required": true,
  2812. // "type": "string"
  2813. // },
  2814. // "filter": {
  2815. // "description": "The standard list filter.",
  2816. // "location": "query",
  2817. // "type": "string"
  2818. // },
  2819. // "pageSize": {
  2820. // "description": "The standard list page size.",
  2821. // "format": "int32",
  2822. // "location": "query",
  2823. // "type": "integer"
  2824. // },
  2825. // "pageToken": {
  2826. // "description": "The standard list page token.",
  2827. // "location": "query",
  2828. // "type": "string"
  2829. // }
  2830. // },
  2831. // "path": "v1beta4/apps/{appsId}/operations",
  2832. // "response": {
  2833. // "$ref": "ListOperationsResponse"
  2834. // },
  2835. // "scopes": [
  2836. // "https://www.googleapis.com/auth/cloud-platform"
  2837. // ]
  2838. // }
  2839. }
  2840. // Pages invokes f for each page of results.
  2841. // A non-nil error returned from f will halt the iteration.
  2842. // The provided context supersedes any context provided to the Context method.
  2843. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2844. c.ctx_ = ctx
  2845. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2846. for {
  2847. x, err := c.Do()
  2848. if err != nil {
  2849. return err
  2850. }
  2851. if err := f(x); err != nil {
  2852. return err
  2853. }
  2854. if x.NextPageToken == "" {
  2855. return nil
  2856. }
  2857. c.PageToken(x.NextPageToken)
  2858. }
  2859. }