manager-gen.go 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245
  1. // Package manager provides access to the Deployment Manager API.
  2. //
  3. // See https://developers.google.com/deployment-manager/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/manager/v1beta2"
  8. // ...
  9. // managerService, err := manager.New(oauthHttpClient)
  10. package manager // import "google.golang.org/api/manager/v1beta2"
  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 = "manager:v1beta2"
  41. const apiName = "manager"
  42. const apiVersion = "v1beta2"
  43. const basePath = "https://www.googleapis.com/manager/v1beta2/projects/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your applications deployed on Google App Engine
  47. AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin"
  48. // View and manage your data across Google Cloud Platform services
  49. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  50. // View your data across Google Cloud Platform services
  51. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  52. // View and manage your Google Compute Engine resources
  53. ComputeScope = "https://www.googleapis.com/auth/compute"
  54. // Manage your data in Google Cloud Storage
  55. DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
  56. // View and manage your Google Cloud Platform management resources and
  57. // deployment status information
  58. NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman"
  59. // View your Google Cloud Platform management resources and deployment
  60. // status information
  61. NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  62. )
  63. func New(client *http.Client) (*Service, error) {
  64. if client == nil {
  65. return nil, errors.New("client is nil")
  66. }
  67. s := &Service{client: client, BasePath: basePath}
  68. s.Deployments = NewDeploymentsService(s)
  69. s.Templates = NewTemplatesService(s)
  70. return s, nil
  71. }
  72. type Service struct {
  73. client *http.Client
  74. BasePath string // API endpoint base URL
  75. UserAgent string // optional additional User-Agent fragment
  76. Deployments *DeploymentsService
  77. Templates *TemplatesService
  78. }
  79. func (s *Service) userAgent() string {
  80. if s.UserAgent == "" {
  81. return googleapi.UserAgent
  82. }
  83. return googleapi.UserAgent + " " + s.UserAgent
  84. }
  85. func NewDeploymentsService(s *Service) *DeploymentsService {
  86. rs := &DeploymentsService{s: s}
  87. return rs
  88. }
  89. type DeploymentsService struct {
  90. s *Service
  91. }
  92. func NewTemplatesService(s *Service) *TemplatesService {
  93. rs := &TemplatesService{s: s}
  94. return rs
  95. }
  96. type TemplatesService struct {
  97. s *Service
  98. }
  99. // AccessConfig: A Compute Engine network accessConfig. Identical to the
  100. // accessConfig on corresponding Compute Engine resource.
  101. type AccessConfig struct {
  102. // Name: Name of this access configuration.
  103. Name string `json:"name,omitempty"`
  104. // NatIp: An external IP address associated with this instance.
  105. NatIp string `json:"natIp,omitempty"`
  106. // Type: Type of this access configuration file. (Currently only
  107. // ONE_TO_ONE_NAT is legal.)
  108. Type string `json:"type,omitempty"`
  109. // ForceSendFields is a list of field names (e.g. "Name") to
  110. // unconditionally include in API requests. By default, fields with
  111. // empty values are omitted from API requests. However, any non-pointer,
  112. // non-interface field appearing in ForceSendFields will be sent to the
  113. // server regardless of whether the field is empty or not. This may be
  114. // used to include empty fields in Patch requests.
  115. ForceSendFields []string `json:"-"`
  116. }
  117. func (s *AccessConfig) MarshalJSON() ([]byte, error) {
  118. type noMethod AccessConfig
  119. raw := noMethod(*s)
  120. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  121. }
  122. // Action: An Action encapsulates a set of commands as a single runnable
  123. // module with additional information needed during run-time.
  124. type Action struct {
  125. // Commands: A list of commands to run sequentially for this action.
  126. Commands []string `json:"commands,omitempty"`
  127. // TimeoutMs: The timeout in milliseconds for this action to run.
  128. TimeoutMs int64 `json:"timeoutMs,omitempty"`
  129. // ForceSendFields is a list of field names (e.g. "Commands") to
  130. // unconditionally include in API requests. By default, fields with
  131. // empty values are omitted from API requests. However, any non-pointer,
  132. // non-interface field appearing in ForceSendFields will be sent to the
  133. // server regardless of whether the field is empty or not. This may be
  134. // used to include empty fields in Patch requests.
  135. ForceSendFields []string `json:"-"`
  136. }
  137. func (s *Action) MarshalJSON() ([]byte, error) {
  138. type noMethod Action
  139. raw := noMethod(*s)
  140. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  141. }
  142. // AllowedRule: An allowed port resource.
  143. type AllowedRule struct {
  144. // IPProtocol: ?tcp?, ?udp? or ?icmp?
  145. IPProtocol string `json:"IPProtocol,omitempty"`
  146. // Ports: List of ports or port ranges (Example inputs include: ["22"],
  147. // [?33?, "12345-12349"].
  148. Ports []string `json:"ports,omitempty"`
  149. // ForceSendFields is a list of field names (e.g. "IPProtocol") to
  150. // unconditionally include in API requests. By default, fields with
  151. // empty values are omitted from API requests. However, any non-pointer,
  152. // non-interface field appearing in ForceSendFields will be sent to the
  153. // server regardless of whether the field is empty or not. This may be
  154. // used to include empty fields in Patch requests.
  155. ForceSendFields []string `json:"-"`
  156. }
  157. func (s *AllowedRule) MarshalJSON() ([]byte, error) {
  158. type noMethod AllowedRule
  159. raw := noMethod(*s)
  160. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  161. }
  162. type AutoscalingModule struct {
  163. CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"`
  164. Description string `json:"description,omitempty"`
  165. MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"`
  166. MinNumReplicas int64 `json:"minNumReplicas,omitempty"`
  167. SignalType string `json:"signalType,omitempty"`
  168. TargetModule string `json:"targetModule,omitempty"`
  169. // TargetUtilization: target_utilization should be in range [0,1].
  170. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  171. // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec")
  172. // to unconditionally include in API requests. By default, fields with
  173. // empty values are omitted from API requests. However, any non-pointer,
  174. // non-interface field appearing in ForceSendFields will be sent to the
  175. // server regardless of whether the field is empty or not. This may be
  176. // used to include empty fields in Patch requests.
  177. ForceSendFields []string `json:"-"`
  178. }
  179. func (s *AutoscalingModule) MarshalJSON() ([]byte, error) {
  180. type noMethod AutoscalingModule
  181. raw := noMethod(*s)
  182. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  183. }
  184. type AutoscalingModuleStatus struct {
  185. // AutoscalingConfigUrl: [Output Only] The URL of the corresponding
  186. // Autoscaling configuration.
  187. AutoscalingConfigUrl string `json:"autoscalingConfigUrl,omitempty"`
  188. // ForceSendFields is a list of field names (e.g.
  189. // "AutoscalingConfigUrl") to unconditionally include in API requests.
  190. // By default, fields with empty values are omitted from API requests.
  191. // However, any non-pointer, non-interface field appearing in
  192. // ForceSendFields will be sent to the server regardless of whether the
  193. // field is empty or not. This may be used to include empty fields in
  194. // Patch requests.
  195. ForceSendFields []string `json:"-"`
  196. }
  197. func (s *AutoscalingModuleStatus) MarshalJSON() ([]byte, error) {
  198. type noMethod AutoscalingModuleStatus
  199. raw := noMethod(*s)
  200. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  201. }
  202. // DeployState: [Output Only] The current state of a replica or module.
  203. type DeployState struct {
  204. // Details: [Output Only] Human readable details about the current
  205. // state.
  206. Details string `json:"details,omitempty"`
  207. // Status: [Output Only] The status of the deployment. Possible values
  208. // include:
  209. // - UNKNOWN
  210. // - DEPLOYING
  211. // - DEPLOYED
  212. // - DEPLOYMENT_FAILED
  213. // - DELETING
  214. // - DELETED
  215. // - DELETE_FAILED
  216. Status string `json:"status,omitempty"`
  217. // ForceSendFields is a list of field names (e.g. "Details") to
  218. // unconditionally include in API requests. By default, fields with
  219. // empty values are omitted from API requests. However, any non-pointer,
  220. // non-interface field appearing in ForceSendFields will be sent to the
  221. // server regardless of whether the field is empty or not. This may be
  222. // used to include empty fields in Patch requests.
  223. ForceSendFields []string `json:"-"`
  224. }
  225. func (s *DeployState) MarshalJSON() ([]byte, error) {
  226. type noMethod DeployState
  227. raw := noMethod(*s)
  228. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  229. }
  230. // Deployment: A deployment represents a physical instantiation of a
  231. // Template.
  232. type Deployment struct {
  233. // CreationDate: [Output Only] The time when this deployment was
  234. // created.
  235. CreationDate string `json:"creationDate,omitempty"`
  236. // Description: A user-supplied description of this Deployment.
  237. Description string `json:"description,omitempty"`
  238. // Modules: [Output Only] List of status for the modules in this
  239. // deployment.
  240. Modules map[string]ModuleStatus `json:"modules,omitempty"`
  241. // Name: Name of this deployment. The name must conform to the following
  242. // regular expression: [a-zA-Z0-9-_]{1,64}
  243. Name string `json:"name,omitempty"`
  244. // Overrides: The set of parameter overrides to apply to the
  245. // corresponding Template before deploying.
  246. Overrides []*ParamOverride `json:"overrides,omitempty"`
  247. // State: [Output Only] Current status of this deployment.
  248. State *DeployState `json:"state,omitempty"`
  249. // TemplateName: The name of the Template on which this deployment is
  250. // based.
  251. TemplateName string `json:"templateName,omitempty"`
  252. // ServerResponse contains the HTTP response code and headers from the
  253. // server.
  254. googleapi.ServerResponse `json:"-"`
  255. // ForceSendFields is a list of field names (e.g. "CreationDate") to
  256. // unconditionally include in API requests. By default, fields with
  257. // empty values are omitted from API requests. However, any non-pointer,
  258. // non-interface field appearing in ForceSendFields will be sent to the
  259. // server regardless of whether the field is empty or not. This may be
  260. // used to include empty fields in Patch requests.
  261. ForceSendFields []string `json:"-"`
  262. }
  263. func (s *Deployment) MarshalJSON() ([]byte, error) {
  264. type noMethod Deployment
  265. raw := noMethod(*s)
  266. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  267. }
  268. type DeploymentsListResponse struct {
  269. NextPageToken string `json:"nextPageToken,omitempty"`
  270. Resources []*Deployment `json:"resources,omitempty"`
  271. // ServerResponse contains the HTTP response code and headers from the
  272. // server.
  273. googleapi.ServerResponse `json:"-"`
  274. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  275. // unconditionally include in API requests. By default, fields with
  276. // empty values are omitted from API requests. However, any non-pointer,
  277. // non-interface field appearing in ForceSendFields will be sent to the
  278. // server regardless of whether the field is empty or not. This may be
  279. // used to include empty fields in Patch requests.
  280. ForceSendFields []string `json:"-"`
  281. }
  282. func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) {
  283. type noMethod DeploymentsListResponse
  284. raw := noMethod(*s)
  285. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  286. }
  287. // DiskAttachment: How to attach a disk to a Replica.
  288. type DiskAttachment struct {
  289. // DeviceName: The device name of this disk.
  290. DeviceName string `json:"deviceName,omitempty"`
  291. // Index: A zero-based index to assign to this disk, where 0 is reserved
  292. // for the boot disk. If not specified, this is assigned by the server.
  293. Index int64 `json:"index,omitempty"`
  294. // ForceSendFields is a list of field names (e.g. "DeviceName") to
  295. // unconditionally include in API requests. By default, fields with
  296. // empty values are omitted from API requests. However, any non-pointer,
  297. // non-interface field appearing in ForceSendFields will be sent to the
  298. // server regardless of whether the field is empty or not. This may be
  299. // used to include empty fields in Patch requests.
  300. ForceSendFields []string `json:"-"`
  301. }
  302. func (s *DiskAttachment) MarshalJSON() ([]byte, error) {
  303. type noMethod DiskAttachment
  304. raw := noMethod(*s)
  305. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  306. }
  307. // EnvVariable: An environment variable.
  308. type EnvVariable struct {
  309. // Hidden: Whether this variable is hidden or visible.
  310. Hidden bool `json:"hidden,omitempty"`
  311. // Value: Value of the environment variable.
  312. Value string `json:"value,omitempty"`
  313. // ForceSendFields is a list of field names (e.g. "Hidden") to
  314. // unconditionally include in API requests. By default, fields with
  315. // empty values are omitted from API requests. However, any non-pointer,
  316. // non-interface field appearing in ForceSendFields will be sent to the
  317. // server regardless of whether the field is empty or not. This may be
  318. // used to include empty fields in Patch requests.
  319. ForceSendFields []string `json:"-"`
  320. }
  321. func (s *EnvVariable) MarshalJSON() ([]byte, error) {
  322. type noMethod EnvVariable
  323. raw := noMethod(*s)
  324. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  325. }
  326. // ExistingDisk: A pre-existing persistent disk that will be attached to
  327. // every Replica in the Pool.
  328. type ExistingDisk struct {
  329. // Attachment: Optional. How the disk will be attached to the Replica.
  330. Attachment *DiskAttachment `json:"attachment,omitempty"`
  331. // Source: The fully-qualified URL of the Persistent Disk resource. It
  332. // must be in the same zone as the Pool.
  333. Source string `json:"source,omitempty"`
  334. // ForceSendFields is a list of field names (e.g. "Attachment") to
  335. // unconditionally include in API requests. By default, fields with
  336. // empty values are omitted from API requests. However, any non-pointer,
  337. // non-interface field appearing in ForceSendFields will be sent to the
  338. // server regardless of whether the field is empty or not. This may be
  339. // used to include empty fields in Patch requests.
  340. ForceSendFields []string `json:"-"`
  341. }
  342. func (s *ExistingDisk) MarshalJSON() ([]byte, error) {
  343. type noMethod ExistingDisk
  344. raw := noMethod(*s)
  345. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  346. }
  347. // FirewallModule: A Firewall resource
  348. type FirewallModule struct {
  349. // Allowed: The allowed ports or port ranges.
  350. Allowed []*AllowedRule `json:"allowed,omitempty"`
  351. // Description: The description of the firewall (optional)
  352. Description string `json:"description,omitempty"`
  353. // Network: The NetworkModule to which this firewall should apply. If
  354. // not specified, or if specified as 'default', this firewall will be
  355. // applied to the 'default' network.
  356. Network string `json:"network,omitempty"`
  357. // SourceRanges: Source IP ranges to apply this firewall to, see the GCE
  358. // Spec for details on syntax
  359. SourceRanges []string `json:"sourceRanges,omitempty"`
  360. // SourceTags: Source Tags to apply this firewall to, see the GCE Spec
  361. // for details on syntax
  362. SourceTags []string `json:"sourceTags,omitempty"`
  363. // TargetTags: Target Tags to apply this firewall to, see the GCE Spec
  364. // for details on syntax
  365. TargetTags []string `json:"targetTags,omitempty"`
  366. // ForceSendFields is a list of field names (e.g. "Allowed") to
  367. // unconditionally include in API requests. By default, fields with
  368. // empty values are omitted from API requests. However, any non-pointer,
  369. // non-interface field appearing in ForceSendFields will be sent to the
  370. // server regardless of whether the field is empty or not. This may be
  371. // used to include empty fields in Patch requests.
  372. ForceSendFields []string `json:"-"`
  373. }
  374. func (s *FirewallModule) MarshalJSON() ([]byte, error) {
  375. type noMethod FirewallModule
  376. raw := noMethod(*s)
  377. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  378. }
  379. type FirewallModuleStatus struct {
  380. // FirewallUrl: [Output Only] The URL of the corresponding Firewall
  381. // resource.
  382. FirewallUrl string `json:"firewallUrl,omitempty"`
  383. // ForceSendFields is a list of field names (e.g. "FirewallUrl") to
  384. // unconditionally include in API requests. By default, fields with
  385. // empty values are omitted from API requests. However, any non-pointer,
  386. // non-interface field appearing in ForceSendFields will be sent to the
  387. // server regardless of whether the field is empty or not. This may be
  388. // used to include empty fields in Patch requests.
  389. ForceSendFields []string `json:"-"`
  390. }
  391. func (s *FirewallModuleStatus) MarshalJSON() ([]byte, error) {
  392. type noMethod FirewallModuleStatus
  393. raw := noMethod(*s)
  394. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  395. }
  396. type HealthCheckModule struct {
  397. CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
  398. Description string `json:"description,omitempty"`
  399. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  400. Host string `json:"host,omitempty"`
  401. Path string `json:"path,omitempty"`
  402. Port int64 `json:"port,omitempty"`
  403. TimeoutSec int64 `json:"timeoutSec,omitempty"`
  404. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  405. // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
  406. // unconditionally include in API requests. By default, fields with
  407. // empty values are omitted from API requests. However, any non-pointer,
  408. // non-interface field appearing in ForceSendFields will be sent to the
  409. // server regardless of whether the field is empty or not. This may be
  410. // used to include empty fields in Patch requests.
  411. ForceSendFields []string `json:"-"`
  412. }
  413. func (s *HealthCheckModule) MarshalJSON() ([]byte, error) {
  414. type noMethod HealthCheckModule
  415. raw := noMethod(*s)
  416. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  417. }
  418. type HealthCheckModuleStatus struct {
  419. // HealthCheckUrl: [Output Only] The HealthCheck URL.
  420. HealthCheckUrl string `json:"healthCheckUrl,omitempty"`
  421. // ForceSendFields is a list of field names (e.g. "HealthCheckUrl") to
  422. // unconditionally include in API requests. By default, fields with
  423. // empty values are omitted from API requests. However, any non-pointer,
  424. // non-interface field appearing in ForceSendFields will be sent to the
  425. // server regardless of whether the field is empty or not. This may be
  426. // used to include empty fields in Patch requests.
  427. ForceSendFields []string `json:"-"`
  428. }
  429. func (s *HealthCheckModuleStatus) MarshalJSON() ([]byte, error) {
  430. type noMethod HealthCheckModuleStatus
  431. raw := noMethod(*s)
  432. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  433. }
  434. type LbModule struct {
  435. Description string `json:"description,omitempty"`
  436. HealthChecks []string `json:"healthChecks,omitempty"`
  437. IpAddress string `json:"ipAddress,omitempty"`
  438. IpProtocol string `json:"ipProtocol,omitempty"`
  439. PortRange string `json:"portRange,omitempty"`
  440. SessionAffinity string `json:"sessionAffinity,omitempty"`
  441. TargetModules []string `json:"targetModules,omitempty"`
  442. // ForceSendFields is a list of field names (e.g. "Description") to
  443. // unconditionally include in API requests. By default, fields with
  444. // empty values are omitted from API requests. However, any non-pointer,
  445. // non-interface field appearing in ForceSendFields will be sent to the
  446. // server regardless of whether the field is empty or not. This may be
  447. // used to include empty fields in Patch requests.
  448. ForceSendFields []string `json:"-"`
  449. }
  450. func (s *LbModule) MarshalJSON() ([]byte, error) {
  451. type noMethod LbModule
  452. raw := noMethod(*s)
  453. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  454. }
  455. type LbModuleStatus struct {
  456. // ForwardingRuleUrl: [Output Only] The URL of the corresponding
  457. // ForwardingRule in GCE.
  458. ForwardingRuleUrl string `json:"forwardingRuleUrl,omitempty"`
  459. // TargetPoolUrl: [Output Only] The URL of the corresponding TargetPool
  460. // resource in GCE.
  461. TargetPoolUrl string `json:"targetPoolUrl,omitempty"`
  462. // ForceSendFields is a list of field names (e.g. "ForwardingRuleUrl")
  463. // to unconditionally include in API requests. By default, fields with
  464. // empty values are omitted from API requests. However, any non-pointer,
  465. // non-interface field appearing in ForceSendFields will be sent to the
  466. // server regardless of whether the field is empty or not. This may be
  467. // used to include empty fields in Patch requests.
  468. ForceSendFields []string `json:"-"`
  469. }
  470. func (s *LbModuleStatus) MarshalJSON() ([]byte, error) {
  471. type noMethod LbModuleStatus
  472. raw := noMethod(*s)
  473. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  474. }
  475. // Metadata: A Compute Engine metadata entry. Identical to the metadata
  476. // on the corresponding Compute Engine resource.
  477. type Metadata struct {
  478. // FingerPrint: The fingerprint of the metadata.
  479. FingerPrint string `json:"fingerPrint,omitempty"`
  480. // Items: A list of metadata items.
  481. Items []*MetadataItem `json:"items,omitempty"`
  482. // ForceSendFields is a list of field names (e.g. "FingerPrint") to
  483. // unconditionally include in API requests. By default, fields with
  484. // empty values are omitted from API requests. However, any non-pointer,
  485. // non-interface field appearing in ForceSendFields will be sent to the
  486. // server regardless of whether the field is empty or not. This may be
  487. // used to include empty fields in Patch requests.
  488. ForceSendFields []string `json:"-"`
  489. }
  490. func (s *Metadata) MarshalJSON() ([]byte, error) {
  491. type noMethod Metadata
  492. raw := noMethod(*s)
  493. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  494. }
  495. // MetadataItem: A Compute Engine metadata item, defined as a key:value
  496. // pair. Identical to the metadata on the corresponding Compute Engine
  497. // resource.
  498. type MetadataItem struct {
  499. // Key: A metadata key.
  500. Key string `json:"key,omitempty"`
  501. // Value: A metadata value.
  502. Value string `json:"value,omitempty"`
  503. // ForceSendFields is a list of field names (e.g. "Key") to
  504. // unconditionally include in API requests. By default, fields with
  505. // empty values are omitted from API requests. However, any non-pointer,
  506. // non-interface field appearing in ForceSendFields will be sent to the
  507. // server regardless of whether the field is empty or not. This may be
  508. // used to include empty fields in Patch requests.
  509. ForceSendFields []string `json:"-"`
  510. }
  511. func (s *MetadataItem) MarshalJSON() ([]byte, error) {
  512. type noMethod MetadataItem
  513. raw := noMethod(*s)
  514. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  515. }
  516. // Module: A module in a configuration. A module represents a single
  517. // homogeneous, possibly replicated task.
  518. type Module struct {
  519. AutoscalingModule *AutoscalingModule `json:"autoscalingModule,omitempty"`
  520. FirewallModule *FirewallModule `json:"firewallModule,omitempty"`
  521. HealthCheckModule *HealthCheckModule `json:"healthCheckModule,omitempty"`
  522. LbModule *LbModule `json:"lbModule,omitempty"`
  523. NetworkModule *NetworkModule `json:"networkModule,omitempty"`
  524. ReplicaPoolModule *ReplicaPoolModule `json:"replicaPoolModule,omitempty"`
  525. // Type: The type of this module. Valid values ("AUTOSCALING",
  526. // "FIREWALL", "HEALTH_CHECK", "LOAD_BALANCING", "NETWORK",
  527. // "REPLICA_POOL")
  528. Type string `json:"type,omitempty"`
  529. // ForceSendFields is a list of field names (e.g. "AutoscalingModule")
  530. // to unconditionally include in API requests. By default, fields with
  531. // empty values are omitted from API requests. However, any non-pointer,
  532. // non-interface field appearing in ForceSendFields will be sent to the
  533. // server regardless of whether the field is empty or not. This may be
  534. // used to include empty fields in Patch requests.
  535. ForceSendFields []string `json:"-"`
  536. }
  537. func (s *Module) MarshalJSON() ([]byte, error) {
  538. type noMethod Module
  539. raw := noMethod(*s)
  540. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  541. }
  542. // ModuleStatus: [Output Only] Aggregate status for a module.
  543. type ModuleStatus struct {
  544. // AutoscalingModuleStatus: [Output Only] The status of the
  545. // AutoscalingModule, set for type AUTOSCALING.
  546. AutoscalingModuleStatus *AutoscalingModuleStatus `json:"autoscalingModuleStatus,omitempty"`
  547. // FirewallModuleStatus: [Output Only] The status of the FirewallModule,
  548. // set for type FIREWALL.
  549. FirewallModuleStatus *FirewallModuleStatus `json:"firewallModuleStatus,omitempty"`
  550. // HealthCheckModuleStatus: [Output Only] The status of the
  551. // HealthCheckModule, set for type HEALTH_CHECK.
  552. HealthCheckModuleStatus *HealthCheckModuleStatus `json:"healthCheckModuleStatus,omitempty"`
  553. // LbModuleStatus: [Output Only] The status of the LbModule, set for
  554. // type LOAD_BALANCING.
  555. LbModuleStatus *LbModuleStatus `json:"lbModuleStatus,omitempty"`
  556. // NetworkModuleStatus: [Output Only] The status of the NetworkModule,
  557. // set for type NETWORK.
  558. NetworkModuleStatus *NetworkModuleStatus `json:"networkModuleStatus,omitempty"`
  559. // ReplicaPoolModuleStatus: [Output Only] The status of the
  560. // ReplicaPoolModule, set for type VM.
  561. ReplicaPoolModuleStatus *ReplicaPoolModuleStatus `json:"replicaPoolModuleStatus,omitempty"`
  562. // State: [Output Only] The current state of the module.
  563. State *DeployState `json:"state,omitempty"`
  564. // Type: [Output Only] The type of the module.
  565. Type string `json:"type,omitempty"`
  566. // ForceSendFields is a list of field names (e.g.
  567. // "AutoscalingModuleStatus") to unconditionally include in API
  568. // requests. By default, fields with empty values are omitted from API
  569. // requests. However, any non-pointer, non-interface field appearing in
  570. // ForceSendFields will be sent to the server regardless of whether the
  571. // field is empty or not. This may be used to include empty fields in
  572. // Patch requests.
  573. ForceSendFields []string `json:"-"`
  574. }
  575. func (s *ModuleStatus) MarshalJSON() ([]byte, error) {
  576. type noMethod ModuleStatus
  577. raw := noMethod(*s)
  578. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  579. }
  580. // NetworkInterface: A Compute Engine NetworkInterface resource.
  581. // Identical to the NetworkInterface on the corresponding Compute Engine
  582. // resource.
  583. type NetworkInterface struct {
  584. // AccessConfigs: An array of configurations for this interface. This
  585. // specifies how this interface is configured to interact with other
  586. // network services
  587. AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"`
  588. // Name: Name of the interface.
  589. Name string `json:"name,omitempty"`
  590. // Network: The name of the NetworkModule to which this interface
  591. // applies. If not specified, or specified as 'default', this will use
  592. // the 'default' network.
  593. Network string `json:"network,omitempty"`
  594. // NetworkIp: An optional IPV4 internal network address to assign to the
  595. // instance for this network interface.
  596. NetworkIp string `json:"networkIp,omitempty"`
  597. // ForceSendFields is a list of field names (e.g. "AccessConfigs") to
  598. // unconditionally include in API requests. By default, fields with
  599. // empty values are omitted from API requests. However, any non-pointer,
  600. // non-interface field appearing in ForceSendFields will be sent to the
  601. // server regardless of whether the field is empty or not. This may be
  602. // used to include empty fields in Patch requests.
  603. ForceSendFields []string `json:"-"`
  604. }
  605. func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
  606. type noMethod NetworkInterface
  607. raw := noMethod(*s)
  608. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  609. }
  610. type NetworkModule struct {
  611. // IPv4Range: Required; The range of internal addresses that are legal
  612. // on this network. This range is a CIDR specification, for example:
  613. // 192.168.0.0/16.
  614. IPv4Range string `json:"IPv4Range,omitempty"`
  615. // Description: The description of the network.
  616. Description string `json:"description,omitempty"`
  617. // GatewayIPv4: An optional address that is used for default routing to
  618. // other networks. This must be within the range specified by IPv4Range,
  619. // and is typicall the first usable address in that range. If not
  620. // specified, the default value is the first usable address in
  621. // IPv4Range.
  622. GatewayIPv4 string `json:"gatewayIPv4,omitempty"`
  623. // ForceSendFields is a list of field names (e.g. "IPv4Range") to
  624. // unconditionally include in API requests. By default, fields with
  625. // empty values are omitted from API requests. However, any non-pointer,
  626. // non-interface field appearing in ForceSendFields will be sent to the
  627. // server regardless of whether the field is empty or not. This may be
  628. // used to include empty fields in Patch requests.
  629. ForceSendFields []string `json:"-"`
  630. }
  631. func (s *NetworkModule) MarshalJSON() ([]byte, error) {
  632. type noMethod NetworkModule
  633. raw := noMethod(*s)
  634. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  635. }
  636. type NetworkModuleStatus struct {
  637. // NetworkUrl: [Output Only] The URL of the corresponding Network
  638. // resource.
  639. NetworkUrl string `json:"networkUrl,omitempty"`
  640. // ForceSendFields is a list of field names (e.g. "NetworkUrl") to
  641. // unconditionally include in API requests. By default, fields with
  642. // empty values are omitted from API requests. However, any non-pointer,
  643. // non-interface field appearing in ForceSendFields will be sent to the
  644. // server regardless of whether the field is empty or not. This may be
  645. // used to include empty fields in Patch requests.
  646. ForceSendFields []string `json:"-"`
  647. }
  648. func (s *NetworkModuleStatus) MarshalJSON() ([]byte, error) {
  649. type noMethod NetworkModuleStatus
  650. raw := noMethod(*s)
  651. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  652. }
  653. // NewDisk: A Persistent Disk resource that will be created and attached
  654. // to each Replica in the Pool. Each Replica will have a unique
  655. // persistent disk that is created and attached to that Replica.
  656. type NewDisk struct {
  657. // Attachment: How the disk will be attached to the Replica.
  658. Attachment *DiskAttachment `json:"attachment,omitempty"`
  659. // AutoDelete: If true, then this disk will be deleted when the instance
  660. // is deleted.
  661. AutoDelete bool `json:"autoDelete,omitempty"`
  662. // Boot: If true, indicates that this is the root persistent disk.
  663. Boot bool `json:"boot,omitempty"`
  664. // InitializeParams: Create the new disk using these parameters. The
  665. // name of the disk will be <instance_name>-<five_random_charactersgt;.
  666. InitializeParams *NewDiskInitializeParams `json:"initializeParams,omitempty"`
  667. // ForceSendFields is a list of field names (e.g. "Attachment") to
  668. // unconditionally include in API requests. By default, fields with
  669. // empty values are omitted from API requests. However, any non-pointer,
  670. // non-interface field appearing in ForceSendFields will be sent to the
  671. // server regardless of whether the field is empty or not. This may be
  672. // used to include empty fields in Patch requests.
  673. ForceSendFields []string `json:"-"`
  674. }
  675. func (s *NewDisk) MarshalJSON() ([]byte, error) {
  676. type noMethod NewDisk
  677. raw := noMethod(*s)
  678. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  679. }
  680. // NewDiskInitializeParams: Initialization parameters for creating a new
  681. // disk.
  682. type NewDiskInitializeParams struct {
  683. // DiskSizeGb: The size of the created disk in gigabytes.
  684. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
  685. // DiskType: Name of the disk type resource describing which disk type
  686. // to use to create the disk. For example 'pd-ssd' or 'pd-standard'.
  687. // Default is 'pd-standard'
  688. DiskType string `json:"diskType,omitempty"`
  689. // SourceImage: The fully-qualified URL of a source image to use to
  690. // create this disk.
  691. SourceImage string `json:"sourceImage,omitempty"`
  692. // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
  693. // unconditionally include in API requests. By default, fields with
  694. // empty values are omitted from API requests. However, any non-pointer,
  695. // non-interface field appearing in ForceSendFields will be sent to the
  696. // server regardless of whether the field is empty or not. This may be
  697. // used to include empty fields in Patch requests.
  698. ForceSendFields []string `json:"-"`
  699. }
  700. func (s *NewDiskInitializeParams) MarshalJSON() ([]byte, error) {
  701. type noMethod NewDiskInitializeParams
  702. raw := noMethod(*s)
  703. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  704. }
  705. // ParamOverride: A specification for overriding parameters in a
  706. // Template that corresponds to the Deployment.
  707. type ParamOverride struct {
  708. // Path: A JSON Path expression that specifies which parameter should be
  709. // overridden.
  710. Path string `json:"path,omitempty"`
  711. // Value: The new value to assign to the overridden parameter.
  712. Value string `json:"value,omitempty"`
  713. // ForceSendFields is a list of field names (e.g. "Path") to
  714. // unconditionally include in API requests. By default, fields with
  715. // empty values are omitted from API requests. However, any non-pointer,
  716. // non-interface field appearing in ForceSendFields will be sent to the
  717. // server regardless of whether the field is empty or not. This may be
  718. // used to include empty fields in Patch requests.
  719. ForceSendFields []string `json:"-"`
  720. }
  721. func (s *ParamOverride) MarshalJSON() ([]byte, error) {
  722. type noMethod ParamOverride
  723. raw := noMethod(*s)
  724. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  725. }
  726. type ReplicaPoolModule struct {
  727. // EnvVariables: A list of environment variables.
  728. EnvVariables map[string]EnvVariable `json:"envVariables,omitempty"`
  729. // HealthChecks: The Health Checks to configure for the
  730. // ReplicaPoolModule
  731. HealthChecks []string `json:"healthChecks,omitempty"`
  732. // NumReplicas: Number of replicas in this module.
  733. NumReplicas int64 `json:"numReplicas,omitempty"`
  734. // ReplicaPoolParams: Information for a ReplicaPoolModule.
  735. ReplicaPoolParams *ReplicaPoolParams `json:"replicaPoolParams,omitempty"`
  736. // ResourceView: [Output Only] The name of the Resource View associated
  737. // with a ReplicaPoolModule. This field will be generated by the
  738. // service.
  739. ResourceView string `json:"resourceView,omitempty"`
  740. // ForceSendFields is a list of field names (e.g. "EnvVariables") to
  741. // unconditionally include in API requests. By default, fields with
  742. // empty values are omitted from API requests. However, any non-pointer,
  743. // non-interface field appearing in ForceSendFields will be sent to the
  744. // server regardless of whether the field is empty or not. This may be
  745. // used to include empty fields in Patch requests.
  746. ForceSendFields []string `json:"-"`
  747. }
  748. func (s *ReplicaPoolModule) MarshalJSON() ([]byte, error) {
  749. type noMethod ReplicaPoolModule
  750. raw := noMethod(*s)
  751. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  752. }
  753. type ReplicaPoolModuleStatus struct {
  754. // ReplicaPoolUrl: [Output Only] The URL of the associated ReplicaPool
  755. // resource.
  756. ReplicaPoolUrl string `json:"replicaPoolUrl,omitempty"`
  757. // ResourceViewUrl: [Output Only] The URL of the Resource Group
  758. // associated with this ReplicaPool.
  759. ResourceViewUrl string `json:"resourceViewUrl,omitempty"`
  760. // ForceSendFields is a list of field names (e.g. "ReplicaPoolUrl") to
  761. // unconditionally include in API requests. By default, fields with
  762. // empty values are omitted from API requests. However, any non-pointer,
  763. // non-interface field appearing in ForceSendFields will be sent to the
  764. // server regardless of whether the field is empty or not. This may be
  765. // used to include empty fields in Patch requests.
  766. ForceSendFields []string `json:"-"`
  767. }
  768. func (s *ReplicaPoolModuleStatus) MarshalJSON() ([]byte, error) {
  769. type noMethod ReplicaPoolModuleStatus
  770. raw := noMethod(*s)
  771. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  772. }
  773. // ReplicaPoolParams: Configuration information for a ReplicaPools
  774. // resource. Specifying an item within will determine the ReplicaPools
  775. // API version used for a ReplicaPoolModule. Only one may be specified.
  776. type ReplicaPoolParams struct {
  777. // V1beta1: ReplicaPoolParams specifications for use with ReplicaPools
  778. // v1beta1.
  779. V1beta1 *ReplicaPoolParamsV1Beta1 `json:"v1beta1,omitempty"`
  780. // ForceSendFields is a list of field names (e.g. "V1beta1") to
  781. // unconditionally include in API requests. By default, fields with
  782. // empty values are omitted from API requests. However, any non-pointer,
  783. // non-interface field appearing in ForceSendFields will be sent to the
  784. // server regardless of whether the field is empty or not. This may be
  785. // used to include empty fields in Patch requests.
  786. ForceSendFields []string `json:"-"`
  787. }
  788. func (s *ReplicaPoolParams) MarshalJSON() ([]byte, error) {
  789. type noMethod ReplicaPoolParams
  790. raw := noMethod(*s)
  791. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  792. }
  793. // ReplicaPoolParamsV1Beta1: Configuration information for a
  794. // ReplicaPools v1beta1 API resource. Directly maps to ReplicaPool
  795. // InitTemplate.
  796. type ReplicaPoolParamsV1Beta1 struct {
  797. // AutoRestart: Whether these replicas should be restarted if they
  798. // experience a failure. The default value is true.
  799. AutoRestart bool `json:"autoRestart,omitempty"`
  800. // BaseInstanceName: The base name for instances within this
  801. // ReplicaPool.
  802. BaseInstanceName string `json:"baseInstanceName,omitempty"`
  803. // CanIpForward: Enables IP Forwarding
  804. CanIpForward bool `json:"canIpForward,omitempty"`
  805. // Description: An optional textual description of the resource.
  806. Description string `json:"description,omitempty"`
  807. // DisksToAttach: A list of existing Persistent Disk resources to attach
  808. // to each replica in the pool. Each disk will be attached in read-only
  809. // mode to every replica.
  810. DisksToAttach []*ExistingDisk `json:"disksToAttach,omitempty"`
  811. // DisksToCreate: A list of Disk resources to create and attach to each
  812. // Replica in the Pool. Currently, you can only define one disk and it
  813. // must be a root persistent disk. Note that Replica Pool will create a
  814. // root persistent disk for each replica.
  815. DisksToCreate []*NewDisk `json:"disksToCreate,omitempty"`
  816. // InitAction: Name of the Action to be run during initialization of a
  817. // ReplicaPoolModule.
  818. InitAction string `json:"initAction,omitempty"`
  819. // MachineType: The machine type for this instance. Either a complete
  820. // URL, or the resource name (e.g. n1-standard-1).
  821. MachineType string `json:"machineType,omitempty"`
  822. // Metadata: The metadata key/value pairs assigned to this instance.
  823. Metadata *Metadata `json:"metadata,omitempty"`
  824. // NetworkInterfaces: A list of network interfaces for the instance.
  825. // Currently only one interface is supported by Google Compute Engine.
  826. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
  827. OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
  828. // ServiceAccounts: A list of Service Accounts to enable for this
  829. // instance.
  830. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
  831. // Tags: A list of tags to apply to the Google Compute Engine instance
  832. // to identify resources.
  833. Tags *Tag `json:"tags,omitempty"`
  834. // Zone: The zone for this ReplicaPool.
  835. Zone string `json:"zone,omitempty"`
  836. // ForceSendFields is a list of field names (e.g. "AutoRestart") to
  837. // unconditionally include in API requests. By default, fields with
  838. // empty values are omitted from API requests. However, any non-pointer,
  839. // non-interface field appearing in ForceSendFields will be sent to the
  840. // server regardless of whether the field is empty or not. This may be
  841. // used to include empty fields in Patch requests.
  842. ForceSendFields []string `json:"-"`
  843. }
  844. func (s *ReplicaPoolParamsV1Beta1) MarshalJSON() ([]byte, error) {
  845. type noMethod ReplicaPoolParamsV1Beta1
  846. raw := noMethod(*s)
  847. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  848. }
  849. // ServiceAccount: A Compute Engine service account, identical to the
  850. // Compute Engine resource.
  851. type ServiceAccount struct {
  852. // Email: Service account email address.
  853. Email string `json:"email,omitempty"`
  854. // Scopes: List of OAuth2 scopes to obtain for the service account.
  855. Scopes []string `json:"scopes,omitempty"`
  856. // ForceSendFields is a list of field names (e.g. "Email") to
  857. // unconditionally include in API requests. By default, fields with
  858. // empty values are omitted from API requests. However, any non-pointer,
  859. // non-interface field appearing in ForceSendFields will be sent to the
  860. // server regardless of whether the field is empty or not. This may be
  861. // used to include empty fields in Patch requests.
  862. ForceSendFields []string `json:"-"`
  863. }
  864. func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  865. type noMethod ServiceAccount
  866. raw := noMethod(*s)
  867. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  868. }
  869. // Tag: A Compute Engine Instance tag, identical to the tags on the
  870. // corresponding Compute Engine Instance resource.
  871. type Tag struct {
  872. // FingerPrint: The fingerprint of the tag.
  873. FingerPrint string `json:"fingerPrint,omitempty"`
  874. // Items: Items contained in this tag.
  875. Items []string `json:"items,omitempty"`
  876. // ForceSendFields is a list of field names (e.g. "FingerPrint") to
  877. // unconditionally include in API requests. By default, fields with
  878. // empty values are omitted from API requests. However, any non-pointer,
  879. // non-interface field appearing in ForceSendFields will be sent to the
  880. // server regardless of whether the field is empty or not. This may be
  881. // used to include empty fields in Patch requests.
  882. ForceSendFields []string `json:"-"`
  883. }
  884. func (s *Tag) MarshalJSON() ([]byte, error) {
  885. type noMethod Tag
  886. raw := noMethod(*s)
  887. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  888. }
  889. // Template: A Template represents a complete configuration for a
  890. // Deployment.
  891. type Template struct {
  892. // Actions: Action definitions for use in Module intents in this
  893. // Template.
  894. Actions map[string]Action `json:"actions,omitempty"`
  895. // Description: A user-supplied description of this Template.
  896. Description string `json:"description,omitempty"`
  897. // Modules: A list of modules for this Template.
  898. Modules map[string]Module `json:"modules,omitempty"`
  899. // Name: Name of this Template. The name must conform to the expression:
  900. // [a-zA-Z0-9-_]{1,64}
  901. Name string `json:"name,omitempty"`
  902. // ServerResponse contains the HTTP response code and headers from the
  903. // server.
  904. googleapi.ServerResponse `json:"-"`
  905. // ForceSendFields is a list of field names (e.g. "Actions") to
  906. // unconditionally include in API requests. By default, fields with
  907. // empty values are omitted from API requests. However, any non-pointer,
  908. // non-interface field appearing in ForceSendFields will be sent to the
  909. // server regardless of whether the field is empty or not. This may be
  910. // used to include empty fields in Patch requests.
  911. ForceSendFields []string `json:"-"`
  912. }
  913. func (s *Template) MarshalJSON() ([]byte, error) {
  914. type noMethod Template
  915. raw := noMethod(*s)
  916. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  917. }
  918. type TemplatesListResponse struct {
  919. NextPageToken string `json:"nextPageToken,omitempty"`
  920. Resources []*Template `json:"resources,omitempty"`
  921. // ServerResponse contains the HTTP response code and headers from the
  922. // server.
  923. googleapi.ServerResponse `json:"-"`
  924. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  925. // unconditionally include in API requests. By default, fields with
  926. // empty values are omitted from API requests. However, any non-pointer,
  927. // non-interface field appearing in ForceSendFields will be sent to the
  928. // server regardless of whether the field is empty or not. This may be
  929. // used to include empty fields in Patch requests.
  930. ForceSendFields []string `json:"-"`
  931. }
  932. func (s *TemplatesListResponse) MarshalJSON() ([]byte, error) {
  933. type noMethod TemplatesListResponse
  934. raw := noMethod(*s)
  935. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  936. }
  937. // method id "manager.deployments.delete":
  938. type DeploymentsDeleteCall struct {
  939. s *Service
  940. projectId string
  941. region string
  942. deploymentName string
  943. urlParams_ gensupport.URLParams
  944. ctx_ context.Context
  945. }
  946. // Delete:
  947. func (r *DeploymentsService) Delete(projectId string, region string, deploymentName string) *DeploymentsDeleteCall {
  948. c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  949. c.projectId = projectId
  950. c.region = region
  951. c.deploymentName = deploymentName
  952. return c
  953. }
  954. // Fields allows partial responses to be retrieved. See
  955. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  956. // for more information.
  957. func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall {
  958. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  959. return c
  960. }
  961. // Context sets the context to be used in this call's Do method. Any
  962. // pending HTTP request will be aborted if the provided context is
  963. // canceled.
  964. func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
  965. c.ctx_ = ctx
  966. return c
  967. }
  968. func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  969. var body io.Reader = nil
  970. c.urlParams_.Set("alt", alt)
  971. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/regions/{region}/deployments/{deploymentName}")
  972. urls += "?" + c.urlParams_.Encode()
  973. req, _ := http.NewRequest("DELETE", urls, body)
  974. googleapi.Expand(req.URL, map[string]string{
  975. "projectId": c.projectId,
  976. "region": c.region,
  977. "deploymentName": c.deploymentName,
  978. })
  979. req.Header.Set("User-Agent", c.s.userAgent())
  980. if c.ctx_ != nil {
  981. return ctxhttp.Do(c.ctx_, c.s.client, req)
  982. }
  983. return c.s.client.Do(req)
  984. }
  985. // Do executes the "manager.deployments.delete" call.
  986. func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) error {
  987. gensupport.SetOptions(c.urlParams_, opts...)
  988. res, err := c.doRequest("json")
  989. if err != nil {
  990. return err
  991. }
  992. defer googleapi.CloseBody(res)
  993. if err := googleapi.CheckResponse(res); err != nil {
  994. return err
  995. }
  996. return nil
  997. // {
  998. // "description": "",
  999. // "httpMethod": "DELETE",
  1000. // "id": "manager.deployments.delete",
  1001. // "parameterOrder": [
  1002. // "projectId",
  1003. // "region",
  1004. // "deploymentName"
  1005. // ],
  1006. // "parameters": {
  1007. // "deploymentName": {
  1008. // "location": "path",
  1009. // "required": true,
  1010. // "type": "string"
  1011. // },
  1012. // "projectId": {
  1013. // "location": "path",
  1014. // "required": true,
  1015. // "type": "string"
  1016. // },
  1017. // "region": {
  1018. // "location": "path",
  1019. // "required": true,
  1020. // "type": "string"
  1021. // }
  1022. // },
  1023. // "path": "{projectId}/regions/{region}/deployments/{deploymentName}",
  1024. // "scopes": [
  1025. // "https://www.googleapis.com/auth/cloud-platform",
  1026. // "https://www.googleapis.com/auth/ndev.cloudman"
  1027. // ]
  1028. // }
  1029. }
  1030. // method id "manager.deployments.get":
  1031. type DeploymentsGetCall struct {
  1032. s *Service
  1033. projectId string
  1034. region string
  1035. deploymentName string
  1036. urlParams_ gensupport.URLParams
  1037. ifNoneMatch_ string
  1038. ctx_ context.Context
  1039. }
  1040. // Get:
  1041. func (r *DeploymentsService) Get(projectId string, region string, deploymentName string) *DeploymentsGetCall {
  1042. c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1043. c.projectId = projectId
  1044. c.region = region
  1045. c.deploymentName = deploymentName
  1046. return c
  1047. }
  1048. // Fields allows partial responses to be retrieved. See
  1049. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1050. // for more information.
  1051. func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall {
  1052. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1053. return c
  1054. }
  1055. // IfNoneMatch sets the optional parameter which makes the operation
  1056. // fail if the object's ETag matches the given value. This is useful for
  1057. // getting updates only after the object has changed since the last
  1058. // request. Use googleapi.IsNotModified to check whether the response
  1059. // error from Do is the result of In-None-Match.
  1060. func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall {
  1061. c.ifNoneMatch_ = entityTag
  1062. return c
  1063. }
  1064. // Context sets the context to be used in this call's Do method. Any
  1065. // pending HTTP request will be aborted if the provided context is
  1066. // canceled.
  1067. func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
  1068. c.ctx_ = ctx
  1069. return c
  1070. }
  1071. func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  1072. var body io.Reader = nil
  1073. c.urlParams_.Set("alt", alt)
  1074. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/regions/{region}/deployments/{deploymentName}")
  1075. urls += "?" + c.urlParams_.Encode()
  1076. req, _ := http.NewRequest("GET", urls, body)
  1077. googleapi.Expand(req.URL, map[string]string{
  1078. "projectId": c.projectId,
  1079. "region": c.region,
  1080. "deploymentName": c.deploymentName,
  1081. })
  1082. req.Header.Set("User-Agent", c.s.userAgent())
  1083. if c.ifNoneMatch_ != "" {
  1084. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1085. }
  1086. if c.ctx_ != nil {
  1087. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1088. }
  1089. return c.s.client.Do(req)
  1090. }
  1091. // Do executes the "manager.deployments.get" call.
  1092. // Exactly one of *Deployment or error will be non-nil. Any non-2xx
  1093. // status code is an error. Response headers are in either
  1094. // *Deployment.ServerResponse.Header or (if a response was returned at
  1095. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1096. // to check whether the returned error was because
  1097. // http.StatusNotModified was returned.
  1098. func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
  1099. gensupport.SetOptions(c.urlParams_, opts...)
  1100. res, err := c.doRequest("json")
  1101. if res != nil && res.StatusCode == http.StatusNotModified {
  1102. if res.Body != nil {
  1103. res.Body.Close()
  1104. }
  1105. return nil, &googleapi.Error{
  1106. Code: res.StatusCode,
  1107. Header: res.Header,
  1108. }
  1109. }
  1110. if err != nil {
  1111. return nil, err
  1112. }
  1113. defer googleapi.CloseBody(res)
  1114. if err := googleapi.CheckResponse(res); err != nil {
  1115. return nil, err
  1116. }
  1117. ret := &Deployment{
  1118. ServerResponse: googleapi.ServerResponse{
  1119. Header: res.Header,
  1120. HTTPStatusCode: res.StatusCode,
  1121. },
  1122. }
  1123. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1124. return nil, err
  1125. }
  1126. return ret, nil
  1127. // {
  1128. // "description": "",
  1129. // "httpMethod": "GET",
  1130. // "id": "manager.deployments.get",
  1131. // "parameterOrder": [
  1132. // "projectId",
  1133. // "region",
  1134. // "deploymentName"
  1135. // ],
  1136. // "parameters": {
  1137. // "deploymentName": {
  1138. // "location": "path",
  1139. // "required": true,
  1140. // "type": "string"
  1141. // },
  1142. // "projectId": {
  1143. // "location": "path",
  1144. // "required": true,
  1145. // "type": "string"
  1146. // },
  1147. // "region": {
  1148. // "location": "path",
  1149. // "required": true,
  1150. // "type": "string"
  1151. // }
  1152. // },
  1153. // "path": "{projectId}/regions/{region}/deployments/{deploymentName}",
  1154. // "response": {
  1155. // "$ref": "Deployment"
  1156. // },
  1157. // "scopes": [
  1158. // "https://www.googleapis.com/auth/cloud-platform",
  1159. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  1160. // "https://www.googleapis.com/auth/ndev.cloudman",
  1161. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  1162. // ]
  1163. // }
  1164. }
  1165. // method id "manager.deployments.insert":
  1166. type DeploymentsInsertCall struct {
  1167. s *Service
  1168. projectId string
  1169. region string
  1170. deployment *Deployment
  1171. urlParams_ gensupport.URLParams
  1172. ctx_ context.Context
  1173. }
  1174. // Insert:
  1175. func (r *DeploymentsService) Insert(projectId string, region string, deployment *Deployment) *DeploymentsInsertCall {
  1176. c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1177. c.projectId = projectId
  1178. c.region = region
  1179. c.deployment = deployment
  1180. return c
  1181. }
  1182. // Fields allows partial responses to be retrieved. See
  1183. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1184. // for more information.
  1185. func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall {
  1186. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1187. return c
  1188. }
  1189. // Context sets the context to be used in this call's Do method. Any
  1190. // pending HTTP request will be aborted if the provided context is
  1191. // canceled.
  1192. func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
  1193. c.ctx_ = ctx
  1194. return c
  1195. }
  1196. func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
  1197. var body io.Reader = nil
  1198. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
  1199. if err != nil {
  1200. return nil, err
  1201. }
  1202. ctype := "application/json"
  1203. c.urlParams_.Set("alt", alt)
  1204. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/regions/{region}/deployments")
  1205. urls += "?" + c.urlParams_.Encode()
  1206. req, _ := http.NewRequest("POST", urls, body)
  1207. googleapi.Expand(req.URL, map[string]string{
  1208. "projectId": c.projectId,
  1209. "region": c.region,
  1210. })
  1211. req.Header.Set("Content-Type", ctype)
  1212. req.Header.Set("User-Agent", c.s.userAgent())
  1213. if c.ctx_ != nil {
  1214. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1215. }
  1216. return c.s.client.Do(req)
  1217. }
  1218. // Do executes the "manager.deployments.insert" call.
  1219. // Exactly one of *Deployment or error will be non-nil. Any non-2xx
  1220. // status code is an error. Response headers are in either
  1221. // *Deployment.ServerResponse.Header or (if a response was returned at
  1222. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1223. // to check whether the returned error was because
  1224. // http.StatusNotModified was returned.
  1225. func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
  1226. gensupport.SetOptions(c.urlParams_, opts...)
  1227. res, err := c.doRequest("json")
  1228. if res != nil && res.StatusCode == http.StatusNotModified {
  1229. if res.Body != nil {
  1230. res.Body.Close()
  1231. }
  1232. return nil, &googleapi.Error{
  1233. Code: res.StatusCode,
  1234. Header: res.Header,
  1235. }
  1236. }
  1237. if err != nil {
  1238. return nil, err
  1239. }
  1240. defer googleapi.CloseBody(res)
  1241. if err := googleapi.CheckResponse(res); err != nil {
  1242. return nil, err
  1243. }
  1244. ret := &Deployment{
  1245. ServerResponse: googleapi.ServerResponse{
  1246. Header: res.Header,
  1247. HTTPStatusCode: res.StatusCode,
  1248. },
  1249. }
  1250. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1251. return nil, err
  1252. }
  1253. return ret, nil
  1254. // {
  1255. // "description": "",
  1256. // "httpMethod": "POST",
  1257. // "id": "manager.deployments.insert",
  1258. // "parameterOrder": [
  1259. // "projectId",
  1260. // "region"
  1261. // ],
  1262. // "parameters": {
  1263. // "projectId": {
  1264. // "location": "path",
  1265. // "required": true,
  1266. // "type": "string"
  1267. // },
  1268. // "region": {
  1269. // "location": "path",
  1270. // "required": true,
  1271. // "type": "string"
  1272. // }
  1273. // },
  1274. // "path": "{projectId}/regions/{region}/deployments",
  1275. // "request": {
  1276. // "$ref": "Deployment"
  1277. // },
  1278. // "response": {
  1279. // "$ref": "Deployment"
  1280. // },
  1281. // "scopes": [
  1282. // "https://www.googleapis.com/auth/appengine.admin",
  1283. // "https://www.googleapis.com/auth/cloud-platform",
  1284. // "https://www.googleapis.com/auth/compute",
  1285. // "https://www.googleapis.com/auth/devstorage.read_write",
  1286. // "https://www.googleapis.com/auth/ndev.cloudman"
  1287. // ]
  1288. // }
  1289. }
  1290. // method id "manager.deployments.list":
  1291. type DeploymentsListCall struct {
  1292. s *Service
  1293. projectId string
  1294. region string
  1295. urlParams_ gensupport.URLParams
  1296. ifNoneMatch_ string
  1297. ctx_ context.Context
  1298. }
  1299. // List:
  1300. func (r *DeploymentsService) List(projectId string, region string) *DeploymentsListCall {
  1301. c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1302. c.projectId = projectId
  1303. c.region = region
  1304. return c
  1305. }
  1306. // MaxResults sets the optional parameter "maxResults": Maximum count of
  1307. // results to be returned. Acceptable values are 0 to 100, inclusive.
  1308. // (Default: 50)
  1309. func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall {
  1310. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  1311. return c
  1312. }
  1313. // PageToken sets the optional parameter "pageToken": Specifies a
  1314. // nextPageToken returned by a previous list request. This token can be
  1315. // used to request the next page of results from a previous list
  1316. // request.
  1317. func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall {
  1318. c.urlParams_.Set("pageToken", pageToken)
  1319. return c
  1320. }
  1321. // Fields allows partial responses to be retrieved. See
  1322. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1323. // for more information.
  1324. func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall {
  1325. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1326. return c
  1327. }
  1328. // IfNoneMatch sets the optional parameter which makes the operation
  1329. // fail if the object's ETag matches the given value. This is useful for
  1330. // getting updates only after the object has changed since the last
  1331. // request. Use googleapi.IsNotModified to check whether the response
  1332. // error from Do is the result of In-None-Match.
  1333. func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall {
  1334. c.ifNoneMatch_ = entityTag
  1335. return c
  1336. }
  1337. // Context sets the context to be used in this call's Do method. Any
  1338. // pending HTTP request will be aborted if the provided context is
  1339. // canceled.
  1340. func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
  1341. c.ctx_ = ctx
  1342. return c
  1343. }
  1344. func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  1345. var body io.Reader = nil
  1346. c.urlParams_.Set("alt", alt)
  1347. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/regions/{region}/deployments")
  1348. urls += "?" + c.urlParams_.Encode()
  1349. req, _ := http.NewRequest("GET", urls, body)
  1350. googleapi.Expand(req.URL, map[string]string{
  1351. "projectId": c.projectId,
  1352. "region": c.region,
  1353. })
  1354. req.Header.Set("User-Agent", c.s.userAgent())
  1355. if c.ifNoneMatch_ != "" {
  1356. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1357. }
  1358. if c.ctx_ != nil {
  1359. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1360. }
  1361. return c.s.client.Do(req)
  1362. }
  1363. // Do executes the "manager.deployments.list" call.
  1364. // Exactly one of *DeploymentsListResponse or error will be non-nil. Any
  1365. // non-2xx status code is an error. Response headers are in either
  1366. // *DeploymentsListResponse.ServerResponse.Header or (if a response was
  1367. // returned at all) in error.(*googleapi.Error).Header. Use
  1368. // googleapi.IsNotModified to check whether the returned error was
  1369. // because http.StatusNotModified was returned.
  1370. func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) {
  1371. gensupport.SetOptions(c.urlParams_, opts...)
  1372. res, err := c.doRequest("json")
  1373. if res != nil && res.StatusCode == http.StatusNotModified {
  1374. if res.Body != nil {
  1375. res.Body.Close()
  1376. }
  1377. return nil, &googleapi.Error{
  1378. Code: res.StatusCode,
  1379. Header: res.Header,
  1380. }
  1381. }
  1382. if err != nil {
  1383. return nil, err
  1384. }
  1385. defer googleapi.CloseBody(res)
  1386. if err := googleapi.CheckResponse(res); err != nil {
  1387. return nil, err
  1388. }
  1389. ret := &DeploymentsListResponse{
  1390. ServerResponse: googleapi.ServerResponse{
  1391. Header: res.Header,
  1392. HTTPStatusCode: res.StatusCode,
  1393. },
  1394. }
  1395. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1396. return nil, err
  1397. }
  1398. return ret, nil
  1399. // {
  1400. // "description": "",
  1401. // "httpMethod": "GET",
  1402. // "id": "manager.deployments.list",
  1403. // "parameterOrder": [
  1404. // "projectId",
  1405. // "region"
  1406. // ],
  1407. // "parameters": {
  1408. // "maxResults": {
  1409. // "default": "50",
  1410. // "description": "Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50)",
  1411. // "format": "int32",
  1412. // "location": "query",
  1413. // "maximum": "100",
  1414. // "minimum": "0",
  1415. // "type": "integer"
  1416. // },
  1417. // "pageToken": {
  1418. // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.",
  1419. // "location": "query",
  1420. // "type": "string"
  1421. // },
  1422. // "projectId": {
  1423. // "location": "path",
  1424. // "required": true,
  1425. // "type": "string"
  1426. // },
  1427. // "region": {
  1428. // "location": "path",
  1429. // "required": true,
  1430. // "type": "string"
  1431. // }
  1432. // },
  1433. // "path": "{projectId}/regions/{region}/deployments",
  1434. // "response": {
  1435. // "$ref": "DeploymentsListResponse"
  1436. // },
  1437. // "scopes": [
  1438. // "https://www.googleapis.com/auth/cloud-platform",
  1439. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  1440. // "https://www.googleapis.com/auth/ndev.cloudman",
  1441. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  1442. // ]
  1443. // }
  1444. }
  1445. // Pages invokes f for each page of results.
  1446. // A non-nil error returned from f will halt the iteration.
  1447. // The provided context supersedes any context provided to the Context method.
  1448. func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error {
  1449. c.ctx_ = ctx
  1450. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1451. for {
  1452. x, err := c.Do()
  1453. if err != nil {
  1454. return err
  1455. }
  1456. if err := f(x); err != nil {
  1457. return err
  1458. }
  1459. if x.NextPageToken == "" {
  1460. return nil
  1461. }
  1462. c.PageToken(x.NextPageToken)
  1463. }
  1464. }
  1465. // method id "manager.templates.delete":
  1466. type TemplatesDeleteCall struct {
  1467. s *Service
  1468. projectId string
  1469. templateName string
  1470. urlParams_ gensupport.URLParams
  1471. ctx_ context.Context
  1472. }
  1473. // Delete:
  1474. func (r *TemplatesService) Delete(projectId string, templateName string) *TemplatesDeleteCall {
  1475. c := &TemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1476. c.projectId = projectId
  1477. c.templateName = templateName
  1478. return c
  1479. }
  1480. // Fields allows partial responses to be retrieved. See
  1481. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1482. // for more information.
  1483. func (c *TemplatesDeleteCall) Fields(s ...googleapi.Field) *TemplatesDeleteCall {
  1484. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1485. return c
  1486. }
  1487. // Context sets the context to be used in this call's Do method. Any
  1488. // pending HTTP request will be aborted if the provided context is
  1489. // canceled.
  1490. func (c *TemplatesDeleteCall) Context(ctx context.Context) *TemplatesDeleteCall {
  1491. c.ctx_ = ctx
  1492. return c
  1493. }
  1494. func (c *TemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1495. var body io.Reader = nil
  1496. c.urlParams_.Set("alt", alt)
  1497. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/templates/{templateName}")
  1498. urls += "?" + c.urlParams_.Encode()
  1499. req, _ := http.NewRequest("DELETE", urls, body)
  1500. googleapi.Expand(req.URL, map[string]string{
  1501. "projectId": c.projectId,
  1502. "templateName": c.templateName,
  1503. })
  1504. req.Header.Set("User-Agent", c.s.userAgent())
  1505. if c.ctx_ != nil {
  1506. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1507. }
  1508. return c.s.client.Do(req)
  1509. }
  1510. // Do executes the "manager.templates.delete" call.
  1511. func (c *TemplatesDeleteCall) Do(opts ...googleapi.CallOption) error {
  1512. gensupport.SetOptions(c.urlParams_, opts...)
  1513. res, err := c.doRequest("json")
  1514. if err != nil {
  1515. return err
  1516. }
  1517. defer googleapi.CloseBody(res)
  1518. if err := googleapi.CheckResponse(res); err != nil {
  1519. return err
  1520. }
  1521. return nil
  1522. // {
  1523. // "description": "",
  1524. // "httpMethod": "DELETE",
  1525. // "id": "manager.templates.delete",
  1526. // "parameterOrder": [
  1527. // "projectId",
  1528. // "templateName"
  1529. // ],
  1530. // "parameters": {
  1531. // "projectId": {
  1532. // "location": "path",
  1533. // "required": true,
  1534. // "type": "string"
  1535. // },
  1536. // "templateName": {
  1537. // "location": "path",
  1538. // "required": true,
  1539. // "type": "string"
  1540. // }
  1541. // },
  1542. // "path": "{projectId}/templates/{templateName}",
  1543. // "scopes": [
  1544. // "https://www.googleapis.com/auth/cloud-platform",
  1545. // "https://www.googleapis.com/auth/ndev.cloudman"
  1546. // ]
  1547. // }
  1548. }
  1549. // method id "manager.templates.get":
  1550. type TemplatesGetCall struct {
  1551. s *Service
  1552. projectId string
  1553. templateName string
  1554. urlParams_ gensupport.URLParams
  1555. ifNoneMatch_ string
  1556. ctx_ context.Context
  1557. }
  1558. // Get:
  1559. func (r *TemplatesService) Get(projectId string, templateName string) *TemplatesGetCall {
  1560. c := &TemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1561. c.projectId = projectId
  1562. c.templateName = templateName
  1563. return c
  1564. }
  1565. // Fields allows partial responses to be retrieved. See
  1566. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1567. // for more information.
  1568. func (c *TemplatesGetCall) Fields(s ...googleapi.Field) *TemplatesGetCall {
  1569. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1570. return c
  1571. }
  1572. // IfNoneMatch sets the optional parameter which makes the operation
  1573. // fail if the object's ETag matches the given value. This is useful for
  1574. // getting updates only after the object has changed since the last
  1575. // request. Use googleapi.IsNotModified to check whether the response
  1576. // error from Do is the result of In-None-Match.
  1577. func (c *TemplatesGetCall) IfNoneMatch(entityTag string) *TemplatesGetCall {
  1578. c.ifNoneMatch_ = entityTag
  1579. return c
  1580. }
  1581. // Context sets the context to be used in this call's Do method. Any
  1582. // pending HTTP request will be aborted if the provided context is
  1583. // canceled.
  1584. func (c *TemplatesGetCall) Context(ctx context.Context) *TemplatesGetCall {
  1585. c.ctx_ = ctx
  1586. return c
  1587. }
  1588. func (c *TemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  1589. var body io.Reader = nil
  1590. c.urlParams_.Set("alt", alt)
  1591. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/templates/{templateName}")
  1592. urls += "?" + c.urlParams_.Encode()
  1593. req, _ := http.NewRequest("GET", urls, body)
  1594. googleapi.Expand(req.URL, map[string]string{
  1595. "projectId": c.projectId,
  1596. "templateName": c.templateName,
  1597. })
  1598. req.Header.Set("User-Agent", c.s.userAgent())
  1599. if c.ifNoneMatch_ != "" {
  1600. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1601. }
  1602. if c.ctx_ != nil {
  1603. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1604. }
  1605. return c.s.client.Do(req)
  1606. }
  1607. // Do executes the "manager.templates.get" call.
  1608. // Exactly one of *Template or error will be non-nil. Any non-2xx status
  1609. // code is an error. Response headers are in either
  1610. // *Template.ServerResponse.Header or (if a response was returned at
  1611. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1612. // to check whether the returned error was because
  1613. // http.StatusNotModified was returned.
  1614. func (c *TemplatesGetCall) Do(opts ...googleapi.CallOption) (*Template, error) {
  1615. gensupport.SetOptions(c.urlParams_, opts...)
  1616. res, err := c.doRequest("json")
  1617. if res != nil && res.StatusCode == http.StatusNotModified {
  1618. if res.Body != nil {
  1619. res.Body.Close()
  1620. }
  1621. return nil, &googleapi.Error{
  1622. Code: res.StatusCode,
  1623. Header: res.Header,
  1624. }
  1625. }
  1626. if err != nil {
  1627. return nil, err
  1628. }
  1629. defer googleapi.CloseBody(res)
  1630. if err := googleapi.CheckResponse(res); err != nil {
  1631. return nil, err
  1632. }
  1633. ret := &Template{
  1634. ServerResponse: googleapi.ServerResponse{
  1635. Header: res.Header,
  1636. HTTPStatusCode: res.StatusCode,
  1637. },
  1638. }
  1639. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1640. return nil, err
  1641. }
  1642. return ret, nil
  1643. // {
  1644. // "description": "",
  1645. // "httpMethod": "GET",
  1646. // "id": "manager.templates.get",
  1647. // "parameterOrder": [
  1648. // "projectId",
  1649. // "templateName"
  1650. // ],
  1651. // "parameters": {
  1652. // "projectId": {
  1653. // "location": "path",
  1654. // "required": true,
  1655. // "type": "string"
  1656. // },
  1657. // "templateName": {
  1658. // "location": "path",
  1659. // "required": true,
  1660. // "type": "string"
  1661. // }
  1662. // },
  1663. // "path": "{projectId}/templates/{templateName}",
  1664. // "response": {
  1665. // "$ref": "Template"
  1666. // },
  1667. // "scopes": [
  1668. // "https://www.googleapis.com/auth/cloud-platform",
  1669. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  1670. // "https://www.googleapis.com/auth/ndev.cloudman",
  1671. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  1672. // ]
  1673. // }
  1674. }
  1675. // method id "manager.templates.insert":
  1676. type TemplatesInsertCall struct {
  1677. s *Service
  1678. projectId string
  1679. template *Template
  1680. urlParams_ gensupport.URLParams
  1681. ctx_ context.Context
  1682. }
  1683. // Insert:
  1684. func (r *TemplatesService) Insert(projectId string, template *Template) *TemplatesInsertCall {
  1685. c := &TemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1686. c.projectId = projectId
  1687. c.template = template
  1688. return c
  1689. }
  1690. // Fields allows partial responses to be retrieved. See
  1691. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1692. // for more information.
  1693. func (c *TemplatesInsertCall) Fields(s ...googleapi.Field) *TemplatesInsertCall {
  1694. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1695. return c
  1696. }
  1697. // Context sets the context to be used in this call's Do method. Any
  1698. // pending HTTP request will be aborted if the provided context is
  1699. // canceled.
  1700. func (c *TemplatesInsertCall) Context(ctx context.Context) *TemplatesInsertCall {
  1701. c.ctx_ = ctx
  1702. return c
  1703. }
  1704. func (c *TemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
  1705. var body io.Reader = nil
  1706. body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
  1707. if err != nil {
  1708. return nil, err
  1709. }
  1710. ctype := "application/json"
  1711. c.urlParams_.Set("alt", alt)
  1712. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/templates")
  1713. urls += "?" + c.urlParams_.Encode()
  1714. req, _ := http.NewRequest("POST", urls, body)
  1715. googleapi.Expand(req.URL, map[string]string{
  1716. "projectId": c.projectId,
  1717. })
  1718. req.Header.Set("Content-Type", ctype)
  1719. req.Header.Set("User-Agent", c.s.userAgent())
  1720. if c.ctx_ != nil {
  1721. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1722. }
  1723. return c.s.client.Do(req)
  1724. }
  1725. // Do executes the "manager.templates.insert" call.
  1726. // Exactly one of *Template or error will be non-nil. Any non-2xx status
  1727. // code is an error. Response headers are in either
  1728. // *Template.ServerResponse.Header or (if a response was returned at
  1729. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1730. // to check whether the returned error was because
  1731. // http.StatusNotModified was returned.
  1732. func (c *TemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Template, error) {
  1733. gensupport.SetOptions(c.urlParams_, opts...)
  1734. res, err := c.doRequest("json")
  1735. if res != nil && res.StatusCode == http.StatusNotModified {
  1736. if res.Body != nil {
  1737. res.Body.Close()
  1738. }
  1739. return nil, &googleapi.Error{
  1740. Code: res.StatusCode,
  1741. Header: res.Header,
  1742. }
  1743. }
  1744. if err != nil {
  1745. return nil, err
  1746. }
  1747. defer googleapi.CloseBody(res)
  1748. if err := googleapi.CheckResponse(res); err != nil {
  1749. return nil, err
  1750. }
  1751. ret := &Template{
  1752. ServerResponse: googleapi.ServerResponse{
  1753. Header: res.Header,
  1754. HTTPStatusCode: res.StatusCode,
  1755. },
  1756. }
  1757. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1758. return nil, err
  1759. }
  1760. return ret, nil
  1761. // {
  1762. // "description": "",
  1763. // "httpMethod": "POST",
  1764. // "id": "manager.templates.insert",
  1765. // "parameterOrder": [
  1766. // "projectId"
  1767. // ],
  1768. // "parameters": {
  1769. // "projectId": {
  1770. // "location": "path",
  1771. // "required": true,
  1772. // "type": "string"
  1773. // }
  1774. // },
  1775. // "path": "{projectId}/templates",
  1776. // "request": {
  1777. // "$ref": "Template"
  1778. // },
  1779. // "response": {
  1780. // "$ref": "Template"
  1781. // },
  1782. // "scopes": [
  1783. // "https://www.googleapis.com/auth/cloud-platform",
  1784. // "https://www.googleapis.com/auth/ndev.cloudman"
  1785. // ]
  1786. // }
  1787. }
  1788. // method id "manager.templates.list":
  1789. type TemplatesListCall struct {
  1790. s *Service
  1791. projectId string
  1792. urlParams_ gensupport.URLParams
  1793. ifNoneMatch_ string
  1794. ctx_ context.Context
  1795. }
  1796. // List:
  1797. func (r *TemplatesService) List(projectId string) *TemplatesListCall {
  1798. c := &TemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1799. c.projectId = projectId
  1800. return c
  1801. }
  1802. // MaxResults sets the optional parameter "maxResults": Maximum count of
  1803. // results to be returned. Acceptable values are 0 to 100, inclusive.
  1804. // (Default: 50)
  1805. func (c *TemplatesListCall) MaxResults(maxResults int64) *TemplatesListCall {
  1806. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  1807. return c
  1808. }
  1809. // PageToken sets the optional parameter "pageToken": Specifies a
  1810. // nextPageToken returned by a previous list request. This token can be
  1811. // used to request the next page of results from a previous list
  1812. // request.
  1813. func (c *TemplatesListCall) PageToken(pageToken string) *TemplatesListCall {
  1814. c.urlParams_.Set("pageToken", pageToken)
  1815. return c
  1816. }
  1817. // Fields allows partial responses to be retrieved. See
  1818. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1819. // for more information.
  1820. func (c *TemplatesListCall) Fields(s ...googleapi.Field) *TemplatesListCall {
  1821. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1822. return c
  1823. }
  1824. // IfNoneMatch sets the optional parameter which makes the operation
  1825. // fail if the object's ETag matches the given value. This is useful for
  1826. // getting updates only after the object has changed since the last
  1827. // request. Use googleapi.IsNotModified to check whether the response
  1828. // error from Do is the result of In-None-Match.
  1829. func (c *TemplatesListCall) IfNoneMatch(entityTag string) *TemplatesListCall {
  1830. c.ifNoneMatch_ = entityTag
  1831. return c
  1832. }
  1833. // Context sets the context to be used in this call's Do method. Any
  1834. // pending HTTP request will be aborted if the provided context is
  1835. // canceled.
  1836. func (c *TemplatesListCall) Context(ctx context.Context) *TemplatesListCall {
  1837. c.ctx_ = ctx
  1838. return c
  1839. }
  1840. func (c *TemplatesListCall) doRequest(alt string) (*http.Response, error) {
  1841. var body io.Reader = nil
  1842. c.urlParams_.Set("alt", alt)
  1843. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/templates")
  1844. urls += "?" + c.urlParams_.Encode()
  1845. req, _ := http.NewRequest("GET", urls, body)
  1846. googleapi.Expand(req.URL, map[string]string{
  1847. "projectId": c.projectId,
  1848. })
  1849. req.Header.Set("User-Agent", c.s.userAgent())
  1850. if c.ifNoneMatch_ != "" {
  1851. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1852. }
  1853. if c.ctx_ != nil {
  1854. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1855. }
  1856. return c.s.client.Do(req)
  1857. }
  1858. // Do executes the "manager.templates.list" call.
  1859. // Exactly one of *TemplatesListResponse or error will be non-nil. Any
  1860. // non-2xx status code is an error. Response headers are in either
  1861. // *TemplatesListResponse.ServerResponse.Header or (if a response was
  1862. // returned at all) in error.(*googleapi.Error).Header. Use
  1863. // googleapi.IsNotModified to check whether the returned error was
  1864. // because http.StatusNotModified was returned.
  1865. func (c *TemplatesListCall) Do(opts ...googleapi.CallOption) (*TemplatesListResponse, error) {
  1866. gensupport.SetOptions(c.urlParams_, opts...)
  1867. res, err := c.doRequest("json")
  1868. if res != nil && res.StatusCode == http.StatusNotModified {
  1869. if res.Body != nil {
  1870. res.Body.Close()
  1871. }
  1872. return nil, &googleapi.Error{
  1873. Code: res.StatusCode,
  1874. Header: res.Header,
  1875. }
  1876. }
  1877. if err != nil {
  1878. return nil, err
  1879. }
  1880. defer googleapi.CloseBody(res)
  1881. if err := googleapi.CheckResponse(res); err != nil {
  1882. return nil, err
  1883. }
  1884. ret := &TemplatesListResponse{
  1885. ServerResponse: googleapi.ServerResponse{
  1886. Header: res.Header,
  1887. HTTPStatusCode: res.StatusCode,
  1888. },
  1889. }
  1890. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1891. return nil, err
  1892. }
  1893. return ret, nil
  1894. // {
  1895. // "description": "",
  1896. // "httpMethod": "GET",
  1897. // "id": "manager.templates.list",
  1898. // "parameterOrder": [
  1899. // "projectId"
  1900. // ],
  1901. // "parameters": {
  1902. // "maxResults": {
  1903. // "default": "50",
  1904. // "description": "Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50)",
  1905. // "format": "int32",
  1906. // "location": "query",
  1907. // "maximum": "100",
  1908. // "minimum": "0",
  1909. // "type": "integer"
  1910. // },
  1911. // "pageToken": {
  1912. // "description": "Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.",
  1913. // "location": "query",
  1914. // "type": "string"
  1915. // },
  1916. // "projectId": {
  1917. // "location": "path",
  1918. // "required": true,
  1919. // "type": "string"
  1920. // }
  1921. // },
  1922. // "path": "{projectId}/templates",
  1923. // "response": {
  1924. // "$ref": "TemplatesListResponse"
  1925. // },
  1926. // "scopes": [
  1927. // "https://www.googleapis.com/auth/cloud-platform",
  1928. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  1929. // "https://www.googleapis.com/auth/ndev.cloudman",
  1930. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  1931. // ]
  1932. // }
  1933. }
  1934. // Pages invokes f for each page of results.
  1935. // A non-nil error returned from f will halt the iteration.
  1936. // The provided context supersedes any context provided to the Context method.
  1937. func (c *TemplatesListCall) Pages(ctx context.Context, f func(*TemplatesListResponse) error) error {
  1938. c.ctx_ = ctx
  1939. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1940. for {
  1941. x, err := c.Do()
  1942. if err != nil {
  1943. return err
  1944. }
  1945. if err := f(x); err != nil {
  1946. return err
  1947. }
  1948. if x.NextPageToken == "" {
  1949. return nil
  1950. }
  1951. c.PageToken(x.NextPageToken)
  1952. }
  1953. }