appengine-gen.go 112 KB

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