You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

8967 lines
337 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package deploymentmanager provides access to the Google Cloud Deployment Manager API V2Beta Methods.
  6. //
  7. // For product documentation, see: https://developers.google.com/deployment-manager/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/deploymentmanager/v2beta"
  14. // ...
  15. // ctx := context.Background()
  16. // deploymentmanagerService, err := deploymentmanager.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package deploymentmanager // import "google.golang.org/api/deploymentmanager/v2beta"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "deploymentmanager:v2beta"
  71. const apiName = "deploymentmanager"
  72. const apiVersion = "v2beta"
  73. const basePath = "https://www.googleapis.com/deploymentmanager/v2beta/projects/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your data across Google Cloud Platform services
  77. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  78. // View your data across Google Cloud Platform services
  79. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  80. // View and manage your Google Cloud Platform management resources and
  81. // deployment status information
  82. NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman"
  83. // View your Google Cloud Platform management resources and deployment
  84. // status information
  85. NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  86. )
  87. // NewService creates a new Service.
  88. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  89. scopesOption := option.WithScopes(
  90. "https://www.googleapis.com/auth/cloud-platform",
  91. "https://www.googleapis.com/auth/cloud-platform.read-only",
  92. "https://www.googleapis.com/auth/ndev.cloudman",
  93. "https://www.googleapis.com/auth/ndev.cloudman.readonly",
  94. )
  95. // NOTE: prepend, so we don't override user-specified scopes.
  96. opts = append([]option.ClientOption{scopesOption}, opts...)
  97. client, endpoint, err := htransport.NewClient(ctx, opts...)
  98. if err != nil {
  99. return nil, err
  100. }
  101. s, err := New(client)
  102. if err != nil {
  103. return nil, err
  104. }
  105. if endpoint != "" {
  106. s.BasePath = endpoint
  107. }
  108. return s, nil
  109. }
  110. // New creates a new Service. It uses the provided http.Client for requests.
  111. //
  112. // Deprecated: please use NewService instead.
  113. // To provide a custom HTTP client, use option.WithHTTPClient.
  114. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  115. func New(client *http.Client) (*Service, error) {
  116. if client == nil {
  117. return nil, errors.New("client is nil")
  118. }
  119. s := &Service{client: client, BasePath: basePath}
  120. s.CompositeTypes = NewCompositeTypesService(s)
  121. s.Deployments = NewDeploymentsService(s)
  122. s.Manifests = NewManifestsService(s)
  123. s.Operations = NewOperationsService(s)
  124. s.Resources = NewResourcesService(s)
  125. s.TypeProviders = NewTypeProvidersService(s)
  126. s.Types = NewTypesService(s)
  127. return s, nil
  128. }
  129. type Service struct {
  130. client *http.Client
  131. BasePath string // API endpoint base URL
  132. UserAgent string // optional additional User-Agent fragment
  133. CompositeTypes *CompositeTypesService
  134. Deployments *DeploymentsService
  135. Manifests *ManifestsService
  136. Operations *OperationsService
  137. Resources *ResourcesService
  138. TypeProviders *TypeProvidersService
  139. Types *TypesService
  140. }
  141. func (s *Service) userAgent() string {
  142. if s.UserAgent == "" {
  143. return googleapi.UserAgent
  144. }
  145. return googleapi.UserAgent + " " + s.UserAgent
  146. }
  147. func NewCompositeTypesService(s *Service) *CompositeTypesService {
  148. rs := &CompositeTypesService{s: s}
  149. return rs
  150. }
  151. type CompositeTypesService struct {
  152. s *Service
  153. }
  154. func NewDeploymentsService(s *Service) *DeploymentsService {
  155. rs := &DeploymentsService{s: s}
  156. return rs
  157. }
  158. type DeploymentsService struct {
  159. s *Service
  160. }
  161. func NewManifestsService(s *Service) *ManifestsService {
  162. rs := &ManifestsService{s: s}
  163. return rs
  164. }
  165. type ManifestsService struct {
  166. s *Service
  167. }
  168. func NewOperationsService(s *Service) *OperationsService {
  169. rs := &OperationsService{s: s}
  170. return rs
  171. }
  172. type OperationsService struct {
  173. s *Service
  174. }
  175. func NewResourcesService(s *Service) *ResourcesService {
  176. rs := &ResourcesService{s: s}
  177. return rs
  178. }
  179. type ResourcesService struct {
  180. s *Service
  181. }
  182. func NewTypeProvidersService(s *Service) *TypeProvidersService {
  183. rs := &TypeProvidersService{s: s}
  184. return rs
  185. }
  186. type TypeProvidersService struct {
  187. s *Service
  188. }
  189. func NewTypesService(s *Service) *TypesService {
  190. rs := &TypesService{s: s}
  191. return rs
  192. }
  193. type TypesService struct {
  194. s *Service
  195. }
  196. // AsyncOptions: Async options that determine when a resource should
  197. // finish.
  198. type AsyncOptions struct {
  199. // MethodMatch: Method regex where this policy will apply.
  200. MethodMatch string `json:"methodMatch,omitempty"`
  201. // PollingOptions: Deployment manager will poll instances for this API
  202. // resource setting a RUNNING state, and blocking until polling
  203. // conditions tell whether the resource is completed or failed.
  204. PollingOptions *PollingOptions `json:"pollingOptions,omitempty"`
  205. // ForceSendFields is a list of field names (e.g. "MethodMatch") to
  206. // unconditionally include in API requests. By default, fields with
  207. // empty values are omitted from API requests. However, any non-pointer,
  208. // non-interface field appearing in ForceSendFields will be sent to the
  209. // server regardless of whether the field is empty or not. This may be
  210. // used to include empty fields in Patch requests.
  211. ForceSendFields []string `json:"-"`
  212. // NullFields is a list of field names (e.g. "MethodMatch") to include
  213. // in API requests with the JSON null value. By default, fields with
  214. // empty values are omitted from API requests. However, any field with
  215. // an empty value appearing in NullFields will be sent to the server as
  216. // null. It is an error if a field in this list has a non-empty value.
  217. // This may be used to include null fields in Patch requests.
  218. NullFields []string `json:"-"`
  219. }
  220. func (s *AsyncOptions) MarshalJSON() ([]byte, error) {
  221. type NoMethod AsyncOptions
  222. raw := NoMethod(*s)
  223. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  224. }
  225. // AuditConfig: Specifies the audit configuration for a service. The
  226. // configuration determines which permission types are logged, and what
  227. // identities, if any, are exempted from logging. An AuditConfig must
  228. // have one or more AuditLogConfigs.
  229. //
  230. // If there are AuditConfigs for both `allServices` and a specific
  231. // service, the union of the two AuditConfigs is used for that service:
  232. // the log_types specified in each AuditConfig are enabled, and the
  233. // exempted_members in each AuditLogConfig are exempted.
  234. //
  235. // Example Policy with multiple AuditConfigs:
  236. //
  237. // { "audit_configs": [ { "service": "allServices" "audit_log_configs":
  238. // [ { "log_type": "DATA_READ", "exempted_members": [
  239. // "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, {
  240. // "log_type": "ADMIN_READ", } ] }, { "service":
  241. // "fooservice.googleapis.com" "audit_log_configs": [ { "log_type":
  242. // "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [
  243. // "user:bar@gmail.com" ] } ] } ] }
  244. //
  245. // For fooservice, this policy enables DATA_READ, DATA_WRITE and
  246. // ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ
  247. // logging, and bar@gmail.com from DATA_WRITE logging.
  248. type AuditConfig struct {
  249. // AuditLogConfigs: The configuration for logging of each type of
  250. // permission.
  251. AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
  252. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  253. // Service: Specifies a service that will be enabled for audit logging.
  254. // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
  255. // `allServices` is a special value that covers all services.
  256. Service string `json:"service,omitempty"`
  257. // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  258. // unconditionally include in API requests. By default, fields with
  259. // empty values are omitted from API requests. However, any non-pointer,
  260. // non-interface field appearing in ForceSendFields will be sent to the
  261. // server regardless of whether the field is empty or not. This may be
  262. // used to include empty fields in Patch requests.
  263. ForceSendFields []string `json:"-"`
  264. // NullFields is a list of field names (e.g. "AuditLogConfigs") to
  265. // include in API requests with the JSON null value. By default, fields
  266. // with empty values are omitted from API requests. However, any field
  267. // with an empty value appearing in NullFields will be sent to the
  268. // server as null. It is an error if a field in this list has a
  269. // non-empty value. This may be used to include null fields in Patch
  270. // requests.
  271. NullFields []string `json:"-"`
  272. }
  273. func (s *AuditConfig) MarshalJSON() ([]byte, error) {
  274. type NoMethod AuditConfig
  275. raw := NoMethod(*s)
  276. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  277. }
  278. // AuditLogConfig: Provides the configuration for logging a type of
  279. // permissions. Example:
  280. //
  281. // { "audit_log_configs": [ { "log_type": "DATA_READ",
  282. // "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type":
  283. // "DATA_WRITE", } ] }
  284. //
  285. // This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
  286. // foo@gmail.com from DATA_READ logging.
  287. type AuditLogConfig struct {
  288. // ExemptedMembers: Specifies the identities that do not cause logging
  289. // for this type of permission. Follows the same format of
  290. // [Binding.members][].
  291. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  292. // LogType: The log type that this config enables.
  293. LogType string `json:"logType,omitempty"`
  294. // ForceSendFields is a list of field names (e.g. "ExemptedMembers") 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. // NullFields is a list of field names (e.g. "ExemptedMembers") to
  302. // include in API requests with the JSON null value. By default, fields
  303. // with empty values are omitted from API requests. However, any field
  304. // with an empty value appearing in NullFields will be sent to the
  305. // server as null. It is an error if a field in this list has a
  306. // non-empty value. This may be used to include null fields in Patch
  307. // requests.
  308. NullFields []string `json:"-"`
  309. }
  310. func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
  311. type NoMethod AuditLogConfig
  312. raw := NoMethod(*s)
  313. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  314. }
  315. // AuthorizationLoggingOptions: Authorization-related information used
  316. // by Cloud Audit Logging.
  317. type AuthorizationLoggingOptions struct {
  318. // PermissionType: The type of the permission that was checked.
  319. PermissionType string `json:"permissionType,omitempty"`
  320. // ForceSendFields is a list of field names (e.g. "PermissionType") to
  321. // unconditionally include in API requests. By default, fields with
  322. // empty values are omitted from API requests. However, any non-pointer,
  323. // non-interface field appearing in ForceSendFields will be sent to the
  324. // server regardless of whether the field is empty or not. This may be
  325. // used to include empty fields in Patch requests.
  326. ForceSendFields []string `json:"-"`
  327. // NullFields is a list of field names (e.g. "PermissionType") to
  328. // include in API requests with the JSON null value. By default, fields
  329. // with empty values are omitted from API requests. However, any field
  330. // with an empty value appearing in NullFields will be sent to the
  331. // server as null. It is an error if a field in this list has a
  332. // non-empty value. This may be used to include null fields in Patch
  333. // requests.
  334. NullFields []string `json:"-"`
  335. }
  336. func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) {
  337. type NoMethod AuthorizationLoggingOptions
  338. raw := NoMethod(*s)
  339. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  340. }
  341. // BaseType: BaseType that describes a service-backed Type.
  342. type BaseType struct {
  343. // CollectionOverrides: Allows resource handling overrides for specific
  344. // collections
  345. CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"`
  346. // Credential: Credential used when interacting with this type.
  347. Credential *Credential `json:"credential,omitempty"`
  348. // DescriptorUrl: Descriptor Url for the this type.
  349. DescriptorUrl string `json:"descriptorUrl,omitempty"`
  350. // Options: Options to apply when handling any resources in this
  351. // service.
  352. Options *Options `json:"options,omitempty"`
  353. // ForceSendFields is a list of field names (e.g. "CollectionOverrides")
  354. // to unconditionally include in API requests. By default, fields with
  355. // empty values are omitted from API requests. However, any non-pointer,
  356. // non-interface field appearing in ForceSendFields will be sent to the
  357. // server regardless of whether the field is empty or not. This may be
  358. // used to include empty fields in Patch requests.
  359. ForceSendFields []string `json:"-"`
  360. // NullFields is a list of field names (e.g. "CollectionOverrides") to
  361. // include in API requests with the JSON null value. By default, fields
  362. // with empty values are omitted from API requests. However, any field
  363. // with an empty value appearing in NullFields will be sent to the
  364. // server as null. It is an error if a field in this list has a
  365. // non-empty value. This may be used to include null fields in Patch
  366. // requests.
  367. NullFields []string `json:"-"`
  368. }
  369. func (s *BaseType) MarshalJSON() ([]byte, error) {
  370. type NoMethod BaseType
  371. raw := NoMethod(*s)
  372. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  373. }
  374. // BasicAuth: Basic Auth used as a credential.
  375. type BasicAuth struct {
  376. Password string `json:"password,omitempty"`
  377. User string `json:"user,omitempty"`
  378. // ForceSendFields is a list of field names (e.g. "Password") to
  379. // unconditionally include in API requests. By default, fields with
  380. // empty values are omitted from API requests. However, any non-pointer,
  381. // non-interface field appearing in ForceSendFields will be sent to the
  382. // server regardless of whether the field is empty or not. This may be
  383. // used to include empty fields in Patch requests.
  384. ForceSendFields []string `json:"-"`
  385. // NullFields is a list of field names (e.g. "Password") to include in
  386. // API requests with the JSON null value. By default, fields with empty
  387. // values are omitted from API requests. However, any field with an
  388. // empty value appearing in NullFields will be sent to the server as
  389. // null. It is an error if a field in this list has a non-empty value.
  390. // This may be used to include null fields in Patch requests.
  391. NullFields []string `json:"-"`
  392. }
  393. func (s *BasicAuth) MarshalJSON() ([]byte, error) {
  394. type NoMethod BasicAuth
  395. raw := NoMethod(*s)
  396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  397. }
  398. // Binding: Associates `members` with a `role`.
  399. type Binding struct {
  400. // Condition: Unimplemented. The condition that is associated with this
  401. // binding. NOTE: an unsatisfied condition will not allow user access
  402. // via current binding. Different bindings, including their conditions,
  403. // are examined independently.
  404. Condition *Expr `json:"condition,omitempty"`
  405. // Members: Specifies the identities requesting access for a Cloud
  406. // Platform resource. `members` can have the following values:
  407. //
  408. // * `allUsers`: A special identifier that represents anyone who is on
  409. // the internet; with or without a Google account.
  410. //
  411. // * `allAuthenticatedUsers`: A special identifier that represents
  412. // anyone who is authenticated with a Google account or a service
  413. // account.
  414. //
  415. // * `user:{emailid}`: An email address that represents a specific
  416. // Google account. For example, `alice@gmail.com` .
  417. //
  418. //
  419. //
  420. // * `serviceAccount:{emailid}`: An email address that represents a
  421. // service account. For example,
  422. // `my-other-app@appspot.gserviceaccount.com`.
  423. //
  424. // * `group:{emailid}`: An email address that represents a Google group.
  425. // For example, `admins@example.com`.
  426. //
  427. //
  428. //
  429. // * `domain:{domain}`: A Google Apps domain name that represents all
  430. // the users of that domain. For example, `google.com` or `example.com`.
  431. Members []string `json:"members,omitempty"`
  432. // Role: Role that is assigned to `members`. For example,
  433. // `roles/viewer`, `roles/editor`, or `roles/owner`.
  434. Role string `json:"role,omitempty"`
  435. // ForceSendFields is a list of field names (e.g. "Condition") to
  436. // unconditionally include in API requests. By default, fields with
  437. // empty values are omitted from API requests. However, any non-pointer,
  438. // non-interface field appearing in ForceSendFields will be sent to the
  439. // server regardless of whether the field is empty or not. This may be
  440. // used to include empty fields in Patch requests.
  441. ForceSendFields []string `json:"-"`
  442. // NullFields is a list of field names (e.g. "Condition") to include in
  443. // API requests with the JSON null value. By default, fields with empty
  444. // values are omitted from API requests. However, any field with an
  445. // empty value appearing in NullFields will be sent to the server as
  446. // null. It is an error if a field in this list has a non-empty value.
  447. // This may be used to include null fields in Patch requests.
  448. NullFields []string `json:"-"`
  449. }
  450. func (s *Binding) MarshalJSON() ([]byte, error) {
  451. type NoMethod Binding
  452. raw := NoMethod(*s)
  453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  454. }
  455. // CollectionOverride: CollectionOverride allows resource handling
  456. // overrides for specific resources within a BaseType
  457. type CollectionOverride struct {
  458. // Collection: The collection that identifies this resource within its
  459. // service.
  460. Collection string `json:"collection,omitempty"`
  461. // Options: The options to apply to this resource-level override
  462. Options *Options `json:"options,omitempty"`
  463. // ForceSendFields is a list of field names (e.g. "Collection") to
  464. // unconditionally include in API requests. By default, fields with
  465. // empty values are omitted from API requests. However, any non-pointer,
  466. // non-interface field appearing in ForceSendFields will be sent to the
  467. // server regardless of whether the field is empty or not. This may be
  468. // used to include empty fields in Patch requests.
  469. ForceSendFields []string `json:"-"`
  470. // NullFields is a list of field names (e.g. "Collection") to include in
  471. // API requests with the JSON null value. By default, fields with empty
  472. // values are omitted from API requests. However, any field with an
  473. // empty value appearing in NullFields will be sent to the server as
  474. // null. It is an error if a field in this list has a non-empty value.
  475. // This may be used to include null fields in Patch requests.
  476. NullFields []string `json:"-"`
  477. }
  478. func (s *CollectionOverride) MarshalJSON() ([]byte, error) {
  479. type NoMethod CollectionOverride
  480. raw := NoMethod(*s)
  481. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  482. }
  483. // CompositeType: Holds the composite type.
  484. type CompositeType struct {
  485. // Description: An optional textual description of the resource;
  486. // provided by the client when the resource is created.
  487. Description string `json:"description,omitempty"`
  488. Id uint64 `json:"id,omitempty,string"`
  489. // InsertTime: Output only. Creation timestamp in RFC3339 text format.
  490. InsertTime string `json:"insertTime,omitempty"`
  491. // Labels: Map of labels; provided by the client when the resource is
  492. // created or updated. Specifically: Label keys must be between 1 and 63
  493. // characters long and must conform to the following regular expression:
  494. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  495. // characters long and must conform to the regular expression
  496. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  497. Labels []*CompositeTypeLabelEntry `json:"labels,omitempty"`
  498. // Name: Name of the composite type, must follow the expression:
  499. // [a-z]([-a-z0-9_.]{0,61}[a-z0-9])?.
  500. Name string `json:"name,omitempty"`
  501. // Operation: Output only. The Operation that most recently ran, or is
  502. // currently running, on this composite type.
  503. Operation *Operation `json:"operation,omitempty"`
  504. // SelfLink: Output only. Server defined URL for the resource.
  505. SelfLink string `json:"selfLink,omitempty"`
  506. Status string `json:"status,omitempty"`
  507. // TemplateContents: Files for the template type.
  508. TemplateContents *TemplateContents `json:"templateContents,omitempty"`
  509. // ServerResponse contains the HTTP response code and headers from the
  510. // server.
  511. googleapi.ServerResponse `json:"-"`
  512. // ForceSendFields is a list of field names (e.g. "Description") to
  513. // unconditionally include in API requests. By default, fields with
  514. // empty values are omitted from API requests. However, any non-pointer,
  515. // non-interface field appearing in ForceSendFields will be sent to the
  516. // server regardless of whether the field is empty or not. This may be
  517. // used to include empty fields in Patch requests.
  518. ForceSendFields []string `json:"-"`
  519. // NullFields is a list of field names (e.g. "Description") to include
  520. // in API requests with the JSON null value. By default, fields with
  521. // empty values are omitted from API requests. However, any field with
  522. // an empty value appearing in NullFields will be sent to the server as
  523. // null. It is an error if a field in this list has a non-empty value.
  524. // This may be used to include null fields in Patch requests.
  525. NullFields []string `json:"-"`
  526. }
  527. func (s *CompositeType) MarshalJSON() ([]byte, error) {
  528. type NoMethod CompositeType
  529. raw := NoMethod(*s)
  530. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  531. }
  532. type CompositeTypeLabelEntry struct {
  533. Key string `json:"key,omitempty"`
  534. Value string `json:"value,omitempty"`
  535. // ForceSendFields is a list of field names (e.g. "Key") to
  536. // unconditionally include in API requests. By default, fields with
  537. // empty values are omitted from API requests. However, any non-pointer,
  538. // non-interface field appearing in ForceSendFields will be sent to the
  539. // server regardless of whether the field is empty or not. This may be
  540. // used to include empty fields in Patch requests.
  541. ForceSendFields []string `json:"-"`
  542. // NullFields is a list of field names (e.g. "Key") to include in API
  543. // requests with the JSON null value. By default, fields with empty
  544. // values are omitted from API requests. However, any field with an
  545. // empty value appearing in NullFields will be sent to the server as
  546. // null. It is an error if a field in this list has a non-empty value.
  547. // This may be used to include null fields in Patch requests.
  548. NullFields []string `json:"-"`
  549. }
  550. func (s *CompositeTypeLabelEntry) MarshalJSON() ([]byte, error) {
  551. type NoMethod CompositeTypeLabelEntry
  552. raw := NoMethod(*s)
  553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  554. }
  555. // CompositeTypesListResponse: A response that returns all Composite
  556. // Types supported by Deployment Manager
  557. type CompositeTypesListResponse struct {
  558. // CompositeTypes: Output only. A list of resource composite types
  559. // supported by Deployment Manager.
  560. CompositeTypes []*CompositeType `json:"compositeTypes,omitempty"`
  561. // NextPageToken: A token used to continue a truncated list request.
  562. NextPageToken string `json:"nextPageToken,omitempty"`
  563. // ServerResponse contains the HTTP response code and headers from the
  564. // server.
  565. googleapi.ServerResponse `json:"-"`
  566. // ForceSendFields is a list of field names (e.g. "CompositeTypes") to
  567. // unconditionally include in API requests. By default, fields with
  568. // empty values are omitted from API requests. However, any non-pointer,
  569. // non-interface field appearing in ForceSendFields will be sent to the
  570. // server regardless of whether the field is empty or not. This may be
  571. // used to include empty fields in Patch requests.
  572. ForceSendFields []string `json:"-"`
  573. // NullFields is a list of field names (e.g. "CompositeTypes") to
  574. // include in API requests with the JSON null value. By default, fields
  575. // with empty values are omitted from API requests. However, any field
  576. // with an empty value appearing in NullFields will be sent to the
  577. // server as null. It is an error if a field in this list has a
  578. // non-empty value. This may be used to include null fields in Patch
  579. // requests.
  580. NullFields []string `json:"-"`
  581. }
  582. func (s *CompositeTypesListResponse) MarshalJSON() ([]byte, error) {
  583. type NoMethod CompositeTypesListResponse
  584. raw := NoMethod(*s)
  585. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  586. }
  587. // Condition: A condition to be met.
  588. type Condition struct {
  589. // Iam: Trusted attributes supplied by the IAM system.
  590. Iam string `json:"iam,omitempty"`
  591. // Op: An operator to apply the subject with.
  592. Op string `json:"op,omitempty"`
  593. // Svc: Trusted attributes discharged by the service.
  594. Svc string `json:"svc,omitempty"`
  595. // Sys: Trusted attributes supplied by any service that owns resources
  596. // and uses the IAM system for access control.
  597. Sys string `json:"sys,omitempty"`
  598. // Value: DEPRECATED. Use 'values' instead.
  599. Value string `json:"value,omitempty"`
  600. // Values: The objects of the condition. This is mutually exclusive with
  601. // 'value'.
  602. Values []string `json:"values,omitempty"`
  603. // ForceSendFields is a list of field names (e.g. "Iam") to
  604. // unconditionally include in API requests. By default, fields with
  605. // empty values are omitted from API requests. However, any non-pointer,
  606. // non-interface field appearing in ForceSendFields will be sent to the
  607. // server regardless of whether the field is empty or not. This may be
  608. // used to include empty fields in Patch requests.
  609. ForceSendFields []string `json:"-"`
  610. // NullFields is a list of field names (e.g. "Iam") to include in API
  611. // requests with the JSON null value. By default, fields with empty
  612. // values are omitted from API requests. However, any field with an
  613. // empty value appearing in NullFields will be sent to the server as
  614. // null. It is an error if a field in this list has a non-empty value.
  615. // This may be used to include null fields in Patch requests.
  616. NullFields []string `json:"-"`
  617. }
  618. func (s *Condition) MarshalJSON() ([]byte, error) {
  619. type NoMethod Condition
  620. raw := NoMethod(*s)
  621. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  622. }
  623. type ConfigFile struct {
  624. // Content: The contents of the file.
  625. Content string `json:"content,omitempty"`
  626. // ForceSendFields is a list of field names (e.g. "Content") to
  627. // unconditionally include in API requests. By default, fields with
  628. // empty values are omitted from API requests. However, any non-pointer,
  629. // non-interface field appearing in ForceSendFields will be sent to the
  630. // server regardless of whether the field is empty or not. This may be
  631. // used to include empty fields in Patch requests.
  632. ForceSendFields []string `json:"-"`
  633. // NullFields is a list of field names (e.g. "Content") to include in
  634. // API requests with the JSON null value. By default, fields with empty
  635. // values are omitted from API requests. However, any field with an
  636. // empty value appearing in NullFields will be sent to the server as
  637. // null. It is an error if a field in this list has a non-empty value.
  638. // This may be used to include null fields in Patch requests.
  639. NullFields []string `json:"-"`
  640. }
  641. func (s *ConfigFile) MarshalJSON() ([]byte, error) {
  642. type NoMethod ConfigFile
  643. raw := NoMethod(*s)
  644. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  645. }
  646. // Credential: The credential used by Deployment Manager and
  647. // TypeProvider. Only one of the options is permitted.
  648. type Credential struct {
  649. // BasicAuth: Basic Auth Credential, only used by TypeProvider.
  650. BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
  651. // ServiceAccount: Service Account Credential, only used by Deployment.
  652. ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
  653. // UseProjectDefault: Specify to use the project default credential,
  654. // only supported by Deployment.
  655. UseProjectDefault bool `json:"useProjectDefault,omitempty"`
  656. // ForceSendFields is a list of field names (e.g. "BasicAuth") to
  657. // unconditionally include in API requests. By default, fields with
  658. // empty values are omitted from API requests. However, any non-pointer,
  659. // non-interface field appearing in ForceSendFields will be sent to the
  660. // server regardless of whether the field is empty or not. This may be
  661. // used to include empty fields in Patch requests.
  662. ForceSendFields []string `json:"-"`
  663. // NullFields is a list of field names (e.g. "BasicAuth") to include in
  664. // API requests with the JSON null value. By default, fields with empty
  665. // values are omitted from API requests. However, any field with an
  666. // empty value appearing in NullFields will be sent to the server as
  667. // null. It is an error if a field in this list has a non-empty value.
  668. // This may be used to include null fields in Patch requests.
  669. NullFields []string `json:"-"`
  670. }
  671. func (s *Credential) MarshalJSON() ([]byte, error) {
  672. type NoMethod Credential
  673. raw := NoMethod(*s)
  674. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  675. }
  676. type Deployment struct {
  677. // Description: An optional user-provided description of the deployment.
  678. Description string `json:"description,omitempty"`
  679. // Fingerprint: Provides a fingerprint to use in requests to modify a
  680. // deployment, such as update(), stop(), and cancelPreview() requests. A
  681. // fingerprint is a randomly generated value that must be provided with
  682. // update(), stop(), and cancelPreview() requests to perform optimistic
  683. // locking. This ensures optimistic concurrency so that only one request
  684. // happens at a time.
  685. //
  686. // The fingerprint is initially generated by Deployment Manager and
  687. // changes after every request to modify data. To get the latest
  688. // fingerprint value, perform a get() request to a deployment.
  689. Fingerprint string `json:"fingerprint,omitempty"`
  690. Id uint64 `json:"id,omitempty,string"`
  691. // InsertTime: Output only. Creation timestamp in RFC3339 text format.
  692. InsertTime string `json:"insertTime,omitempty"`
  693. // Labels: Map of labels; provided by the client when the resource is
  694. // created or updated. Specifically: Label keys must be between 1 and 63
  695. // characters long and must conform to the following regular expression:
  696. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  697. // characters long and must conform to the regular expression
  698. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  699. Labels []*DeploymentLabelEntry `json:"labels,omitempty"`
  700. // Manifest: Output only. URL of the manifest representing the last
  701. // manifest that was successfully deployed.
  702. Manifest string `json:"manifest,omitempty"`
  703. // Name: Name of the resource; provided by the client when the resource
  704. // is created. The name must be 1-63 characters long, and comply with
  705. // RFC1035. Specifically, the name must be 1-63 characters long and
  706. // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
  707. // the first character must be a lowercase letter, and all following
  708. // characters must be a dash, lowercase letter, or digit, except the
  709. // last character, which cannot be a dash.
  710. Name string `json:"name,omitempty"`
  711. // Operation: Output only. The Operation that most recently ran, or is
  712. // currently running, on this deployment.
  713. Operation *Operation `json:"operation,omitempty"`
  714. // SelfLink: Output only. Server defined URL for the resource.
  715. SelfLink string `json:"selfLink,omitempty"`
  716. // Target: [Input Only] The parameters that define your deployment,
  717. // including the deployment configuration and relevant templates.
  718. Target *TargetConfiguration `json:"target,omitempty"`
  719. // Update: Output only. If Deployment Manager is currently updating or
  720. // previewing an update to this deployment, the updated configuration
  721. // appears here.
  722. Update *DeploymentUpdate `json:"update,omitempty"`
  723. // UpdateTime: Output only. Update timestamp in RFC3339 text format.
  724. UpdateTime string `json:"updateTime,omitempty"`
  725. // ServerResponse contains the HTTP response code and headers from the
  726. // server.
  727. googleapi.ServerResponse `json:"-"`
  728. // ForceSendFields is a list of field names (e.g. "Description") to
  729. // unconditionally include in API requests. By default, fields with
  730. // empty values are omitted from API requests. However, any non-pointer,
  731. // non-interface field appearing in ForceSendFields will be sent to the
  732. // server regardless of whether the field is empty or not. This may be
  733. // used to include empty fields in Patch requests.
  734. ForceSendFields []string `json:"-"`
  735. // NullFields is a list of field names (e.g. "Description") to include
  736. // in API requests with the JSON null value. By default, fields with
  737. // empty values are omitted from API requests. However, any field with
  738. // an empty value appearing in NullFields will be sent to the server as
  739. // null. It is an error if a field in this list has a non-empty value.
  740. // This may be used to include null fields in Patch requests.
  741. NullFields []string `json:"-"`
  742. }
  743. func (s *Deployment) MarshalJSON() ([]byte, error) {
  744. type NoMethod Deployment
  745. raw := NoMethod(*s)
  746. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  747. }
  748. type DeploymentLabelEntry struct {
  749. Key string `json:"key,omitempty"`
  750. Value string `json:"value,omitempty"`
  751. // ForceSendFields is a list of field names (e.g. "Key") to
  752. // unconditionally include in API requests. By default, fields with
  753. // empty values are omitted from API requests. However, any non-pointer,
  754. // non-interface field appearing in ForceSendFields will be sent to the
  755. // server regardless of whether the field is empty or not. This may be
  756. // used to include empty fields in Patch requests.
  757. ForceSendFields []string `json:"-"`
  758. // NullFields is a list of field names (e.g. "Key") to include in API
  759. // requests with the JSON null value. By default, fields with empty
  760. // values are omitted from API requests. However, any field with an
  761. // empty value appearing in NullFields will be sent to the server as
  762. // null. It is an error if a field in this list has a non-empty value.
  763. // This may be used to include null fields in Patch requests.
  764. NullFields []string `json:"-"`
  765. }
  766. func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) {
  767. type NoMethod DeploymentLabelEntry
  768. raw := NoMethod(*s)
  769. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  770. }
  771. type DeploymentUpdate struct {
  772. // Description: Output only. An optional user-provided description of
  773. // the deployment after the current update has been applied.
  774. Description string `json:"description,omitempty"`
  775. // Labels: Output only. Map of labels; provided by the client when the
  776. // resource is created or updated. Specifically: Label keys must be
  777. // between 1 and 63 characters long and must conform to the following
  778. // regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be
  779. // between 0 and 63 characters long and must conform to the regular
  780. // expression ([a-z]([-a-z0-9]*[a-z0-9])?)?
  781. Labels []*DeploymentUpdateLabelEntry `json:"labels,omitempty"`
  782. // Manifest: Output only. URL of the manifest representing the update
  783. // configuration of this deployment.
  784. Manifest string `json:"manifest,omitempty"`
  785. // ForceSendFields is a list of field names (e.g. "Description") to
  786. // unconditionally include in API requests. By default, fields with
  787. // empty values are omitted from API requests. However, any non-pointer,
  788. // non-interface field appearing in ForceSendFields will be sent to the
  789. // server regardless of whether the field is empty or not. This may be
  790. // used to include empty fields in Patch requests.
  791. ForceSendFields []string `json:"-"`
  792. // NullFields is a list of field names (e.g. "Description") to include
  793. // in API requests with the JSON null value. By default, fields with
  794. // empty values are omitted from API requests. However, any field with
  795. // an empty value appearing in NullFields will be sent to the server as
  796. // null. It is an error if a field in this list has a non-empty value.
  797. // This may be used to include null fields in Patch requests.
  798. NullFields []string `json:"-"`
  799. }
  800. func (s *DeploymentUpdate) MarshalJSON() ([]byte, error) {
  801. type NoMethod DeploymentUpdate
  802. raw := NoMethod(*s)
  803. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  804. }
  805. type DeploymentUpdateLabelEntry struct {
  806. Key string `json:"key,omitempty"`
  807. Value string `json:"value,omitempty"`
  808. // ForceSendFields is a list of field names (e.g. "Key") to
  809. // unconditionally include in API requests. By default, fields with
  810. // empty values are omitted from API requests. However, any non-pointer,
  811. // non-interface field appearing in ForceSendFields will be sent to the
  812. // server regardless of whether the field is empty or not. This may be
  813. // used to include empty fields in Patch requests.
  814. ForceSendFields []string `json:"-"`
  815. // NullFields is a list of field names (e.g. "Key") to include in API
  816. // requests with the JSON null value. By default, fields with empty
  817. // values are omitted from API requests. However, any field with an
  818. // empty value appearing in NullFields will be sent to the server as
  819. // null. It is an error if a field in this list has a non-empty value.
  820. // This may be used to include null fields in Patch requests.
  821. NullFields []string `json:"-"`
  822. }
  823. func (s *DeploymentUpdateLabelEntry) MarshalJSON() ([]byte, error) {
  824. type NoMethod DeploymentUpdateLabelEntry
  825. raw := NoMethod(*s)
  826. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  827. }
  828. type DeploymentsCancelPreviewRequest struct {
  829. // Fingerprint: Specifies a fingerprint for cancelPreview() requests. A
  830. // fingerprint is a randomly generated value that must be provided in
  831. // cancelPreview() requests to perform optimistic locking. This ensures
  832. // optimistic concurrency so that the deployment does not have
  833. // conflicting requests (e.g. if someone attempts to make a new update
  834. // request while another user attempts to cancel a preview, this would
  835. // prevent one of the requests).
  836. //
  837. // The fingerprint is initially generated by Deployment Manager and
  838. // changes after every request to modify a deployment. To get the latest
  839. // fingerprint value, perform a get() request on the deployment.
  840. Fingerprint string `json:"fingerprint,omitempty"`
  841. // ForceSendFields is a list of field names (e.g. "Fingerprint") to
  842. // unconditionally include in API requests. By default, fields with
  843. // empty values are omitted from API requests. However, any non-pointer,
  844. // non-interface field appearing in ForceSendFields will be sent to the
  845. // server regardless of whether the field is empty or not. This may be
  846. // used to include empty fields in Patch requests.
  847. ForceSendFields []string `json:"-"`
  848. // NullFields is a list of field names (e.g. "Fingerprint") to include
  849. // in API requests with the JSON null value. By default, fields with
  850. // empty values are omitted from API requests. However, any field with
  851. // an empty value appearing in NullFields will be sent to the server as
  852. // null. It is an error if a field in this list has a non-empty value.
  853. // This may be used to include null fields in Patch requests.
  854. NullFields []string `json:"-"`
  855. }
  856. func (s *DeploymentsCancelPreviewRequest) MarshalJSON() ([]byte, error) {
  857. type NoMethod DeploymentsCancelPreviewRequest
  858. raw := NoMethod(*s)
  859. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  860. }
  861. // DeploymentsListResponse: A response containing a partial list of
  862. // deployments and a page token used to build the next request if the
  863. // request has been truncated.
  864. type DeploymentsListResponse struct {
  865. // Deployments: Output only. The deployments contained in this response.
  866. Deployments []*Deployment `json:"deployments,omitempty"`
  867. // NextPageToken: Output only. A token used to continue a truncated list
  868. // request.
  869. NextPageToken string `json:"nextPageToken,omitempty"`
  870. // ServerResponse contains the HTTP response code and headers from the
  871. // server.
  872. googleapi.ServerResponse `json:"-"`
  873. // ForceSendFields is a list of field names (e.g. "Deployments") to
  874. // unconditionally include in API requests. By default, fields with
  875. // empty values are omitted from API requests. However, any non-pointer,
  876. // non-interface field appearing in ForceSendFields will be sent to the
  877. // server regardless of whether the field is empty or not. This may be
  878. // used to include empty fields in Patch requests.
  879. ForceSendFields []string `json:"-"`
  880. // NullFields is a list of field names (e.g. "Deployments") to include
  881. // in API requests with the JSON null value. By default, fields with
  882. // empty values are omitted from API requests. However, any field with
  883. // an empty value appearing in NullFields will be sent to the server as
  884. // null. It is an error if a field in this list has a non-empty value.
  885. // This may be used to include null fields in Patch requests.
  886. NullFields []string `json:"-"`
  887. }
  888. func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) {
  889. type NoMethod DeploymentsListResponse
  890. raw := NoMethod(*s)
  891. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  892. }
  893. type DeploymentsStopRequest struct {
  894. // Fingerprint: Specifies a fingerprint for stop() requests. A
  895. // fingerprint is a randomly generated value that must be provided in
  896. // stop() requests to perform optimistic locking. This ensures
  897. // optimistic concurrency so that the deployment does not have
  898. // conflicting requests (e.g. if someone attempts to make a new update
  899. // request while another user attempts to stop an ongoing update
  900. // request, this would prevent a collision).
  901. //
  902. // The fingerprint is initially generated by Deployment Manager and
  903. // changes after every request to modify a deployment. To get the latest
  904. // fingerprint value, perform a get() request on the deployment.
  905. Fingerprint string `json:"fingerprint,omitempty"`
  906. // ForceSendFields is a list of field names (e.g. "Fingerprint") to
  907. // unconditionally include in API requests. By default, fields with
  908. // empty values are omitted from API requests. However, any non-pointer,
  909. // non-interface field appearing in ForceSendFields will be sent to the
  910. // server regardless of whether the field is empty or not. This may be
  911. // used to include empty fields in Patch requests.
  912. ForceSendFields []string `json:"-"`
  913. // NullFields is a list of field names (e.g. "Fingerprint") to include
  914. // in API requests with the JSON null value. By default, fields with
  915. // empty values are omitted from API requests. However, any field with
  916. // an empty value appearing in NullFields will be sent to the server as
  917. // null. It is an error if a field in this list has a non-empty value.
  918. // This may be used to include null fields in Patch requests.
  919. NullFields []string `json:"-"`
  920. }
  921. func (s *DeploymentsStopRequest) MarshalJSON() ([]byte, error) {
  922. type NoMethod DeploymentsStopRequest
  923. raw := NoMethod(*s)
  924. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  925. }
  926. type Diagnostic struct {
  927. // Field: JsonPath expression on the resource that if non empty,
  928. // indicates that this field needs to be extracted as a diagnostic.
  929. Field string `json:"field,omitempty"`
  930. // Level: Level to record this diagnostic.
  931. Level string `json:"level,omitempty"`
  932. // ForceSendFields is a list of field names (e.g. "Field") to
  933. // unconditionally include in API requests. By default, fields with
  934. // empty values are omitted from API requests. However, any non-pointer,
  935. // non-interface field appearing in ForceSendFields will be sent to the
  936. // server regardless of whether the field is empty or not. This may be
  937. // used to include empty fields in Patch requests.
  938. ForceSendFields []string `json:"-"`
  939. // NullFields is a list of field names (e.g. "Field") to include in API
  940. // requests with the JSON null value. By default, fields with empty
  941. // values are omitted from API requests. However, any field with an
  942. // empty value appearing in NullFields will be sent to the server as
  943. // null. It is an error if a field in this list has a non-empty value.
  944. // This may be used to include null fields in Patch requests.
  945. NullFields []string `json:"-"`
  946. }
  947. func (s *Diagnostic) MarshalJSON() ([]byte, error) {
  948. type NoMethod Diagnostic
  949. raw := NoMethod(*s)
  950. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  951. }
  952. // Expr: Represents an expression text. Example:
  953. //
  954. // title: "User account presence" description: "Determines whether the
  955. // request has a user account" expression: "size(request.user) > 0"
  956. type Expr struct {
  957. // Description: An optional description of the expression. This is a
  958. // longer text which describes the expression, e.g. when hovered over it
  959. // in a UI.
  960. Description string `json:"description,omitempty"`
  961. // Expression: Textual representation of an expression in Common
  962. // Expression Language syntax.
  963. //
  964. // The application context of the containing message determines which
  965. // well-known feature set of CEL is supported.
  966. Expression string `json:"expression,omitempty"`
  967. // Location: An optional string indicating the location of the
  968. // expression for error reporting, e.g. a file name and a position in
  969. // the file.
  970. Location string `json:"location,omitempty"`
  971. // Title: An optional title for the expression, i.e. a short string
  972. // describing its purpose. This can be used e.g. in UIs which allow to
  973. // enter the expression.
  974. Title string `json:"title,omitempty"`
  975. // ForceSendFields is a list of field names (e.g. "Description") to
  976. // unconditionally include in API requests. By default, fields with
  977. // empty values are omitted from API requests. However, any non-pointer,
  978. // non-interface field appearing in ForceSendFields will be sent to the
  979. // server regardless of whether the field is empty or not. This may be
  980. // used to include empty fields in Patch requests.
  981. ForceSendFields []string `json:"-"`
  982. // NullFields is a list of field names (e.g. "Description") to include
  983. // in API requests with the JSON null value. By default, fields with
  984. // empty values are omitted from API requests. However, any field with
  985. // an empty value appearing in NullFields will be sent to the server as
  986. // null. It is an error if a field in this list has a non-empty value.
  987. // This may be used to include null fields in Patch requests.
  988. NullFields []string `json:"-"`
  989. }
  990. func (s *Expr) MarshalJSON() ([]byte, error) {
  991. type NoMethod Expr
  992. raw := NoMethod(*s)
  993. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  994. }
  995. type GlobalSetPolicyRequest struct {
  996. // Bindings: Flatten Policy to create a backward compatible wire-format.
  997. // Deprecated. Use 'policy' to specify bindings.
  998. Bindings []*Binding `json:"bindings,omitempty"`
  999. // Etag: Flatten Policy to create a backward compatible wire-format.
  1000. // Deprecated. Use 'policy' to specify the etag.
  1001. Etag string `json:"etag,omitempty"`
  1002. // Policy: REQUIRED: The complete policy to be applied to the
  1003. // 'resource'. The size of the policy is limited to a few 10s of KB. An
  1004. // empty policy is in general a valid policy but certain services (like
  1005. // Projects) might reject them.
  1006. Policy *Policy `json:"policy,omitempty"`
  1007. // ForceSendFields is a list of field names (e.g. "Bindings") to
  1008. // unconditionally include in API requests. By default, fields with
  1009. // empty values are omitted from API requests. However, any non-pointer,
  1010. // non-interface field appearing in ForceSendFields will be sent to the
  1011. // server regardless of whether the field is empty or not. This may be
  1012. // used to include empty fields in Patch requests.
  1013. ForceSendFields []string `json:"-"`
  1014. // NullFields is a list of field names (e.g. "Bindings") to include in
  1015. // API requests with the JSON null value. By default, fields with empty
  1016. // values are omitted from API requests. However, any field with an
  1017. // empty value appearing in NullFields will be sent to the server as
  1018. // null. It is an error if a field in this list has a non-empty value.
  1019. // This may be used to include null fields in Patch requests.
  1020. NullFields []string `json:"-"`
  1021. }
  1022. func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) {
  1023. type NoMethod GlobalSetPolicyRequest
  1024. raw := NoMethod(*s)
  1025. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1026. }
  1027. type ImportFile struct {
  1028. // Content: The contents of the file.
  1029. Content string `json:"content,omitempty"`
  1030. // Name: The name of the file.
  1031. Name string `json:"name,omitempty"`
  1032. // ForceSendFields is a list of field names (e.g. "Content") to
  1033. // unconditionally include in API requests. By default, fields with
  1034. // empty values are omitted from API requests. However, any non-pointer,
  1035. // non-interface field appearing in ForceSendFields will be sent to the
  1036. // server regardless of whether the field is empty or not. This may be
  1037. // used to include empty fields in Patch requests.
  1038. ForceSendFields []string `json:"-"`
  1039. // NullFields is a list of field names (e.g. "Content") to include in
  1040. // API requests with the JSON null value. By default, fields with empty
  1041. // values are omitted from API requests. However, any field with an
  1042. // empty value appearing in NullFields will be sent to the server as
  1043. // null. It is an error if a field in this list has a non-empty value.
  1044. // This may be used to include null fields in Patch requests.
  1045. NullFields []string `json:"-"`
  1046. }
  1047. func (s *ImportFile) MarshalJSON() ([]byte, error) {
  1048. type NoMethod ImportFile
  1049. raw := NoMethod(*s)
  1050. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1051. }
  1052. // InputMapping: InputMapping creates a 'virtual' property that will be
  1053. // injected into the properties before sending the request to the
  1054. // underlying API.
  1055. type InputMapping struct {
  1056. // FieldName: The name of the field that is going to be injected.
  1057. FieldName string `json:"fieldName,omitempty"`
  1058. // Location: The location where this mapping applies.
  1059. Location string `json:"location,omitempty"`
  1060. // MethodMatch: Regex to evaluate on method to decide if input applies.
  1061. MethodMatch string `json:"methodMatch,omitempty"`
  1062. // Value: A jsonPath expression to select an element.
  1063. Value string `json:"value,omitempty"`
  1064. // ForceSendFields is a list of field names (e.g. "FieldName") to
  1065. // unconditionally include in API requests. By default, fields with
  1066. // empty values are omitted from API requests. However, any non-pointer,
  1067. // non-interface field appearing in ForceSendFields will be sent to the
  1068. // server regardless of whether the field is empty or not. This may be
  1069. // used to include empty fields in Patch requests.
  1070. ForceSendFields []string `json:"-"`
  1071. // NullFields is a list of field names (e.g. "FieldName") to include in
  1072. // API requests with the JSON null value. By default, fields with empty
  1073. // values are omitted from API requests. However, any field with an
  1074. // empty value appearing in NullFields will be sent to the server as
  1075. // null. It is an error if a field in this list has a non-empty value.
  1076. // This may be used to include null fields in Patch requests.
  1077. NullFields []string `json:"-"`
  1078. }
  1079. func (s *InputMapping) MarshalJSON() ([]byte, error) {
  1080. type NoMethod InputMapping
  1081. raw := NoMethod(*s)
  1082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1083. }
  1084. // LogConfig: Specifies what kind of log the caller must write
  1085. type LogConfig struct {
  1086. // CloudAudit: Cloud audit options.
  1087. CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"`
  1088. // Counter: Counter options.
  1089. Counter *LogConfigCounterOptions `json:"counter,omitempty"`
  1090. // DataAccess: Data access options.
  1091. DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"`
  1092. // ForceSendFields is a list of field names (e.g. "CloudAudit") to
  1093. // unconditionally include in API requests. By default, fields with
  1094. // empty values are omitted from API requests. However, any non-pointer,
  1095. // non-interface field appearing in ForceSendFields will be sent to the
  1096. // server regardless of whether the field is empty or not. This may be
  1097. // used to include empty fields in Patch requests.
  1098. ForceSendFields []string `json:"-"`
  1099. // NullFields is a list of field names (e.g. "CloudAudit") to include in
  1100. // API requests with the JSON null value. By default, fields with empty
  1101. // values are omitted from API requests. However, any field with an
  1102. // empty value appearing in NullFields will be sent to the server as
  1103. // null. It is an error if a field in this list has a non-empty value.
  1104. // This may be used to include null fields in Patch requests.
  1105. NullFields []string `json:"-"`
  1106. }
  1107. func (s *LogConfig) MarshalJSON() ([]byte, error) {
  1108. type NoMethod LogConfig
  1109. raw := NoMethod(*s)
  1110. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1111. }
  1112. // LogConfigCloudAuditOptions: Write a Cloud Audit log
  1113. type LogConfigCloudAuditOptions struct {
  1114. // AuthorizationLoggingOptions: Information used by the Cloud Audit
  1115. // Logging pipeline.
  1116. AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"`
  1117. // LogName: The log_name to populate in the Cloud Audit Record.
  1118. LogName string `json:"logName,omitempty"`
  1119. // ForceSendFields is a list of field names (e.g.
  1120. // "AuthorizationLoggingOptions") to unconditionally include in API
  1121. // requests. By default, fields with empty values are omitted from API
  1122. // requests. However, any non-pointer, non-interface field appearing in
  1123. // ForceSendFields will be sent to the server regardless of whether the
  1124. // field is empty or not. This may be used to include empty fields in
  1125. // Patch requests.
  1126. ForceSendFields []string `json:"-"`
  1127. // NullFields is a list of field names (e.g.
  1128. // "AuthorizationLoggingOptions") to include in API requests with the
  1129. // JSON null value. By default, fields with empty values are omitted
  1130. // from API requests. However, any field with an empty value appearing
  1131. // in NullFields will be sent to the server as null. It is an error if a
  1132. // field in this list has a non-empty value. This may be used to include
  1133. // null fields in Patch requests.
  1134. NullFields []string `json:"-"`
  1135. }
  1136. func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) {
  1137. type NoMethod LogConfigCloudAuditOptions
  1138. raw := NoMethod(*s)
  1139. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1140. }
  1141. // LogConfigCounterOptions: Increment a streamz counter with the
  1142. // specified metric and field names.
  1143. //
  1144. // Metric names should start with a '/', generally be lowercase-only,
  1145. // and end in "_count". Field names should not contain an initial slash.
  1146. // The actual exported metric names will have "/iam/policy"
  1147. // prepended.
  1148. //
  1149. // Field names correspond to IAM request parameters and field values are
  1150. // their respective values.
  1151. //
  1152. // Supported field names: - "authority", which is "[token]" if
  1153. // IAMContext.token is present, otherwise the value of
  1154. // IAMContext.authority_selector if present, and otherwise a
  1155. // representation of IAMContext.principal; or - "iam_principal", a
  1156. // representation of IAMContext.principal even if a token or authority
  1157. // selector is present; or - "" (empty string), resulting in a counter
  1158. // with no fields.
  1159. //
  1160. // Examples: counter { metric: "/debug_access_count" field:
  1161. // "iam_principal" } ==> increment counter
  1162. // /iam/policy/backend_debug_access_count {iam_principal=[value of
  1163. // IAMContext.principal]}
  1164. //
  1165. // At this time we do not support multiple field names (though this may
  1166. // be supported in the future).
  1167. type LogConfigCounterOptions struct {
  1168. // Field: The field value to attribute.
  1169. Field string `json:"field,omitempty"`
  1170. // Metric: The metric to update.
  1171. Metric string `json:"metric,omitempty"`
  1172. // ForceSendFields is a list of field names (e.g. "Field") to
  1173. // unconditionally include in API requests. By default, fields with
  1174. // empty values are omitted from API requests. However, any non-pointer,
  1175. // non-interface field appearing in ForceSendFields will be sent to the
  1176. // server regardless of whether the field is empty or not. This may be
  1177. // used to include empty fields in Patch requests.
  1178. ForceSendFields []string `json:"-"`
  1179. // NullFields is a list of field names (e.g. "Field") to include in API
  1180. // requests with the JSON null value. By default, fields with empty
  1181. // values are omitted from API requests. However, any field with an
  1182. // empty value appearing in NullFields will be sent to the server as
  1183. // null. It is an error if a field in this list has a non-empty value.
  1184. // This may be used to include null fields in Patch requests.
  1185. NullFields []string `json:"-"`
  1186. }
  1187. func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) {
  1188. type NoMethod LogConfigCounterOptions
  1189. raw := NoMethod(*s)
  1190. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1191. }
  1192. // LogConfigDataAccessOptions: Write a Data Access (Gin) log
  1193. type LogConfigDataAccessOptions struct {
  1194. // LogMode: Whether Gin logging should happen in a fail-closed manner at
  1195. // the caller. This is relevant only in the LocalIAM implementation, for
  1196. // now.
  1197. //
  1198. // NOTE: Logging to Gin in a fail-closed manner is currently unsupported
  1199. // while work is being done to satisfy the requirements of go/345.
  1200. // Currently, setting LOG_FAIL_CLOSED mode will have no effect, but
  1201. // still exists because there is active work being done to support it
  1202. // (b/115874152).
  1203. LogMode string `json:"logMode,omitempty"`
  1204. // ForceSendFields is a list of field names (e.g. "LogMode") to
  1205. // unconditionally include in API requests. By default, fields with
  1206. // empty values are omitted from API requests. However, any non-pointer,
  1207. // non-interface field appearing in ForceSendFields will be sent to the
  1208. // server regardless of whether the field is empty or not. This may be
  1209. // used to include empty fields in Patch requests.
  1210. ForceSendFields []string `json:"-"`
  1211. // NullFields is a list of field names (e.g. "LogMode") to include in
  1212. // API requests with the JSON null value. By default, fields with empty
  1213. // values are omitted from API requests. However, any field with an
  1214. // empty value appearing in NullFields will be sent to the server as
  1215. // null. It is an error if a field in this list has a non-empty value.
  1216. // This may be used to include null fields in Patch requests.
  1217. NullFields []string `json:"-"`
  1218. }
  1219. func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) {
  1220. type NoMethod LogConfigDataAccessOptions
  1221. raw := NoMethod(*s)
  1222. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1223. }
  1224. type Manifest struct {
  1225. // Config: Output only. The YAML configuration for this manifest.
  1226. Config *ConfigFile `json:"config,omitempty"`
  1227. // ExpandedConfig: Output only. The fully-expanded configuration file,
  1228. // including any templates and references.
  1229. ExpandedConfig string `json:"expandedConfig,omitempty"`
  1230. Id uint64 `json:"id,omitempty,string"`
  1231. // Imports: Output only. The imported files for this manifest.
  1232. Imports []*ImportFile `json:"imports,omitempty"`
  1233. // InsertTime: Output only. Creation timestamp in RFC3339 text format.
  1234. InsertTime string `json:"insertTime,omitempty"`
  1235. // Layout: Output only. The YAML layout for this manifest.
  1236. Layout string `json:"layout,omitempty"`
  1237. // Name: Output only.
  1238. //
  1239. // The name of the manifest.
  1240. Name string `json:"name,omitempty"`
  1241. // SelfLink: Output only. Self link for the manifest.
  1242. SelfLink string `json:"selfLink,omitempty"`
  1243. // ServerResponse contains the HTTP response code and headers from the
  1244. // server.
  1245. googleapi.ServerResponse `json:"-"`
  1246. // ForceSendFields is a list of field names (e.g. "Config") to
  1247. // unconditionally include in API requests. By default, fields with
  1248. // empty values are omitted from API requests. However, any non-pointer,
  1249. // non-interface field appearing in ForceSendFields will be sent to the
  1250. // server regardless of whether the field is empty or not. This may be
  1251. // used to include empty fields in Patch requests.
  1252. ForceSendFields []string `json:"-"`
  1253. // NullFields is a list of field names (e.g. "Config") to include in API
  1254. // requests with the JSON null value. By default, fields with empty
  1255. // values are omitted from API requests. However, any field with an
  1256. // empty value appearing in NullFields will be sent to the server as
  1257. // null. It is an error if a field in this list has a non-empty value.
  1258. // This may be used to include null fields in Patch requests.
  1259. NullFields []string `json:"-"`
  1260. }
  1261. func (s *Manifest) MarshalJSON() ([]byte, error) {
  1262. type NoMethod Manifest
  1263. raw := NoMethod(*s)
  1264. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1265. }
  1266. // ManifestsListResponse: A response containing a partial list of
  1267. // manifests and a page token used to build the next request if the
  1268. // request has been truncated.
  1269. type ManifestsListResponse struct {
  1270. // Manifests: Output only. Manifests contained in this list response.
  1271. Manifests []*Manifest `json:"manifests,omitempty"`
  1272. // NextPageToken: Output only. A token used to continue a truncated list
  1273. // request.
  1274. NextPageToken string `json:"nextPageToken,omitempty"`
  1275. // ServerResponse contains the HTTP response code and headers from the
  1276. // server.
  1277. googleapi.ServerResponse `json:"-"`
  1278. // ForceSendFields is a list of field names (e.g. "Manifests") to
  1279. // unconditionally include in API requests. By default, fields with
  1280. // empty values are omitted from API requests. However, any non-pointer,
  1281. // non-interface field appearing in ForceSendFields will be sent to the
  1282. // server regardless of whether the field is empty or not. This may be
  1283. // used to include empty fields in Patch requests.
  1284. ForceSendFields []string `json:"-"`
  1285. // NullFields is a list of field names (e.g. "Manifests") to include in
  1286. // API requests with the JSON null value. By default, fields with empty
  1287. // values are omitted from API requests. However, any field with an
  1288. // empty value appearing in NullFields will be sent to the server as
  1289. // null. It is an error if a field in this list has a non-empty value.
  1290. // This may be used to include null fields in Patch requests.
  1291. NullFields []string `json:"-"`
  1292. }
  1293. func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) {
  1294. type NoMethod ManifestsListResponse
  1295. raw := NoMethod(*s)
  1296. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1297. }
  1298. // Operation: An Operation resource, used to manage asynchronous API
  1299. // requests. (== resource_for v1.globalOperations ==) (== resource_for
  1300. // beta.globalOperations ==) (== resource_for v1.regionOperations ==)
  1301. // (== resource_for beta.regionOperations ==) (== resource_for
  1302. // v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
  1303. type Operation struct {
  1304. // ClientOperationId: [Output Only] The value of `requestId` if you
  1305. // provided it in the request. Not present otherwise.
  1306. ClientOperationId string `json:"clientOperationId,omitempty"`
  1307. // CreationTimestamp: [Deprecated] This field is deprecated.
  1308. CreationTimestamp string `json:"creationTimestamp,omitempty"`
  1309. // Description: [Output Only] A textual description of the operation,
  1310. // which is set when the operation is created.
  1311. Description string `json:"description,omitempty"`
  1312. // EndTime: [Output Only] The time that this operation was completed.
  1313. // This value is in RFC3339 text format.
  1314. EndTime string `json:"endTime,omitempty"`
  1315. // Error: [Output Only] If errors are generated during processing of the
  1316. // operation, this field will be populated.
  1317. Error *OperationError `json:"error,omitempty"`
  1318. // HttpErrorMessage: [Output Only] If the operation fails, this field
  1319. // contains the HTTP error message that was returned, such as NOT FOUND.
  1320. HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
  1321. // HttpErrorStatusCode: [Output Only] If the operation fails, this field
  1322. // contains the HTTP error status code that was returned. For example, a
  1323. // 404 means the resource was not found.
  1324. HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
  1325. // Id: [Output Only] The unique identifier for the resource. This
  1326. // identifier is defined by the server.
  1327. Id uint64 `json:"id,omitempty,string"`
  1328. // InsertTime: [Output Only] The time that this operation was requested.
  1329. // This value is in RFC3339 text format.
  1330. InsertTime string `json:"insertTime,omitempty"`
  1331. // Kind: [Output Only] Type of the resource. Always compute#operation
  1332. // for Operation resources.
  1333. Kind string `json:"kind,omitempty"`
  1334. // Name: [Output Only] Name of the resource.
  1335. Name string `json:"name,omitempty"`
  1336. // OperationType: [Output Only] The type of operation, such as insert,
  1337. // update, or delete, and so on.
  1338. OperationType string `json:"operationType,omitempty"`
  1339. // Progress: [Output Only] An optional progress indicator that ranges
  1340. // from 0 to 100. There is no requirement that this be linear or support
  1341. // any granularity of operations. This should not be used to guess when
  1342. // the operation will be complete. This number should monotonically
  1343. // increase as the operation progresses.
  1344. Progress int64 `json:"progress,omitempty"`
  1345. // Region: [Output Only] The URL of the region where the operation
  1346. // resides. Only available when performing regional operations. You must
  1347. // specify this field as part of the HTTP request URL. It is not
  1348. // settable as a field in the request body.
  1349. Region string `json:"region,omitempty"`
  1350. // SelfLink: [Output Only] Server-defined URL for the resource.
  1351. SelfLink string `json:"selfLink,omitempty"`
  1352. // StartTime: [Output Only] The time that this operation was started by
  1353. // the server. This value is in RFC3339 text format.
  1354. StartTime string `json:"startTime,omitempty"`
  1355. // Status: [Output Only] The status of the operation, which can be one
  1356. // of the following: PENDING, RUNNING, or DONE.
  1357. Status string `json:"status,omitempty"`
  1358. // StatusMessage: [Output Only] An optional textual description of the
  1359. // current status of the operation.
  1360. StatusMessage string `json:"statusMessage,omitempty"`
  1361. // TargetId: [Output Only] The unique target ID, which identifies a
  1362. // specific incarnation of the target resource.
  1363. TargetId uint64 `json:"targetId,omitempty,string"`
  1364. // TargetLink: [Output Only] The URL of the resource that the operation
  1365. // modifies. For operations related to creating a snapshot, this points
  1366. // to the persistent disk that the snapshot was created from.
  1367. TargetLink string `json:"targetLink,omitempty"`
  1368. // User: [Output Only] User who requested the operation, for example:
  1369. // user@example.com.
  1370. User string `json:"user,omitempty"`
  1371. // Warnings: [Output Only] If warning messages are generated during
  1372. // processing of the operation, this field will be populated.
  1373. Warnings []*OperationWarnings `json:"warnings,omitempty"`
  1374. // Zone: [Output Only] The URL of the zone where the operation resides.
  1375. // Only available when performing per-zone operations. You must specify
  1376. // this field as part of the HTTP request URL. It is not settable as a
  1377. // field in the request body.
  1378. Zone string `json:"zone,omitempty"`
  1379. // ServerResponse contains the HTTP response code and headers from the
  1380. // server.
  1381. googleapi.ServerResponse `json:"-"`
  1382. // ForceSendFields is a list of field names (e.g. "ClientOperationId")
  1383. // to unconditionally include in API requests. By default, fields with
  1384. // empty values are omitted from API requests. However, any non-pointer,
  1385. // non-interface field appearing in ForceSendFields will be sent to the
  1386. // server regardless of whether the field is empty or not. This may be
  1387. // used to include empty fields in Patch requests.
  1388. ForceSendFields []string `json:"-"`
  1389. // NullFields is a list of field names (e.g. "ClientOperationId") to
  1390. // include in API requests with the JSON null value. By default, fields
  1391. // with empty values are omitted from API requests. However, any field
  1392. // with an empty value appearing in NullFields will be sent to the
  1393. // server as null. It is an error if a field in this list has a
  1394. // non-empty value. This may be used to include null fields in Patch
  1395. // requests.
  1396. NullFields []string `json:"-"`
  1397. }
  1398. func (s *Operation) MarshalJSON() ([]byte, error) {
  1399. type NoMethod Operation
  1400. raw := NoMethod(*s)
  1401. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1402. }
  1403. // OperationError: [Output Only] If errors are generated during
  1404. // processing of the operation, this field will be populated.
  1405. type OperationError struct {
  1406. // Errors: [Output Only] The array of errors encountered while
  1407. // processing this operation.
  1408. Errors []*OperationErrorErrors `json:"errors,omitempty"`
  1409. // ForceSendFields is a list of field names (e.g. "Errors") to
  1410. // unconditionally include in API requests. By default, fields with
  1411. // empty values are omitted from API requests. However, any non-pointer,
  1412. // non-interface field appearing in ForceSendFields will be sent to the
  1413. // server regardless of whether the field is empty or not. This may be
  1414. // used to include empty fields in Patch requests.
  1415. ForceSendFields []string `json:"-"`
  1416. // NullFields is a list of field names (e.g. "Errors") to include in API
  1417. // requests with the JSON null value. By default, fields with empty
  1418. // values are omitted from API requests. However, any field with an
  1419. // empty value appearing in NullFields will be sent to the server as
  1420. // null. It is an error if a field in this list has a non-empty value.
  1421. // This may be used to include null fields in Patch requests.
  1422. NullFields []string `json:"-"`
  1423. }
  1424. func (s *OperationError) MarshalJSON() ([]byte, error) {
  1425. type NoMethod OperationError
  1426. raw := NoMethod(*s)
  1427. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1428. }
  1429. type OperationErrorErrors struct {
  1430. // Code: [Output Only] The error type identifier for this error.
  1431. Code string `json:"code,omitempty"`
  1432. // Location: [Output Only] Indicates the field in the request that
  1433. // caused the error. This property is optional.
  1434. Location string `json:"location,omitempty"`
  1435. // Message: [Output Only] An optional, human-readable error message.
  1436. Message string `json:"message,omitempty"`
  1437. // ForceSendFields is a list of field names (e.g. "Code") to
  1438. // unconditionally include in API requests. By default, fields with
  1439. // empty values are omitted from API requests. However, any non-pointer,
  1440. // non-interface field appearing in ForceSendFields will be sent to the
  1441. // server regardless of whether the field is empty or not. This may be
  1442. // used to include empty fields in Patch requests.
  1443. ForceSendFields []string `json:"-"`
  1444. // NullFields is a list of field names (e.g. "Code") to include in API
  1445. // requests with the JSON null value. By default, fields with empty
  1446. // values are omitted from API requests. However, any field with an
  1447. // empty value appearing in NullFields will be sent to the server as
  1448. // null. It is an error if a field in this list has a non-empty value.
  1449. // This may be used to include null fields in Patch requests.
  1450. NullFields []string `json:"-"`
  1451. }
  1452. func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
  1453. type NoMethod OperationErrorErrors
  1454. raw := NoMethod(*s)
  1455. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1456. }
  1457. type OperationWarnings struct {
  1458. // Code: [Output Only] A warning code, if applicable. For example,
  1459. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1460. // the response.
  1461. Code string `json:"code,omitempty"`
  1462. // Data: [Output Only] Metadata about this warning in key: value format.
  1463. // For example:
  1464. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1465. Data []*OperationWarningsData `json:"data,omitempty"`
  1466. // Message: [Output Only] A human-readable description of the warning
  1467. // code.
  1468. Message string `json:"message,omitempty"`
  1469. // ForceSendFields is a list of field names (e.g. "Code") to
  1470. // unconditionally include in API requests. By default, fields with
  1471. // empty values are omitted from API requests. However, any non-pointer,
  1472. // non-interface field appearing in ForceSendFields will be sent to the
  1473. // server regardless of whether the field is empty or not. This may be
  1474. // used to include empty fields in Patch requests.
  1475. ForceSendFields []string `json:"-"`
  1476. // NullFields is a list of field names (e.g. "Code") to include in API
  1477. // requests with the JSON null value. By default, fields with empty
  1478. // values are omitted from API requests. However, any field with an
  1479. // empty value appearing in NullFields will be sent to the server as
  1480. // null. It is an error if a field in this list has a non-empty value.
  1481. // This may be used to include null fields in Patch requests.
  1482. NullFields []string `json:"-"`
  1483. }
  1484. func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
  1485. type NoMethod OperationWarnings
  1486. raw := NoMethod(*s)
  1487. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1488. }
  1489. type OperationWarningsData struct {
  1490. // Key: [Output Only] A key that provides more detail on the warning
  1491. // being returned. For example, for warnings where there are no results
  1492. // in a list request for a particular zone, this key might be scope and
  1493. // the key value might be the zone name. Other examples might be a key
  1494. // indicating a deprecated resource and a suggested replacement, or a
  1495. // warning about invalid network settings (for example, if an instance
  1496. // attempts to perform IP forwarding but is not enabled for IP
  1497. // forwarding).
  1498. Key string `json:"key,omitempty"`
  1499. // Value: [Output Only] A warning data value corresponding to the key.
  1500. Value string `json:"value,omitempty"`
  1501. // ForceSendFields is a list of field names (e.g. "Key") to
  1502. // unconditionally include in API requests. By default, fields with
  1503. // empty values are omitted from API requests. However, any non-pointer,
  1504. // non-interface field appearing in ForceSendFields will be sent to the
  1505. // server regardless of whether the field is empty or not. This may be
  1506. // used to include empty fields in Patch requests.
  1507. ForceSendFields []string `json:"-"`
  1508. // NullFields is a list of field names (e.g. "Key") to include in API
  1509. // requests with the JSON null value. By default, fields with empty
  1510. // values are omitted from API requests. However, any field with an
  1511. // empty value appearing in NullFields will be sent to the server as
  1512. // null. It is an error if a field in this list has a non-empty value.
  1513. // This may be used to include null fields in Patch requests.
  1514. NullFields []string `json:"-"`
  1515. }
  1516. func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
  1517. type NoMethod OperationWarningsData
  1518. raw := NoMethod(*s)
  1519. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1520. }
  1521. // OperationsListResponse: A response containing a partial list of
  1522. // operations and a page token used to build the next request if the
  1523. // request has been truncated.
  1524. type OperationsListResponse struct {
  1525. // NextPageToken: Output only. A token used to continue a truncated list
  1526. // request.
  1527. NextPageToken string `json:"nextPageToken,omitempty"`
  1528. // Operations: Output only. Operations contained in this list response.
  1529. Operations []*Operation `json:"operations,omitempty"`
  1530. // ServerResponse contains the HTTP response code and headers from the
  1531. // server.
  1532. googleapi.ServerResponse `json:"-"`
  1533. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1534. // unconditionally include in API requests. By default, fields with
  1535. // empty values are omitted from API requests. However, any non-pointer,
  1536. // non-interface field appearing in ForceSendFields will be sent to the
  1537. // server regardless of whether the field is empty or not. This may be
  1538. // used to include empty fields in Patch requests.
  1539. ForceSendFields []string `json:"-"`
  1540. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1541. // in API requests with the JSON null value. By default, fields with
  1542. // empty values are omitted from API requests. However, any field with
  1543. // an empty value appearing in NullFields will be sent to the server as
  1544. // null. It is an error if a field in this list has a non-empty value.
  1545. // This may be used to include null fields in Patch requests.
  1546. NullFields []string `json:"-"`
  1547. }
  1548. func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
  1549. type NoMethod OperationsListResponse
  1550. raw := NoMethod(*s)
  1551. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1552. }
  1553. // Options: Options allows customized resource handling by Deployment
  1554. // Manager.
  1555. type Options struct {
  1556. // AsyncOptions: Options regarding how to thread async requests.
  1557. AsyncOptions []*AsyncOptions `json:"asyncOptions,omitempty"`
  1558. // InputMappings: The mappings that apply for requests.
  1559. InputMappings []*InputMapping `json:"inputMappings,omitempty"`
  1560. // ValidationOptions: Options for how to validate and process properties
  1561. // on a resource.
  1562. ValidationOptions *ValidationOptions `json:"validationOptions,omitempty"`
  1563. // VirtualProperties: Additional properties block described as a
  1564. // jsonSchema, these properties will never be part of the json payload,
  1565. // but they can be consumed by InputMappings, this must be a valid json
  1566. // schema draft-04. The properties specified here will be decouple in a
  1567. // different section. This schema will be merged to the schema
  1568. // validation, and properties here will be extracted From the payload
  1569. // and consumed explicitly by InputMappings. ex: field1: type: string
  1570. // field2: type: number
  1571. VirtualProperties string `json:"virtualProperties,omitempty"`
  1572. // ForceSendFields is a list of field names (e.g. "AsyncOptions") to
  1573. // unconditionally include in API requests. By default, fields with
  1574. // empty values are omitted from API requests. However, any non-pointer,
  1575. // non-interface field appearing in ForceSendFields will be sent to the
  1576. // server regardless of whether the field is empty or not. This may be
  1577. // used to include empty fields in Patch requests.
  1578. ForceSendFields []string `json:"-"`
  1579. // NullFields is a list of field names (e.g. "AsyncOptions") to include
  1580. // in API requests with the JSON null value. By default, fields with
  1581. // empty values are omitted from API requests. However, any field with
  1582. // an empty value appearing in NullFields will be sent to the server as
  1583. // null. It is an error if a field in this list has a non-empty value.
  1584. // This may be used to include null fields in Patch requests.
  1585. NullFields []string `json:"-"`
  1586. }
  1587. func (s *Options) MarshalJSON() ([]byte, error) {
  1588. type NoMethod Options
  1589. raw := NoMethod(*s)
  1590. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1591. }
  1592. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  1593. // used to specify access control policies for Cloud Platform
  1594. // resources.
  1595. //
  1596. //
  1597. //
  1598. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  1599. // of `members` to a `role`, where the members can be user accounts,
  1600. // Google groups, Google domains, and service accounts. A `role` is a
  1601. // named list of permissions defined by IAM.
  1602. //
  1603. // **JSON Example**
  1604. //
  1605. // { "bindings": [ { "role": "roles/owner", "members": [
  1606. // "user:mike@example.com", "group:admins@example.com",
  1607. // "domain:google.com",
  1608. // "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, {
  1609. // "role": "roles/viewer", "members": ["user:sean@example.com"] } ]
  1610. // }
  1611. //
  1612. // **YAML Example**
  1613. //
  1614. // bindings: - members: - user:mike@example.com -
  1615. // group:admins@example.com - domain:google.com -
  1616. // serviceAccount:my-other-app@appspot.gserviceaccount.com role:
  1617. // roles/owner - members: - user:sean@example.com role:
  1618. // roles/viewer
  1619. //
  1620. //
  1621. //
  1622. // For a description of IAM and its features, see the [IAM developer's
  1623. // guide](https://cloud.google.com/iam/docs).
  1624. type Policy struct {
  1625. // AuditConfigs: Specifies cloud audit logging configuration for this
  1626. // policy.
  1627. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1628. // Bindings: Associates a list of `members` to a `role`. `bindings` with
  1629. // no members will result in an error.
  1630. Bindings []*Binding `json:"bindings,omitempty"`
  1631. // Etag: `etag` is used for optimistic concurrency control as a way to
  1632. // help prevent simultaneous updates of a policy from overwriting each
  1633. // other. It is strongly suggested that systems make use of the `etag`
  1634. // in the read-modify-write cycle to perform policy updates in order to
  1635. // avoid race conditions: An `etag` is returned in the response to
  1636. // `getIamPolicy`, and systems are expected to put that etag in the
  1637. // request to `setIamPolicy` to ensure that their change will be applied
  1638. // to the same version of the policy.
  1639. //
  1640. // If no `etag` is provided in the call to `setIamPolicy`, then the
  1641. // existing policy is overwritten blindly.
  1642. Etag string `json:"etag,omitempty"`
  1643. IamOwned bool `json:"iamOwned,omitempty"`
  1644. // Rules: If more than one rule is specified, the rules are applied in
  1645. // the following manner: - All matching LOG rules are always applied. -
  1646. // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging
  1647. // will be applied if one or more matching rule requires logging. -
  1648. // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
  1649. // granted. Logging will be applied if one or more matching rule
  1650. // requires logging. - Otherwise, if no rule applies, permission is
  1651. // denied.
  1652. Rules []*Rule `json:"rules,omitempty"`
  1653. // Version: Deprecated.
  1654. Version int64 `json:"version,omitempty"`
  1655. // ServerResponse contains the HTTP response code and headers from the
  1656. // server.
  1657. googleapi.ServerResponse `json:"-"`
  1658. // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1659. // unconditionally include in API requests. By default, fields with
  1660. // empty values are omitted from API requests. However, any non-pointer,
  1661. // non-interface field appearing in ForceSendFields will be sent to the
  1662. // server regardless of whether the field is empty or not. This may be
  1663. // used to include empty fields in Patch requests.
  1664. ForceSendFields []string `json:"-"`
  1665. // NullFields is a list of field names (e.g. "AuditConfigs") to include
  1666. // in API requests with the JSON null value. By default, fields with
  1667. // empty values are omitted from API requests. However, any field with
  1668. // an empty value appearing in NullFields will be sent to the server as
  1669. // null. It is an error if a field in this list has a non-empty value.
  1670. // This may be used to include null fields in Patch requests.
  1671. NullFields []string `json:"-"`
  1672. }
  1673. func (s *Policy) MarshalJSON() ([]byte, error) {
  1674. type NoMethod Policy
  1675. raw := NoMethod(*s)
  1676. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1677. }
  1678. type PollingOptions struct {
  1679. // Diagnostics: An array of diagnostics to be collected by Deployment
  1680. // Manager, these diagnostics will be displayed to the user.
  1681. Diagnostics []*Diagnostic `json:"diagnostics,omitempty"`
  1682. // FailCondition: JsonPath expression that determines if the request
  1683. // failed.
  1684. FailCondition string `json:"failCondition,omitempty"`
  1685. // FinishCondition: JsonPath expression that determines if the request
  1686. // is completed.
  1687. FinishCondition string `json:"finishCondition,omitempty"`
  1688. // PollingLink: JsonPath expression that evaluates to string, it
  1689. // indicates where to poll.
  1690. PollingLink string `json:"pollingLink,omitempty"`
  1691. // TargetLink: JsonPath expression, after polling is completed,
  1692. // indicates where to fetch the resource.
  1693. TargetLink string `json:"targetLink,omitempty"`
  1694. // ForceSendFields is a list of field names (e.g. "Diagnostics") to
  1695. // unconditionally include in API requests. By default, fields with
  1696. // empty values are omitted from API requests. However, any non-pointer,
  1697. // non-interface field appearing in ForceSendFields will be sent to the
  1698. // server regardless of whether the field is empty or not. This may be
  1699. // used to include empty fields in Patch requests.
  1700. ForceSendFields []string `json:"-"`
  1701. // NullFields is a list of field names (e.g. "Diagnostics") to include
  1702. // in API requests with the JSON null value. By default, fields with
  1703. // empty values are omitted from API requests. However, any field with
  1704. // an empty value appearing in NullFields will be sent to the server as
  1705. // null. It is an error if a field in this list has a non-empty value.
  1706. // This may be used to include null fields in Patch requests.
  1707. NullFields []string `json:"-"`
  1708. }
  1709. func (s *PollingOptions) MarshalJSON() ([]byte, error) {
  1710. type NoMethod PollingOptions
  1711. raw := NoMethod(*s)
  1712. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1713. }
  1714. type Resource struct {
  1715. // AccessControl: The Access Control Policy set on this resource.
  1716. AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
  1717. // FinalProperties: Output only. The evaluated properties of the
  1718. // resource with references expanded. Returned as serialized YAML.
  1719. FinalProperties string `json:"finalProperties,omitempty"`
  1720. Id uint64 `json:"id,omitempty,string"`
  1721. // InsertTime: Output only. Creation timestamp in RFC3339 text format.
  1722. InsertTime string `json:"insertTime,omitempty"`
  1723. // Manifest: Output only. URL of the manifest representing the current
  1724. // configuration of this resource.
  1725. Manifest string `json:"manifest,omitempty"`
  1726. // Name: Output only. The name of the resource as it appears in the YAML
  1727. // config.
  1728. Name string `json:"name,omitempty"`
  1729. // Properties: Output only. The current properties of the resource
  1730. // before any references have been filled in. Returned as serialized
  1731. // YAML.
  1732. Properties string `json:"properties,omitempty"`
  1733. // Type: Output only. The type of the resource, for example
  1734. // compute.v1.instance, or cloudfunctions.v1beta1.function.
  1735. Type string `json:"type,omitempty"`
  1736. // Update: Output only. If Deployment Manager is currently updating or
  1737. // previewing an update to this resource, the updated configuration
  1738. // appears here.
  1739. Update *ResourceUpdate `json:"update,omitempty"`
  1740. // UpdateTime: Output only. Update timestamp in RFC3339 text format.
  1741. UpdateTime string `json:"updateTime,omitempty"`
  1742. // Url: Output only. The URL of the actual resource.
  1743. Url string `json:"url,omitempty"`
  1744. // Warnings: Output only. If warning messages are generated during
  1745. // processing of this resource, this field will be populated.
  1746. Warnings []*ResourceWarnings `json:"warnings,omitempty"`
  1747. // ServerResponse contains the HTTP response code and headers from the
  1748. // server.
  1749. googleapi.ServerResponse `json:"-"`
  1750. // ForceSendFields is a list of field names (e.g. "AccessControl") to
  1751. // unconditionally include in API requests. By default, fields with
  1752. // empty values are omitted from API requests. However, any non-pointer,
  1753. // non-interface field appearing in ForceSendFields will be sent to the
  1754. // server regardless of whether the field is empty or not. This may be
  1755. // used to include empty fields in Patch requests.
  1756. ForceSendFields []string `json:"-"`
  1757. // NullFields is a list of field names (e.g. "AccessControl") to include
  1758. // in API requests with the JSON null value. By default, fields with
  1759. // empty values are omitted from API requests. However, any field with
  1760. // an empty value appearing in NullFields will be sent to the server as
  1761. // null. It is an error if a field in this list has a non-empty value.
  1762. // This may be used to include null fields in Patch requests.
  1763. NullFields []string `json:"-"`
  1764. }
  1765. func (s *Resource) MarshalJSON() ([]byte, error) {
  1766. type NoMethod Resource
  1767. raw := NoMethod(*s)
  1768. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1769. }
  1770. type ResourceWarnings struct {
  1771. // Code: [Output Only] A warning code, if applicable. For example,
  1772. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1773. // the response.
  1774. Code string `json:"code,omitempty"`
  1775. // Data: [Output Only] Metadata about this warning in key: value format.
  1776. // For example:
  1777. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1778. Data []*ResourceWarningsData `json:"data,omitempty"`
  1779. // Message: [Output Only] A human-readable description of the warning
  1780. // code.
  1781. Message string `json:"message,omitempty"`
  1782. // ForceSendFields is a list of field names (e.g. "Code") to
  1783. // unconditionally include in API requests. By default, fields with
  1784. // empty values are omitted from API requests. However, any non-pointer,
  1785. // non-interface field appearing in ForceSendFields will be sent to the
  1786. // server regardless of whether the field is empty or not. This may be
  1787. // used to include empty fields in Patch requests.
  1788. ForceSendFields []string `json:"-"`
  1789. // NullFields is a list of field names (e.g. "Code") to include in API
  1790. // requests with the JSON null value. By default, fields with empty
  1791. // values are omitted from API requests. However, any field with an
  1792. // empty value appearing in NullFields will be sent to the server as
  1793. // null. It is an error if a field in this list has a non-empty value.
  1794. // This may be used to include null fields in Patch requests.
  1795. NullFields []string `json:"-"`
  1796. }
  1797. func (s *ResourceWarnings) MarshalJSON() ([]byte, error) {
  1798. type NoMethod ResourceWarnings
  1799. raw := NoMethod(*s)
  1800. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1801. }
  1802. type ResourceWarningsData struct {
  1803. // Key: [Output Only] A key that provides more detail on the warning
  1804. // being returned. For example, for warnings where there are no results
  1805. // in a list request for a particular zone, this key might be scope and
  1806. // the key value might be the zone name. Other examples might be a key
  1807. // indicating a deprecated resource and a suggested replacement, or a
  1808. // warning about invalid network settings (for example, if an instance
  1809. // attempts to perform IP forwarding but is not enabled for IP
  1810. // forwarding).
  1811. Key string `json:"key,omitempty"`
  1812. // Value: [Output Only] A warning data value corresponding to the key.
  1813. Value string `json:"value,omitempty"`
  1814. // ForceSendFields is a list of field names (e.g. "Key") to
  1815. // unconditionally include in API requests. By default, fields with
  1816. // empty values are omitted from API requests. However, any non-pointer,
  1817. // non-interface field appearing in ForceSendFields will be sent to the
  1818. // server regardless of whether the field is empty or not. This may be
  1819. // used to include empty fields in Patch requests.
  1820. ForceSendFields []string `json:"-"`
  1821. // NullFields is a list of field names (e.g. "Key") to include in API
  1822. // requests with the JSON null value. By default, fields with empty
  1823. // values are omitted from API requests. However, any field with an
  1824. // empty value appearing in NullFields will be sent to the server as
  1825. // null. It is an error if a field in this list has a non-empty value.
  1826. // This may be used to include null fields in Patch requests.
  1827. NullFields []string `json:"-"`
  1828. }
  1829. func (s *ResourceWarningsData) MarshalJSON() ([]byte, error) {
  1830. type NoMethod ResourceWarningsData
  1831. raw := NoMethod(*s)
  1832. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1833. }
  1834. // ResourceAccessControl: The access controls set on the resource.
  1835. type ResourceAccessControl struct {
  1836. // GcpIamPolicy: The GCP IAM Policy to set on the resource.
  1837. GcpIamPolicy string `json:"gcpIamPolicy,omitempty"`
  1838. // ForceSendFields is a list of field names (e.g. "GcpIamPolicy") to
  1839. // unconditionally include in API requests. By default, fields with
  1840. // empty values are omitted from API requests. However, any non-pointer,
  1841. // non-interface field appearing in ForceSendFields will be sent to the
  1842. // server regardless of whether the field is empty or not. This may be
  1843. // used to include empty fields in Patch requests.
  1844. ForceSendFields []string `json:"-"`
  1845. // NullFields is a list of field names (e.g. "GcpIamPolicy") to include
  1846. // in API requests with the JSON null value. By default, fields with
  1847. // empty values are omitted from API requests. However, any field with
  1848. // an empty value appearing in NullFields will be sent to the server as
  1849. // null. It is an error if a field in this list has a non-empty value.
  1850. // This may be used to include null fields in Patch requests.
  1851. NullFields []string `json:"-"`
  1852. }
  1853. func (s *ResourceAccessControl) MarshalJSON() ([]byte, error) {
  1854. type NoMethod ResourceAccessControl
  1855. raw := NoMethod(*s)
  1856. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1857. }
  1858. type ResourceUpdate struct {
  1859. // AccessControl: The Access Control Policy to set on this resource
  1860. // after updating the resource itself.
  1861. AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
  1862. // Error: Output only. If errors are generated during update of the
  1863. // resource, this field will be populated.
  1864. Error *ResourceUpdateError `json:"error,omitempty"`
  1865. // FinalProperties: Output only. The expanded properties of the resource
  1866. // with reference values expanded. Returned as serialized YAML.
  1867. FinalProperties string `json:"finalProperties,omitempty"`
  1868. // Intent: Output only. The intent of the resource: PREVIEW, UPDATE, or
  1869. // CANCEL.
  1870. Intent string `json:"intent,omitempty"`
  1871. // Manifest: Output only. URL of the manifest representing the update
  1872. // configuration of this resource.
  1873. Manifest string `json:"manifest,omitempty"`
  1874. // Properties: Output only. The set of updated properties for this
  1875. // resource, before references are expanded. Returned as serialized
  1876. // YAML.
  1877. Properties string `json:"properties,omitempty"`
  1878. // State: Output only. The state of the resource.
  1879. State string `json:"state,omitempty"`
  1880. // Warnings: Output only. If warning messages are generated during
  1881. // processing of this resource, this field will be populated.
  1882. Warnings []*ResourceUpdateWarnings `json:"warnings,omitempty"`
  1883. // ForceSendFields is a list of field names (e.g. "AccessControl") to
  1884. // unconditionally include in API requests. By default, fields with
  1885. // empty values are omitted from API requests. However, any non-pointer,
  1886. // non-interface field appearing in ForceSendFields will be sent to the
  1887. // server regardless of whether the field is empty or not. This may be
  1888. // used to include empty fields in Patch requests.
  1889. ForceSendFields []string `json:"-"`
  1890. // NullFields is a list of field names (e.g. "AccessControl") to include
  1891. // in API requests with the JSON null value. By default, fields with
  1892. // empty values are omitted from API requests. However, any field with
  1893. // an empty value appearing in NullFields will be sent to the server as
  1894. // null. It is an error if a field in this list has a non-empty value.
  1895. // This may be used to include null fields in Patch requests.
  1896. NullFields []string `json:"-"`
  1897. }
  1898. func (s *ResourceUpdate) MarshalJSON() ([]byte, error) {
  1899. type NoMethod ResourceUpdate
  1900. raw := NoMethod(*s)
  1901. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1902. }
  1903. // ResourceUpdateError: Output only. If errors are generated during
  1904. // update of the resource, this field will be populated.
  1905. type ResourceUpdateError struct {
  1906. // Errors: [Output Only] The array of errors encountered while
  1907. // processing this operation.
  1908. Errors []*ResourceUpdateErrorErrors `json:"errors,omitempty"`
  1909. // ForceSendFields is a list of field names (e.g. "Errors") to
  1910. // unconditionally include in API requests. By default, fields with
  1911. // empty values are omitted from API requests. However, any non-pointer,
  1912. // non-interface field appearing in ForceSendFields will be sent to the
  1913. // server regardless of whether the field is empty or not. This may be
  1914. // used to include empty fields in Patch requests.
  1915. ForceSendFields []string `json:"-"`
  1916. // NullFields is a list of field names (e.g. "Errors") to include in API
  1917. // requests with the JSON null value. By default, fields with empty
  1918. // values are omitted from API requests. However, any field with an
  1919. // empty value appearing in NullFields will be sent to the server as
  1920. // null. It is an error if a field in this list has a non-empty value.
  1921. // This may be used to include null fields in Patch requests.
  1922. NullFields []string `json:"-"`
  1923. }
  1924. func (s *ResourceUpdateError) MarshalJSON() ([]byte, error) {
  1925. type NoMethod ResourceUpdateError
  1926. raw := NoMethod(*s)
  1927. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1928. }
  1929. type ResourceUpdateErrorErrors struct {
  1930. // Code: [Output Only] The error type identifier for this error.
  1931. Code string `json:"code,omitempty"`
  1932. // Location: [Output Only] Indicates the field in the request that
  1933. // caused the error. This property is optional.
  1934. Location string `json:"location,omitempty"`
  1935. // Message: [Output Only] An optional, human-readable error message.
  1936. Message string `json:"message,omitempty"`
  1937. // ForceSendFields is a list of field names (e.g. "Code") to
  1938. // unconditionally include in API requests. By default, fields with
  1939. // empty values are omitted from API requests. However, any non-pointer,
  1940. // non-interface field appearing in ForceSendFields will be sent to the
  1941. // server regardless of whether the field is empty or not. This may be
  1942. // used to include empty fields in Patch requests.
  1943. ForceSendFields []string `json:"-"`
  1944. // NullFields is a list of field names (e.g. "Code") to include in API
  1945. // requests with the JSON null value. By default, fields with empty
  1946. // values are omitted from API requests. However, any field with an
  1947. // empty value appearing in NullFields will be sent to the server as
  1948. // null. It is an error if a field in this list has a non-empty value.
  1949. // This may be used to include null fields in Patch requests.
  1950. NullFields []string `json:"-"`
  1951. }
  1952. func (s *ResourceUpdateErrorErrors) MarshalJSON() ([]byte, error) {
  1953. type NoMethod ResourceUpdateErrorErrors
  1954. raw := NoMethod(*s)
  1955. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1956. }
  1957. type ResourceUpdateWarnings struct {
  1958. // Code: [Output Only] A warning code, if applicable. For example,
  1959. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1960. // the response.
  1961. Code string `json:"code,omitempty"`
  1962. // Data: [Output Only] Metadata about this warning in key: value format.
  1963. // For example:
  1964. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1965. Data []*ResourceUpdateWarningsData `json:"data,omitempty"`
  1966. // Message: [Output Only] A human-readable description of the warning
  1967. // code.
  1968. Message string `json:"message,omitempty"`
  1969. // ForceSendFields is a list of field names (e.g. "Code") to
  1970. // unconditionally include in API requests. By default, fields with
  1971. // empty values are omitted from API requests. However, any non-pointer,
  1972. // non-interface field appearing in ForceSendFields will be sent to the
  1973. // server regardless of whether the field is empty or not. This may be
  1974. // used to include empty fields in Patch requests.
  1975. ForceSendFields []string `json:"-"`
  1976. // NullFields is a list of field names (e.g. "Code") to include in API
  1977. // requests with the JSON null value. By default, fields with empty
  1978. // values are omitted from API requests. However, any field with an
  1979. // empty value appearing in NullFields will be sent to the server as
  1980. // null. It is an error if a field in this list has a non-empty value.
  1981. // This may be used to include null fields in Patch requests.
  1982. NullFields []string `json:"-"`
  1983. }
  1984. func (s *ResourceUpdateWarnings) MarshalJSON() ([]byte, error) {
  1985. type NoMethod ResourceUpdateWarnings
  1986. raw := NoMethod(*s)
  1987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1988. }
  1989. type ResourceUpdateWarningsData struct {
  1990. // Key: [Output Only] A key that provides more detail on the warning
  1991. // being returned. For example, for warnings where there are no results
  1992. // in a list request for a particular zone, this key might be scope and
  1993. // the key value might be the zone name. Other examples might be a key
  1994. // indicating a deprecated resource and a suggested replacement, or a
  1995. // warning about invalid network settings (for example, if an instance
  1996. // attempts to perform IP forwarding but is not enabled for IP
  1997. // forwarding).
  1998. Key string `json:"key,omitempty"`
  1999. // Value: [Output Only] A warning data value corresponding to the key.
  2000. Value string `json:"value,omitempty"`
  2001. // ForceSendFields is a list of field names (e.g. "Key") to
  2002. // unconditionally include in API requests. By default, fields with
  2003. // empty values are omitted from API requests. However, any non-pointer,
  2004. // non-interface field appearing in ForceSendFields will be sent to the
  2005. // server regardless of whether the field is empty or not. This may be
  2006. // used to include empty fields in Patch requests.
  2007. ForceSendFields []string `json:"-"`
  2008. // NullFields is a list of field names (e.g. "Key") to include in API
  2009. // requests with the JSON null value. By default, fields with empty
  2010. // values are omitted from API requests. However, any field with an
  2011. // empty value appearing in NullFields will be sent to the server as
  2012. // null. It is an error if a field in this list has a non-empty value.
  2013. // This may be used to include null fields in Patch requests.
  2014. NullFields []string `json:"-"`
  2015. }
  2016. func (s *ResourceUpdateWarningsData) MarshalJSON() ([]byte, error) {
  2017. type NoMethod ResourceUpdateWarningsData
  2018. raw := NoMethod(*s)
  2019. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2020. }
  2021. // ResourcesListResponse: A response containing a partial list of
  2022. // resources and a page token used to build the next request if the
  2023. // request has been truncated.
  2024. type ResourcesListResponse struct {
  2025. // NextPageToken: A token used to continue a truncated list request.
  2026. NextPageToken string `json:"nextPageToken,omitempty"`
  2027. // Resources: Resources contained in this list response.
  2028. Resources []*Resource `json:"resources,omitempty"`
  2029. // ServerResponse contains the HTTP response code and headers from the
  2030. // server.
  2031. googleapi.ServerResponse `json:"-"`
  2032. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2033. // unconditionally include in API requests. By default, fields with
  2034. // empty values are omitted from API requests. However, any non-pointer,
  2035. // non-interface field appearing in ForceSendFields will be sent to the
  2036. // server regardless of whether the field is empty or not. This may be
  2037. // used to include empty fields in Patch requests.
  2038. ForceSendFields []string `json:"-"`
  2039. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2040. // in API requests with the JSON null value. By default, fields with
  2041. // empty values are omitted from API requests. However, any field with
  2042. // an empty value appearing in NullFields will be sent to the server as
  2043. // null. It is an error if a field in this list has a non-empty value.
  2044. // This may be used to include null fields in Patch requests.
  2045. NullFields []string `json:"-"`
  2046. }
  2047. func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) {
  2048. type NoMethod ResourcesListResponse
  2049. raw := NoMethod(*s)
  2050. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2051. }
  2052. // Rule: A rule to be applied in a Policy.
  2053. type Rule struct {
  2054. // Action: Required
  2055. Action string `json:"action,omitempty"`
  2056. // Conditions: Additional restrictions that must be met. All conditions
  2057. // must pass for the rule to match.
  2058. Conditions []*Condition `json:"conditions,omitempty"`
  2059. // Description: Human-readable description of the rule.
  2060. Description string `json:"description,omitempty"`
  2061. // Ins: If one or more 'in' clauses are specified, the rule matches if
  2062. // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
  2063. Ins []string `json:"ins,omitempty"`
  2064. // LogConfigs: The config returned to callers of
  2065. // tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
  2066. LogConfigs []*LogConfig `json:"logConfigs,omitempty"`
  2067. // NotIns: If one or more 'not_in' clauses are specified, the rule
  2068. // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the
  2069. // entries.
  2070. NotIns []string `json:"notIns,omitempty"`
  2071. // Permissions: A permission is a string of form '..' (e.g.,
  2072. // 'storage.buckets.list'). A value of '*' matches all permissions, and
  2073. // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
  2074. Permissions []string `json:"permissions,omitempty"`
  2075. // ForceSendFields is a list of field names (e.g. "Action") to
  2076. // unconditionally include in API requests. By default, fields with
  2077. // empty values are omitted from API requests. However, any non-pointer,
  2078. // non-interface field appearing in ForceSendFields will be sent to the
  2079. // server regardless of whether the field is empty or not. This may be
  2080. // used to include empty fields in Patch requests.
  2081. ForceSendFields []string `json:"-"`
  2082. // NullFields is a list of field names (e.g. "Action") to include in API
  2083. // requests with the JSON null value. By default, fields with empty
  2084. // values are omitted from API requests. However, any field with an
  2085. // empty value appearing in NullFields will be sent to the server as
  2086. // null. It is an error if a field in this list has a non-empty value.
  2087. // This may be used to include null fields in Patch requests.
  2088. NullFields []string `json:"-"`
  2089. }
  2090. func (s *Rule) MarshalJSON() ([]byte, error) {
  2091. type NoMethod Rule
  2092. raw := NoMethod(*s)
  2093. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2094. }
  2095. // ServiceAccount: Service Account used as a credential.
  2096. type ServiceAccount struct {
  2097. // Email: The IAM service account email address like
  2098. // test@myproject.iam.gserviceaccount.com
  2099. Email string `json:"email,omitempty"`
  2100. // ForceSendFields is a list of field names (e.g. "Email") to
  2101. // unconditionally include in API requests. By default, fields with
  2102. // empty values are omitted from API requests. However, any non-pointer,
  2103. // non-interface field appearing in ForceSendFields will be sent to the
  2104. // server regardless of whether the field is empty or not. This may be
  2105. // used to include empty fields in Patch requests.
  2106. ForceSendFields []string `json:"-"`
  2107. // NullFields is a list of field names (e.g. "Email") to include in API
  2108. // requests with the JSON null value. By default, fields with empty
  2109. // values are omitted from API requests. However, any field with an
  2110. // empty value appearing in NullFields will be sent to the server as
  2111. // null. It is an error if a field in this list has a non-empty value.
  2112. // This may be used to include null fields in Patch requests.
  2113. NullFields []string `json:"-"`
  2114. }
  2115. func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  2116. type NoMethod ServiceAccount
  2117. raw := NoMethod(*s)
  2118. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2119. }
  2120. type TargetConfiguration struct {
  2121. // Config: The configuration to use for this deployment.
  2122. Config *ConfigFile `json:"config,omitempty"`
  2123. // Imports: Specifies any files to import for this configuration. This
  2124. // can be used to import templates or other files. For example, you
  2125. // might import a text file in order to use the file in a template.
  2126. Imports []*ImportFile `json:"imports,omitempty"`
  2127. // ForceSendFields is a list of field names (e.g. "Config") to
  2128. // unconditionally include in API requests. By default, fields with
  2129. // empty values are omitted from API requests. However, any non-pointer,
  2130. // non-interface field appearing in ForceSendFields will be sent to the
  2131. // server regardless of whether the field is empty or not. This may be
  2132. // used to include empty fields in Patch requests.
  2133. ForceSendFields []string `json:"-"`
  2134. // NullFields is a list of field names (e.g. "Config") to include in API
  2135. // requests with the JSON null value. By default, fields with empty
  2136. // values are omitted from API requests. However, any field with an
  2137. // empty value appearing in NullFields will be sent to the server as
  2138. // null. It is an error if a field in this list has a non-empty value.
  2139. // This may be used to include null fields in Patch requests.
  2140. NullFields []string `json:"-"`
  2141. }
  2142. func (s *TargetConfiguration) MarshalJSON() ([]byte, error) {
  2143. type NoMethod TargetConfiguration
  2144. raw := NoMethod(*s)
  2145. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2146. }
  2147. // TemplateContents: Files that make up the template contents of a
  2148. // template type.
  2149. type TemplateContents struct {
  2150. // Imports: Import files referenced by the main template.
  2151. Imports []*ImportFile `json:"imports,omitempty"`
  2152. // Interpreter: Which interpreter (python or jinja) should be used
  2153. // during expansion.
  2154. Interpreter string `json:"interpreter,omitempty"`
  2155. // MainTemplate: The filename of the mainTemplate
  2156. MainTemplate string `json:"mainTemplate,omitempty"`
  2157. // Schema: The contents of the template schema.
  2158. Schema string `json:"schema,omitempty"`
  2159. // Template: The contents of the main template file.
  2160. Template string `json:"template,omitempty"`
  2161. // ForceSendFields is a list of field names (e.g. "Imports") to
  2162. // unconditionally include in API requests. By default, fields with
  2163. // empty values are omitted from API requests. However, any non-pointer,
  2164. // non-interface field appearing in ForceSendFields will be sent to the
  2165. // server regardless of whether the field is empty or not. This may be
  2166. // used to include empty fields in Patch requests.
  2167. ForceSendFields []string `json:"-"`
  2168. // NullFields is a list of field names (e.g. "Imports") to include in
  2169. // API requests with the JSON null value. By default, fields with empty
  2170. // values are omitted from API requests. However, any field with an
  2171. // empty value appearing in NullFields will be sent to the server as
  2172. // null. It is an error if a field in this list has a non-empty value.
  2173. // This may be used to include null fields in Patch requests.
  2174. NullFields []string `json:"-"`
  2175. }
  2176. func (s *TemplateContents) MarshalJSON() ([]byte, error) {
  2177. type NoMethod TemplateContents
  2178. raw := NoMethod(*s)
  2179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2180. }
  2181. type TestPermissionsRequest struct {
  2182. // Permissions: The set of permissions to check for the 'resource'.
  2183. // Permissions with wildcards (such as '*' or 'storage.*') are not
  2184. // allowed.
  2185. Permissions []string `json:"permissions,omitempty"`
  2186. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2187. // unconditionally include in API requests. By default, fields with
  2188. // empty values are omitted from API requests. However, any non-pointer,
  2189. // non-interface field appearing in ForceSendFields will be sent to the
  2190. // server regardless of whether the field is empty or not. This may be
  2191. // used to include empty fields in Patch requests.
  2192. ForceSendFields []string `json:"-"`
  2193. // NullFields is a list of field names (e.g. "Permissions") to include
  2194. // in API requests with the JSON null value. By default, fields with
  2195. // empty values are omitted from API requests. However, any field with
  2196. // an empty value appearing in NullFields will be sent to the server as
  2197. // null. It is an error if a field in this list has a non-empty value.
  2198. // This may be used to include null fields in Patch requests.
  2199. NullFields []string `json:"-"`
  2200. }
  2201. func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) {
  2202. type NoMethod TestPermissionsRequest
  2203. raw := NoMethod(*s)
  2204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2205. }
  2206. type TestPermissionsResponse struct {
  2207. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  2208. // the caller is allowed.
  2209. Permissions []string `json:"permissions,omitempty"`
  2210. // ServerResponse contains the HTTP response code and headers from the
  2211. // server.
  2212. googleapi.ServerResponse `json:"-"`
  2213. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2214. // unconditionally include in API requests. By default, fields with
  2215. // empty values are omitted from API requests. However, any non-pointer,
  2216. // non-interface field appearing in ForceSendFields will be sent to the
  2217. // server regardless of whether the field is empty or not. This may be
  2218. // used to include empty fields in Patch requests.
  2219. ForceSendFields []string `json:"-"`
  2220. // NullFields is a list of field names (e.g. "Permissions") to include
  2221. // in API requests with the JSON null value. By default, fields with
  2222. // empty values are omitted from API requests. However, any field with
  2223. // an empty value appearing in NullFields will be sent to the server as
  2224. // null. It is an error if a field in this list has a non-empty value.
  2225. // This may be used to include null fields in Patch requests.
  2226. NullFields []string `json:"-"`
  2227. }
  2228. func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) {
  2229. type NoMethod TestPermissionsResponse
  2230. raw := NoMethod(*s)
  2231. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2232. }
  2233. // Type: A resource type supported by Deployment Manager.
  2234. type Type struct {
  2235. // Base: Base Type (configurable service) that backs this Type.
  2236. Base *BaseType `json:"base,omitempty"`
  2237. // Description: An optional textual description of the resource;
  2238. // provided by the client when the resource is created.
  2239. Description string `json:"description,omitempty"`
  2240. Id uint64 `json:"id,omitempty,string"`
  2241. // InsertTime: Output only. Creation timestamp in RFC3339 text format.
  2242. InsertTime string `json:"insertTime,omitempty"`
  2243. // Labels: Map of labels; provided by the client when the resource is
  2244. // created or updated. Specifically: Label keys must be between 1 and 63
  2245. // characters long and must conform to the following regular expression:
  2246. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  2247. // characters long and must conform to the regular expression
  2248. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  2249. Labels []*TypeLabelEntry `json:"labels,omitempty"`
  2250. // Name: Name of the type.
  2251. Name string `json:"name,omitempty"`
  2252. // Operation: Output only. The Operation that most recently ran, or is
  2253. // currently running, on this type.
  2254. Operation *Operation `json:"operation,omitempty"`
  2255. // SelfLink: Output only. Server defined URL for the resource.
  2256. SelfLink string `json:"selfLink,omitempty"`
  2257. // ForceSendFields is a list of field names (e.g. "Base") to
  2258. // unconditionally include in API requests. By default, fields with
  2259. // empty values are omitted from API requests. However, any non-pointer,
  2260. // non-interface field appearing in ForceSendFields will be sent to the
  2261. // server regardless of whether the field is empty or not. This may be
  2262. // used to include empty fields in Patch requests.
  2263. ForceSendFields []string `json:"-"`
  2264. // NullFields is a list of field names (e.g. "Base") to include in API
  2265. // requests with the JSON null value. By default, fields with empty
  2266. // values are omitted from API requests. However, any field with an
  2267. // empty value appearing in NullFields will be sent to the server as
  2268. // null. It is an error if a field in this list has a non-empty value.
  2269. // This may be used to include null fields in Patch requests.
  2270. NullFields []string `json:"-"`
  2271. }
  2272. func (s *Type) MarshalJSON() ([]byte, error) {
  2273. type NoMethod Type
  2274. raw := NoMethod(*s)
  2275. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2276. }
  2277. // TypeInfo: Type Information. Contains detailed information about a
  2278. // composite type, base type, or base type with specific collection.
  2279. type TypeInfo struct {
  2280. // Description: The description of the type.
  2281. Description string `json:"description,omitempty"`
  2282. // DocumentationLink: For swagger 2.0 externalDocs field will be used.
  2283. // For swagger 1.2 this field will be empty.
  2284. DocumentationLink string `json:"documentationLink,omitempty"`
  2285. // Kind: Output only. Type of the output. Always
  2286. // deploymentManager#TypeInfo for TypeInfo.
  2287. Kind string `json:"kind,omitempty"`
  2288. // Name: The base type or composite type name.
  2289. Name string `json:"name,omitempty"`
  2290. // Schema: For base types with a collection, we return a schema and
  2291. // documentation link For template types, we return only a schema
  2292. Schema *TypeInfoSchemaInfo `json:"schema,omitempty"`
  2293. // SelfLink: Output only. Self link for the type provider.
  2294. SelfLink string `json:"selfLink,omitempty"`
  2295. // Title: The title on the API descriptor URL provided.
  2296. Title string `json:"title,omitempty"`
  2297. // ServerResponse contains the HTTP response code and headers from the
  2298. // server.
  2299. googleapi.ServerResponse `json:"-"`
  2300. // ForceSendFields is a list of field names (e.g. "Description") to
  2301. // unconditionally include in API requests. By default, fields with
  2302. // empty values are omitted from API requests. However, any non-pointer,
  2303. // non-interface field appearing in ForceSendFields will be sent to the
  2304. // server regardless of whether the field is empty or not. This may be
  2305. // used to include empty fields in Patch requests.
  2306. ForceSendFields []string `json:"-"`
  2307. // NullFields is a list of field names (e.g. "Description") to include
  2308. // in API requests with the JSON null value. By default, fields with
  2309. // empty values are omitted from API requests. However, any field with
  2310. // an empty value appearing in NullFields will be sent to the server as
  2311. // null. It is an error if a field in this list has a non-empty value.
  2312. // This may be used to include null fields in Patch requests.
  2313. NullFields []string `json:"-"`
  2314. }
  2315. func (s *TypeInfo) MarshalJSON() ([]byte, error) {
  2316. type NoMethod TypeInfo
  2317. raw := NoMethod(*s)
  2318. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2319. }
  2320. type TypeInfoSchemaInfo struct {
  2321. // Input: The properties that this composite type or base type
  2322. // collection accept as input, represented as a json blob, format is:
  2323. // JSON Schema Draft V4
  2324. Input string `json:"input,omitempty"`
  2325. // Output: The properties that this composite type or base type
  2326. // collection exposes as output, these properties can be used for
  2327. // references, represented as json blob, format is: JSON Schema Draft V4
  2328. Output string `json:"output,omitempty"`
  2329. // ForceSendFields is a list of field names (e.g. "Input") to
  2330. // unconditionally include in API requests. By default, fields with
  2331. // empty values are omitted from API requests. However, any non-pointer,
  2332. // non-interface field appearing in ForceSendFields will be sent to the
  2333. // server regardless of whether the field is empty or not. This may be
  2334. // used to include empty fields in Patch requests.
  2335. ForceSendFields []string `json:"-"`
  2336. // NullFields is a list of field names (e.g. "Input") to include in API
  2337. // requests with the JSON null value. By default, fields with empty
  2338. // values are omitted from API requests. However, any field with an
  2339. // empty value appearing in NullFields will be sent to the server as
  2340. // null. It is an error if a field in this list has a non-empty value.
  2341. // This may be used to include null fields in Patch requests.
  2342. NullFields []string `json:"-"`
  2343. }
  2344. func (s *TypeInfoSchemaInfo) MarshalJSON() ([]byte, error) {
  2345. type NoMethod TypeInfoSchemaInfo
  2346. raw := NoMethod(*s)
  2347. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2348. }
  2349. type TypeLabelEntry struct {
  2350. Key string `json:"key,omitempty"`
  2351. Value string `json:"value,omitempty"`
  2352. // ForceSendFields is a list of field names (e.g. "Key") to
  2353. // unconditionally include in API requests. By default, fields with
  2354. // empty values are omitted from API requests. However, any non-pointer,
  2355. // non-interface field appearing in ForceSendFields will be sent to the
  2356. // server regardless of whether the field is empty or not. This may be
  2357. // used to include empty fields in Patch requests.
  2358. ForceSendFields []string `json:"-"`
  2359. // NullFields is a list of field names (e.g. "Key") to include in API
  2360. // requests with the JSON null value. By default, fields with empty
  2361. // values are omitted from API requests. However, any field with an
  2362. // empty value appearing in NullFields will be sent to the server as
  2363. // null. It is an error if a field in this list has a non-empty value.
  2364. // This may be used to include null fields in Patch requests.
  2365. NullFields []string `json:"-"`
  2366. }
  2367. func (s *TypeLabelEntry) MarshalJSON() ([]byte, error) {
  2368. type NoMethod TypeLabelEntry
  2369. raw := NoMethod(*s)
  2370. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2371. }
  2372. // TypeProvider: A type provider that describes a service-backed Type.
  2373. type TypeProvider struct {
  2374. // CollectionOverrides: Allows resource handling overrides for specific
  2375. // collections
  2376. CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"`
  2377. // Credential: Credential used when interacting with this type.
  2378. Credential *Credential `json:"credential,omitempty"`
  2379. // Description: An optional textual description of the resource;
  2380. // provided by the client when the resource is created.
  2381. Description string `json:"description,omitempty"`
  2382. // DescriptorUrl: Descriptor Url for the this type provider.
  2383. DescriptorUrl string `json:"descriptorUrl,omitempty"`
  2384. // Id: Output only. Unique identifier for the resource defined by the
  2385. // server.
  2386. Id uint64 `json:"id,omitempty,string"`
  2387. // InsertTime: Output only. Creation timestamp in RFC3339 text format.
  2388. InsertTime string `json:"insertTime,omitempty"`
  2389. // Labels: Map of labels; provided by the client when the resource is
  2390. // created or updated. Specifically: Label keys must be between 1 and 63
  2391. // characters long and must conform to the following regular expression:
  2392. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  2393. // characters long and must conform to the regular expression
  2394. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  2395. Labels []*TypeProviderLabelEntry `json:"labels,omitempty"`
  2396. // Name: Name of the resource; provided by the client when the resource
  2397. // is created. The name must be 1-63 characters long, and comply with
  2398. // RFC1035. Specifically, the name must be 1-63 characters long and
  2399. // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
  2400. // the first character must be a lowercase letter, and all following
  2401. // characters must be a dash, lowercase letter, or digit, except the
  2402. // last character, which cannot be a dash.
  2403. Name string `json:"name,omitempty"`
  2404. // Operation: Output only. The Operation that most recently ran, or is
  2405. // currently running, on this type provider.
  2406. Operation *Operation `json:"operation,omitempty"`
  2407. // Options: Options to apply when handling any resources in this
  2408. // service.
  2409. Options *Options `json:"options,omitempty"`
  2410. // SelfLink: Output only. Self link for the type provider.
  2411. SelfLink string `json:"selfLink,omitempty"`
  2412. // ServerResponse contains the HTTP response code and headers from the
  2413. // server.
  2414. googleapi.ServerResponse `json:"-"`
  2415. // ForceSendFields is a list of field names (e.g. "CollectionOverrides")
  2416. // to unconditionally include in API requests. By default, fields with
  2417. // empty values are omitted from API requests. However, any non-pointer,
  2418. // non-interface field appearing in ForceSendFields will be sent to the
  2419. // server regardless of whether the field is empty or not. This may be
  2420. // used to include empty fields in Patch requests.
  2421. ForceSendFields []string `json:"-"`
  2422. // NullFields is a list of field names (e.g. "CollectionOverrides") to
  2423. // include in API requests with the JSON null value. By default, fields
  2424. // with empty values are omitted from API requests. However, any field
  2425. // with an empty value appearing in NullFields will be sent to the
  2426. // server as null. It is an error if a field in this list has a
  2427. // non-empty value. This may be used to include null fields in Patch
  2428. // requests.
  2429. NullFields []string `json:"-"`
  2430. }
  2431. func (s *TypeProvider) MarshalJSON() ([]byte, error) {
  2432. type NoMethod TypeProvider
  2433. raw := NoMethod(*s)
  2434. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2435. }
  2436. type TypeProviderLabelEntry struct {
  2437. Key string `json:"key,omitempty"`
  2438. Value string `json:"value,omitempty"`
  2439. // ForceSendFields is a list of field names (e.g. "Key") to
  2440. // unconditionally include in API requests. By default, fields with
  2441. // empty values are omitted from API requests. However, any non-pointer,
  2442. // non-interface field appearing in ForceSendFields will be sent to the
  2443. // server regardless of whether the field is empty or not. This may be
  2444. // used to include empty fields in Patch requests.
  2445. ForceSendFields []string `json:"-"`
  2446. // NullFields is a list of field names (e.g. "Key") to include in API
  2447. // requests with the JSON null value. By default, fields with empty
  2448. // values are omitted from API requests. However, any field with an
  2449. // empty value appearing in NullFields will be sent to the server as
  2450. // null. It is an error if a field in this list has a non-empty value.
  2451. // This may be used to include null fields in Patch requests.
  2452. NullFields []string `json:"-"`
  2453. }
  2454. func (s *TypeProviderLabelEntry) MarshalJSON() ([]byte, error) {
  2455. type NoMethod TypeProviderLabelEntry
  2456. raw := NoMethod(*s)
  2457. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2458. }
  2459. // TypeProvidersListResponse: A response that returns all Type Providers
  2460. // supported by Deployment Manager
  2461. type TypeProvidersListResponse struct {
  2462. // NextPageToken: A token used to continue a truncated list request.
  2463. NextPageToken string `json:"nextPageToken,omitempty"`
  2464. // TypeProviders: Output only. A list of resource type providers
  2465. // supported by Deployment Manager.
  2466. TypeProviders []*TypeProvider `json:"typeProviders,omitempty"`
  2467. // ServerResponse contains the HTTP response code and headers from the
  2468. // server.
  2469. googleapi.ServerResponse `json:"-"`
  2470. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2471. // unconditionally include in API requests. By default, fields with
  2472. // empty values are omitted from API requests. However, any non-pointer,
  2473. // non-interface field appearing in ForceSendFields will be sent to the
  2474. // server regardless of whether the field is empty or not. This may be
  2475. // used to include empty fields in Patch requests.
  2476. ForceSendFields []string `json:"-"`
  2477. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2478. // in API requests with the JSON null value. By default, fields with
  2479. // empty values are omitted from API requests. However, any field with
  2480. // an empty value appearing in NullFields will be sent to the server as
  2481. // null. It is an error if a field in this list has a non-empty value.
  2482. // This may be used to include null fields in Patch requests.
  2483. NullFields []string `json:"-"`
  2484. }
  2485. func (s *TypeProvidersListResponse) MarshalJSON() ([]byte, error) {
  2486. type NoMethod TypeProvidersListResponse
  2487. raw := NoMethod(*s)
  2488. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2489. }
  2490. type TypeProvidersListTypesResponse struct {
  2491. // NextPageToken: A token used to continue a truncated list request.
  2492. NextPageToken string `json:"nextPageToken,omitempty"`
  2493. // Types: Output only. A list of resource type info.
  2494. Types []*TypeInfo `json:"types,omitempty"`
  2495. // ServerResponse contains the HTTP response code and headers from the
  2496. // server.
  2497. googleapi.ServerResponse `json:"-"`
  2498. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2499. // unconditionally include in API requests. By default, fields with
  2500. // empty values are omitted from API requests. However, any non-pointer,
  2501. // non-interface field appearing in ForceSendFields will be sent to the
  2502. // server regardless of whether the field is empty or not. This may be
  2503. // used to include empty fields in Patch requests.
  2504. ForceSendFields []string `json:"-"`
  2505. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2506. // in API requests with the JSON null value. By default, fields with
  2507. // empty values are omitted from API requests. However, any field with
  2508. // an empty value appearing in NullFields will be sent to the server as
  2509. // null. It is an error if a field in this list has a non-empty value.
  2510. // This may be used to include null fields in Patch requests.
  2511. NullFields []string `json:"-"`
  2512. }
  2513. func (s *TypeProvidersListTypesResponse) MarshalJSON() ([]byte, error) {
  2514. type NoMethod TypeProvidersListTypesResponse
  2515. raw := NoMethod(*s)
  2516. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2517. }
  2518. // TypesListResponse: A response that returns all Types supported by
  2519. // Deployment Manager
  2520. type TypesListResponse struct {
  2521. // NextPageToken: A token used to continue a truncated list request.
  2522. NextPageToken string `json:"nextPageToken,omitempty"`
  2523. // Types: Output only. A list of resource types supported by Deployment
  2524. // Manager.
  2525. Types []*Type `json:"types,omitempty"`
  2526. // ServerResponse contains the HTTP response code and headers from the
  2527. // server.
  2528. googleapi.ServerResponse `json:"-"`
  2529. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2530. // unconditionally include in API requests. By default, fields with
  2531. // empty values are omitted from API requests. However, any non-pointer,
  2532. // non-interface field appearing in ForceSendFields will be sent to the
  2533. // server regardless of whether the field is empty or not. This may be
  2534. // used to include empty fields in Patch requests.
  2535. ForceSendFields []string `json:"-"`
  2536. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2537. // in API requests with the JSON null value. By default, fields with
  2538. // empty values are omitted from API requests. However, any field with
  2539. // an empty value appearing in NullFields will be sent to the server as
  2540. // null. It is an error if a field in this list has a non-empty value.
  2541. // This may be used to include null fields in Patch requests.
  2542. NullFields []string `json:"-"`
  2543. }
  2544. func (s *TypesListResponse) MarshalJSON() ([]byte, error) {
  2545. type NoMethod TypesListResponse
  2546. raw := NoMethod(*s)
  2547. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2548. }
  2549. // ValidationOptions: Options for how to validate and process properties
  2550. // on a resource.
  2551. type ValidationOptions struct {
  2552. // SchemaValidation: Customize how deployment manager will validate the
  2553. // resource against schema errors.
  2554. SchemaValidation string `json:"schemaValidation,omitempty"`
  2555. // UndeclaredProperties: Specify what to do with extra properties when
  2556. // executing a request.
  2557. UndeclaredProperties string `json:"undeclaredProperties,omitempty"`
  2558. // ForceSendFields is a list of field names (e.g. "SchemaValidation") to
  2559. // unconditionally include in API requests. By default, fields with
  2560. // empty values are omitted from API requests. However, any non-pointer,
  2561. // non-interface field appearing in ForceSendFields will be sent to the
  2562. // server regardless of whether the field is empty or not. This may be
  2563. // used to include empty fields in Patch requests.
  2564. ForceSendFields []string `json:"-"`
  2565. // NullFields is a list of field names (e.g. "SchemaValidation") to
  2566. // include in API requests with the JSON null value. By default, fields
  2567. // with empty values are omitted from API requests. However, any field
  2568. // with an empty value appearing in NullFields will be sent to the
  2569. // server as null. It is an error if a field in this list has a
  2570. // non-empty value. This may be used to include null fields in Patch
  2571. // requests.
  2572. NullFields []string `json:"-"`
  2573. }
  2574. func (s *ValidationOptions) MarshalJSON() ([]byte, error) {
  2575. type NoMethod ValidationOptions
  2576. raw := NoMethod(*s)
  2577. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2578. }
  2579. // method id "deploymentmanager.compositeTypes.delete":
  2580. type CompositeTypesDeleteCall struct {
  2581. s *Service
  2582. project string
  2583. compositeType string
  2584. urlParams_ gensupport.URLParams
  2585. ctx_ context.Context
  2586. header_ http.Header
  2587. }
  2588. // Delete: Deletes a composite type.
  2589. func (r *CompositeTypesService) Delete(project string, compositeType string) *CompositeTypesDeleteCall {
  2590. c := &CompositeTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2591. c.project = project
  2592. c.compositeType = compositeType
  2593. return c
  2594. }
  2595. // Fields allows partial responses to be retrieved. See
  2596. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2597. // for more information.
  2598. func (c *CompositeTypesDeleteCall) Fields(s ...googleapi.Field) *CompositeTypesDeleteCall {
  2599. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2600. return c
  2601. }
  2602. // Context sets the context to be used in this call's Do method. Any
  2603. // pending HTTP request will be aborted if the provided context is
  2604. // canceled.
  2605. func (c *CompositeTypesDeleteCall) Context(ctx context.Context) *CompositeTypesDeleteCall {
  2606. c.ctx_ = ctx
  2607. return c
  2608. }
  2609. // Header returns an http.Header that can be modified by the caller to
  2610. // add HTTP headers to the request.
  2611. func (c *CompositeTypesDeleteCall) Header() http.Header {
  2612. if c.header_ == nil {
  2613. c.header_ = make(http.Header)
  2614. }
  2615. return c.header_
  2616. }
  2617. func (c *CompositeTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2618. reqHeaders := make(http.Header)
  2619. for k, v := range c.header_ {
  2620. reqHeaders[k] = v
  2621. }
  2622. reqHeaders.Set("User-Agent", c.s.userAgent())
  2623. var body io.Reader = nil
  2624. c.urlParams_.Set("alt", alt)
  2625. c.urlParams_.Set("prettyPrint", "false")
  2626. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  2627. urls += "?" + c.urlParams_.Encode()
  2628. req, err := http.NewRequest("DELETE", urls, body)
  2629. if err != nil {
  2630. return nil, err
  2631. }
  2632. req.Header = reqHeaders
  2633. googleapi.Expand(req.URL, map[string]string{
  2634. "project": c.project,
  2635. "compositeType": c.compositeType,
  2636. })
  2637. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2638. }
  2639. // Do executes the "deploymentmanager.compositeTypes.delete" call.
  2640. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2641. // status code is an error. Response headers are in either
  2642. // *Operation.ServerResponse.Header or (if a response was returned at
  2643. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2644. // to check whether the returned error was because
  2645. // http.StatusNotModified was returned.
  2646. func (c *CompositeTypesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2647. gensupport.SetOptions(c.urlParams_, opts...)
  2648. res, err := c.doRequest("json")
  2649. if res != nil && res.StatusCode == http.StatusNotModified {
  2650. if res.Body != nil {
  2651. res.Body.Close()
  2652. }
  2653. return nil, &googleapi.Error{
  2654. Code: res.StatusCode,
  2655. Header: res.Header,
  2656. }
  2657. }
  2658. if err != nil {
  2659. return nil, err
  2660. }
  2661. defer googleapi.CloseBody(res)
  2662. if err := googleapi.CheckResponse(res); err != nil {
  2663. return nil, err
  2664. }
  2665. ret := &Operation{
  2666. ServerResponse: googleapi.ServerResponse{
  2667. Header: res.Header,
  2668. HTTPStatusCode: res.StatusCode,
  2669. },
  2670. }
  2671. target := &ret
  2672. if err := gensupport.DecodeResponse(target, res); err != nil {
  2673. return nil, err
  2674. }
  2675. return ret, nil
  2676. // {
  2677. // "description": "Deletes a composite type.",
  2678. // "httpMethod": "DELETE",
  2679. // "id": "deploymentmanager.compositeTypes.delete",
  2680. // "parameterOrder": [
  2681. // "project",
  2682. // "compositeType"
  2683. // ],
  2684. // "parameters": {
  2685. // "compositeType": {
  2686. // "description": "The name of the type for this request.",
  2687. // "location": "path",
  2688. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  2689. // "required": true,
  2690. // "type": "string"
  2691. // },
  2692. // "project": {
  2693. // "description": "The project ID for this request.",
  2694. // "location": "path",
  2695. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  2696. // "required": true,
  2697. // "type": "string"
  2698. // }
  2699. // },
  2700. // "path": "{project}/global/compositeTypes/{compositeType}",
  2701. // "response": {
  2702. // "$ref": "Operation"
  2703. // },
  2704. // "scopes": [
  2705. // "https://www.googleapis.com/auth/cloud-platform",
  2706. // "https://www.googleapis.com/auth/ndev.cloudman"
  2707. // ]
  2708. // }
  2709. }
  2710. // method id "deploymentmanager.compositeTypes.get":
  2711. type CompositeTypesGetCall struct {
  2712. s *Service
  2713. project string
  2714. compositeType string
  2715. urlParams_ gensupport.URLParams
  2716. ifNoneMatch_ string
  2717. ctx_ context.Context
  2718. header_ http.Header
  2719. }
  2720. // Get: Gets information about a specific composite type.
  2721. func (r *CompositeTypesService) Get(project string, compositeType string) *CompositeTypesGetCall {
  2722. c := &CompositeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2723. c.project = project
  2724. c.compositeType = compositeType
  2725. return c
  2726. }
  2727. // Fields allows partial responses to be retrieved. See
  2728. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2729. // for more information.
  2730. func (c *CompositeTypesGetCall) Fields(s ...googleapi.Field) *CompositeTypesGetCall {
  2731. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2732. return c
  2733. }
  2734. // IfNoneMatch sets the optional parameter which makes the operation
  2735. // fail if the object's ETag matches the given value. This is useful for
  2736. // getting updates only after the object has changed since the last
  2737. // request. Use googleapi.IsNotModified to check whether the response
  2738. // error from Do is the result of In-None-Match.
  2739. func (c *CompositeTypesGetCall) IfNoneMatch(entityTag string) *CompositeTypesGetCall {
  2740. c.ifNoneMatch_ = entityTag
  2741. return c
  2742. }
  2743. // Context sets the context to be used in this call's Do method. Any
  2744. // pending HTTP request will be aborted if the provided context is
  2745. // canceled.
  2746. func (c *CompositeTypesGetCall) Context(ctx context.Context) *CompositeTypesGetCall {
  2747. c.ctx_ = ctx
  2748. return c
  2749. }
  2750. // Header returns an http.Header that can be modified by the caller to
  2751. // add HTTP headers to the request.
  2752. func (c *CompositeTypesGetCall) Header() http.Header {
  2753. if c.header_ == nil {
  2754. c.header_ = make(http.Header)
  2755. }
  2756. return c.header_
  2757. }
  2758. func (c *CompositeTypesGetCall) doRequest(alt string) (*http.Response, error) {
  2759. reqHeaders := make(http.Header)
  2760. for k, v := range c.header_ {
  2761. reqHeaders[k] = v
  2762. }
  2763. reqHeaders.Set("User-Agent", c.s.userAgent())
  2764. if c.ifNoneMatch_ != "" {
  2765. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2766. }
  2767. var body io.Reader = nil
  2768. c.urlParams_.Set("alt", alt)
  2769. c.urlParams_.Set("prettyPrint", "false")
  2770. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  2771. urls += "?" + c.urlParams_.Encode()
  2772. req, err := http.NewRequest("GET", urls, body)
  2773. if err != nil {
  2774. return nil, err
  2775. }
  2776. req.Header = reqHeaders
  2777. googleapi.Expand(req.URL, map[string]string{
  2778. "project": c.project,
  2779. "compositeType": c.compositeType,
  2780. })
  2781. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2782. }
  2783. // Do executes the "deploymentmanager.compositeTypes.get" call.
  2784. // Exactly one of *CompositeType or error will be non-nil. Any non-2xx
  2785. // status code is an error. Response headers are in either
  2786. // *CompositeType.ServerResponse.Header or (if a response was returned
  2787. // at all) in error.(*googleapi.Error).Header. Use
  2788. // googleapi.IsNotModified to check whether the returned error was
  2789. // because http.StatusNotModified was returned.
  2790. func (c *CompositeTypesGetCall) Do(opts ...googleapi.CallOption) (*CompositeType, error) {
  2791. gensupport.SetOptions(c.urlParams_, opts...)
  2792. res, err := c.doRequest("json")
  2793. if res != nil && res.StatusCode == http.StatusNotModified {
  2794. if res.Body != nil {
  2795. res.Body.Close()
  2796. }
  2797. return nil, &googleapi.Error{
  2798. Code: res.StatusCode,
  2799. Header: res.Header,
  2800. }
  2801. }
  2802. if err != nil {
  2803. return nil, err
  2804. }
  2805. defer googleapi.CloseBody(res)
  2806. if err := googleapi.CheckResponse(res); err != nil {
  2807. return nil, err
  2808. }
  2809. ret := &CompositeType{
  2810. ServerResponse: googleapi.ServerResponse{
  2811. Header: res.Header,
  2812. HTTPStatusCode: res.StatusCode,
  2813. },
  2814. }
  2815. target := &ret
  2816. if err := gensupport.DecodeResponse(target, res); err != nil {
  2817. return nil, err
  2818. }
  2819. return ret, nil
  2820. // {
  2821. // "description": "Gets information about a specific composite type.",
  2822. // "httpMethod": "GET",
  2823. // "id": "deploymentmanager.compositeTypes.get",
  2824. // "parameterOrder": [
  2825. // "project",
  2826. // "compositeType"
  2827. // ],
  2828. // "parameters": {
  2829. // "compositeType": {
  2830. // "description": "The name of the composite type for this request.",
  2831. // "location": "path",
  2832. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  2833. // "required": true,
  2834. // "type": "string"
  2835. // },
  2836. // "project": {
  2837. // "description": "The project ID for this request.",
  2838. // "location": "path",
  2839. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  2840. // "required": true,
  2841. // "type": "string"
  2842. // }
  2843. // },
  2844. // "path": "{project}/global/compositeTypes/{compositeType}",
  2845. // "response": {
  2846. // "$ref": "CompositeType"
  2847. // },
  2848. // "scopes": [
  2849. // "https://www.googleapis.com/auth/cloud-platform",
  2850. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  2851. // "https://www.googleapis.com/auth/ndev.cloudman",
  2852. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  2853. // ]
  2854. // }
  2855. }
  2856. // method id "deploymentmanager.compositeTypes.insert":
  2857. type CompositeTypesInsertCall struct {
  2858. s *Service
  2859. project string
  2860. compositetype *CompositeType
  2861. urlParams_ gensupport.URLParams
  2862. ctx_ context.Context
  2863. header_ http.Header
  2864. }
  2865. // Insert: Creates a composite type.
  2866. func (r *CompositeTypesService) Insert(project string, compositetype *CompositeType) *CompositeTypesInsertCall {
  2867. c := &CompositeTypesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2868. c.project = project
  2869. c.compositetype = compositetype
  2870. return c
  2871. }
  2872. // Fields allows partial responses to be retrieved. See
  2873. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2874. // for more information.
  2875. func (c *CompositeTypesInsertCall) Fields(s ...googleapi.Field) *CompositeTypesInsertCall {
  2876. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2877. return c
  2878. }
  2879. // Context sets the context to be used in this call's Do method. Any
  2880. // pending HTTP request will be aborted if the provided context is
  2881. // canceled.
  2882. func (c *CompositeTypesInsertCall) Context(ctx context.Context) *CompositeTypesInsertCall {
  2883. c.ctx_ = ctx
  2884. return c
  2885. }
  2886. // Header returns an http.Header that can be modified by the caller to
  2887. // add HTTP headers to the request.
  2888. func (c *CompositeTypesInsertCall) Header() http.Header {
  2889. if c.header_ == nil {
  2890. c.header_ = make(http.Header)
  2891. }
  2892. return c.header_
  2893. }
  2894. func (c *CompositeTypesInsertCall) doRequest(alt string) (*http.Response, error) {
  2895. reqHeaders := make(http.Header)
  2896. for k, v := range c.header_ {
  2897. reqHeaders[k] = v
  2898. }
  2899. reqHeaders.Set("User-Agent", c.s.userAgent())
  2900. var body io.Reader = nil
  2901. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  2902. if err != nil {
  2903. return nil, err
  2904. }
  2905. reqHeaders.Set("Content-Type", "application/json")
  2906. c.urlParams_.Set("alt", alt)
  2907. c.urlParams_.Set("prettyPrint", "false")
  2908. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes")
  2909. urls += "?" + c.urlParams_.Encode()
  2910. req, err := http.NewRequest("POST", urls, body)
  2911. if err != nil {
  2912. return nil, err
  2913. }
  2914. req.Header = reqHeaders
  2915. googleapi.Expand(req.URL, map[string]string{
  2916. "project": c.project,
  2917. })
  2918. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2919. }
  2920. // Do executes the "deploymentmanager.compositeTypes.insert" call.
  2921. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2922. // status code is an error. Response headers are in either
  2923. // *Operation.ServerResponse.Header or (if a response was returned at
  2924. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2925. // to check whether the returned error was because
  2926. // http.StatusNotModified was returned.
  2927. func (c *CompositeTypesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2928. gensupport.SetOptions(c.urlParams_, opts...)
  2929. res, err := c.doRequest("json")
  2930. if res != nil && res.StatusCode == http.StatusNotModified {
  2931. if res.Body != nil {
  2932. res.Body.Close()
  2933. }
  2934. return nil, &googleapi.Error{
  2935. Code: res.StatusCode,
  2936. Header: res.Header,
  2937. }
  2938. }
  2939. if err != nil {
  2940. return nil, err
  2941. }
  2942. defer googleapi.CloseBody(res)
  2943. if err := googleapi.CheckResponse(res); err != nil {
  2944. return nil, err
  2945. }
  2946. ret := &Operation{
  2947. ServerResponse: googleapi.ServerResponse{
  2948. Header: res.Header,
  2949. HTTPStatusCode: res.StatusCode,
  2950. },
  2951. }
  2952. target := &ret
  2953. if err := gensupport.DecodeResponse(target, res); err != nil {
  2954. return nil, err
  2955. }
  2956. return ret, nil
  2957. // {
  2958. // "description": "Creates a composite type.",
  2959. // "httpMethod": "POST",
  2960. // "id": "deploymentmanager.compositeTypes.insert",
  2961. // "parameterOrder": [
  2962. // "project"
  2963. // ],
  2964. // "parameters": {
  2965. // "project": {
  2966. // "description": "The project ID for this request.",
  2967. // "location": "path",
  2968. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  2969. // "required": true,
  2970. // "type": "string"
  2971. // }
  2972. // },
  2973. // "path": "{project}/global/compositeTypes",
  2974. // "request": {
  2975. // "$ref": "CompositeType"
  2976. // },
  2977. // "response": {
  2978. // "$ref": "Operation"
  2979. // },
  2980. // "scopes": [
  2981. // "https://www.googleapis.com/auth/cloud-platform",
  2982. // "https://www.googleapis.com/auth/ndev.cloudman"
  2983. // ]
  2984. // }
  2985. }
  2986. // method id "deploymentmanager.compositeTypes.list":
  2987. type CompositeTypesListCall struct {
  2988. s *Service
  2989. project string
  2990. urlParams_ gensupport.URLParams
  2991. ifNoneMatch_ string
  2992. ctx_ context.Context
  2993. header_ http.Header
  2994. }
  2995. // List: Lists all composite types for Deployment Manager.
  2996. func (r *CompositeTypesService) List(project string) *CompositeTypesListCall {
  2997. c := &CompositeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2998. c.project = project
  2999. return c
  3000. }
  3001. // Filter sets the optional parameter "filter": A filter expression that
  3002. // filters resources listed in the response. The expression must specify
  3003. // the field name, a comparison operator, and the value that you want to
  3004. // use for filtering. The value must be a string, a number, or a
  3005. // boolean. The comparison operator must be either =, !=, >, or <.
  3006. //
  3007. // For example, if you are filtering Compute Engine instances, you can
  3008. // exclude instances named example-instance by specifying name !=
  3009. // example-instance.
  3010. //
  3011. // You can also filter nested fields. For example, you could specify
  3012. // scheduling.automaticRestart = false to include instances only if they
  3013. // are not scheduled for automatic restarts. You can use filtering on
  3014. // nested fields to filter based on resource labels.
  3015. //
  3016. // To filter on multiple expressions, provide each separate expression
  3017. // within parentheses. For example, (scheduling.automaticRestart = true)
  3018. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  3019. // AND expression. However, you can include AND and OR expressions
  3020. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  3021. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  3022. // true).
  3023. func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall {
  3024. c.urlParams_.Set("filter", filter)
  3025. return c
  3026. }
  3027. // MaxResults sets the optional parameter "maxResults": The maximum
  3028. // number of results per page that should be returned. If the number of
  3029. // available results is larger than maxResults, Compute Engine returns a
  3030. // nextPageToken that can be used to get the next page of results in
  3031. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  3032. // (Default: 500)
  3033. func (c *CompositeTypesListCall) MaxResults(maxResults int64) *CompositeTypesListCall {
  3034. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3035. return c
  3036. }
  3037. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  3038. // a certain order. By default, results are returned in alphanumerical
  3039. // order based on the resource name.
  3040. //
  3041. // You can also sort results in descending order based on the creation
  3042. // timestamp using orderBy="creationTimestamp desc". This sorts results
  3043. // based on the creationTimestamp field in reverse chronological order
  3044. // (newest result first). Use this to sort resources like operations so
  3045. // that the newest operation is returned first.
  3046. //
  3047. // Currently, only sorting by name or creationTimestamp desc is
  3048. // supported.
  3049. func (c *CompositeTypesListCall) OrderBy(orderBy string) *CompositeTypesListCall {
  3050. c.urlParams_.Set("orderBy", orderBy)
  3051. return c
  3052. }
  3053. // PageToken sets the optional parameter "pageToken": Specifies a page
  3054. // token to use. Set pageToken to the nextPageToken returned by a
  3055. // previous list request to get the next page of results.
  3056. func (c *CompositeTypesListCall) PageToken(pageToken string) *CompositeTypesListCall {
  3057. c.urlParams_.Set("pageToken", pageToken)
  3058. return c
  3059. }
  3060. // Fields allows partial responses to be retrieved. See
  3061. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3062. // for more information.
  3063. func (c *CompositeTypesListCall) Fields(s ...googleapi.Field) *CompositeTypesListCall {
  3064. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3065. return c
  3066. }
  3067. // IfNoneMatch sets the optional parameter which makes the operation
  3068. // fail if the object's ETag matches the given value. This is useful for
  3069. // getting updates only after the object has changed since the last
  3070. // request. Use googleapi.IsNotModified to check whether the response
  3071. // error from Do is the result of In-None-Match.
  3072. func (c *CompositeTypesListCall) IfNoneMatch(entityTag string) *CompositeTypesListCall {
  3073. c.ifNoneMatch_ = entityTag
  3074. return c
  3075. }
  3076. // Context sets the context to be used in this call's Do method. Any
  3077. // pending HTTP request will be aborted if the provided context is
  3078. // canceled.
  3079. func (c *CompositeTypesListCall) Context(ctx context.Context) *CompositeTypesListCall {
  3080. c.ctx_ = ctx
  3081. return c
  3082. }
  3083. // Header returns an http.Header that can be modified by the caller to
  3084. // add HTTP headers to the request.
  3085. func (c *CompositeTypesListCall) Header() http.Header {
  3086. if c.header_ == nil {
  3087. c.header_ = make(http.Header)
  3088. }
  3089. return c.header_
  3090. }
  3091. func (c *CompositeTypesListCall) doRequest(alt string) (*http.Response, error) {
  3092. reqHeaders := make(http.Header)
  3093. for k, v := range c.header_ {
  3094. reqHeaders[k] = v
  3095. }
  3096. reqHeaders.Set("User-Agent", c.s.userAgent())
  3097. if c.ifNoneMatch_ != "" {
  3098. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3099. }
  3100. var body io.Reader = nil
  3101. c.urlParams_.Set("alt", alt)
  3102. c.urlParams_.Set("prettyPrint", "false")
  3103. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes")
  3104. urls += "?" + c.urlParams_.Encode()
  3105. req, err := http.NewRequest("GET", urls, body)
  3106. if err != nil {
  3107. return nil, err
  3108. }
  3109. req.Header = reqHeaders
  3110. googleapi.Expand(req.URL, map[string]string{
  3111. "project": c.project,
  3112. })
  3113. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3114. }
  3115. // Do executes the "deploymentmanager.compositeTypes.list" call.
  3116. // Exactly one of *CompositeTypesListResponse or error will be non-nil.
  3117. // Any non-2xx status code is an error. Response headers are in either
  3118. // *CompositeTypesListResponse.ServerResponse.Header or (if a response
  3119. // was returned at all) in error.(*googleapi.Error).Header. Use
  3120. // googleapi.IsNotModified to check whether the returned error was
  3121. // because http.StatusNotModified was returned.
  3122. func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTypesListResponse, error) {
  3123. gensupport.SetOptions(c.urlParams_, opts...)
  3124. res, err := c.doRequest("json")
  3125. if res != nil && res.StatusCode == http.StatusNotModified {
  3126. if res.Body != nil {
  3127. res.Body.Close()
  3128. }
  3129. return nil, &googleapi.Error{
  3130. Code: res.StatusCode,
  3131. Header: res.Header,
  3132. }
  3133. }
  3134. if err != nil {
  3135. return nil, err
  3136. }
  3137. defer googleapi.CloseBody(res)
  3138. if err := googleapi.CheckResponse(res); err != nil {
  3139. return nil, err
  3140. }
  3141. ret := &CompositeTypesListResponse{
  3142. ServerResponse: googleapi.ServerResponse{
  3143. Header: res.Header,
  3144. HTTPStatusCode: res.StatusCode,
  3145. },
  3146. }
  3147. target := &ret
  3148. if err := gensupport.DecodeResponse(target, res); err != nil {
  3149. return nil, err
  3150. }
  3151. return ret, nil
  3152. // {
  3153. // "description": "Lists all composite types for Deployment Manager.",
  3154. // "httpMethod": "GET",
  3155. // "id": "deploymentmanager.compositeTypes.list",
  3156. // "parameterOrder": [
  3157. // "project"
  3158. // ],
  3159. // "parameters": {
  3160. // "filter": {
  3161. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  3162. // "location": "query",
  3163. // "type": "string"
  3164. // },
  3165. // "maxResults": {
  3166. // "default": "500",
  3167. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  3168. // "format": "uint32",
  3169. // "location": "query",
  3170. // "minimum": "0",
  3171. // "type": "integer"
  3172. // },
  3173. // "orderBy": {
  3174. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  3175. // "location": "query",
  3176. // "type": "string"
  3177. // },
  3178. // "pageToken": {
  3179. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  3180. // "location": "query",
  3181. // "type": "string"
  3182. // },
  3183. // "project": {
  3184. // "description": "The project ID for this request.",
  3185. // "location": "path",
  3186. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  3187. // "required": true,
  3188. // "type": "string"
  3189. // }
  3190. // },
  3191. // "path": "{project}/global/compositeTypes",
  3192. // "response": {
  3193. // "$ref": "CompositeTypesListResponse"
  3194. // },
  3195. // "scopes": [
  3196. // "https://www.googleapis.com/auth/cloud-platform",
  3197. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  3198. // "https://www.googleapis.com/auth/ndev.cloudman",
  3199. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  3200. // ]
  3201. // }
  3202. }
  3203. // Pages invokes f for each page of results.
  3204. // A non-nil error returned from f will halt the iteration.
  3205. // The provided context supersedes any context provided to the Context method.
  3206. func (c *CompositeTypesListCall) Pages(ctx context.Context, f func(*CompositeTypesListResponse) error) error {
  3207. c.ctx_ = ctx
  3208. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3209. for {
  3210. x, err := c.Do()
  3211. if err != nil {
  3212. return err
  3213. }
  3214. if err := f(x); err != nil {
  3215. return err
  3216. }
  3217. if x.NextPageToken == "" {
  3218. return nil
  3219. }
  3220. c.PageToken(x.NextPageToken)
  3221. }
  3222. }
  3223. // method id "deploymentmanager.compositeTypes.patch":
  3224. type CompositeTypesPatchCall struct {
  3225. s *Service
  3226. project string
  3227. compositeType string
  3228. compositetype *CompositeType
  3229. urlParams_ gensupport.URLParams
  3230. ctx_ context.Context
  3231. header_ http.Header
  3232. }
  3233. // Patch: Updates a composite type. This method supports patch
  3234. // semantics.
  3235. func (r *CompositeTypesService) Patch(project string, compositeType string, compositetype *CompositeType) *CompositeTypesPatchCall {
  3236. c := &CompositeTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3237. c.project = project
  3238. c.compositeType = compositeType
  3239. c.compositetype = compositetype
  3240. return c
  3241. }
  3242. // Fields allows partial responses to be retrieved. See
  3243. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3244. // for more information.
  3245. func (c *CompositeTypesPatchCall) Fields(s ...googleapi.Field) *CompositeTypesPatchCall {
  3246. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3247. return c
  3248. }
  3249. // Context sets the context to be used in this call's Do method. Any
  3250. // pending HTTP request will be aborted if the provided context is
  3251. // canceled.
  3252. func (c *CompositeTypesPatchCall) Context(ctx context.Context) *CompositeTypesPatchCall {
  3253. c.ctx_ = ctx
  3254. return c
  3255. }
  3256. // Header returns an http.Header that can be modified by the caller to
  3257. // add HTTP headers to the request.
  3258. func (c *CompositeTypesPatchCall) Header() http.Header {
  3259. if c.header_ == nil {
  3260. c.header_ = make(http.Header)
  3261. }
  3262. return c.header_
  3263. }
  3264. func (c *CompositeTypesPatchCall) doRequest(alt string) (*http.Response, error) {
  3265. reqHeaders := make(http.Header)
  3266. for k, v := range c.header_ {
  3267. reqHeaders[k] = v
  3268. }
  3269. reqHeaders.Set("User-Agent", c.s.userAgent())
  3270. var body io.Reader = nil
  3271. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  3272. if err != nil {
  3273. return nil, err
  3274. }
  3275. reqHeaders.Set("Content-Type", "application/json")
  3276. c.urlParams_.Set("alt", alt)
  3277. c.urlParams_.Set("prettyPrint", "false")
  3278. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  3279. urls += "?" + c.urlParams_.Encode()
  3280. req, err := http.NewRequest("PATCH", urls, body)
  3281. if err != nil {
  3282. return nil, err
  3283. }
  3284. req.Header = reqHeaders
  3285. googleapi.Expand(req.URL, map[string]string{
  3286. "project": c.project,
  3287. "compositeType": c.compositeType,
  3288. })
  3289. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3290. }
  3291. // Do executes the "deploymentmanager.compositeTypes.patch" call.
  3292. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3293. // status code is an error. Response headers are in either
  3294. // *Operation.ServerResponse.Header or (if a response was returned at
  3295. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3296. // to check whether the returned error was because
  3297. // http.StatusNotModified was returned.
  3298. func (c *CompositeTypesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3299. gensupport.SetOptions(c.urlParams_, opts...)
  3300. res, err := c.doRequest("json")
  3301. if res != nil && res.StatusCode == http.StatusNotModified {
  3302. if res.Body != nil {
  3303. res.Body.Close()
  3304. }
  3305. return nil, &googleapi.Error{
  3306. Code: res.StatusCode,
  3307. Header: res.Header,
  3308. }
  3309. }
  3310. if err != nil {
  3311. return nil, err
  3312. }
  3313. defer googleapi.CloseBody(res)
  3314. if err := googleapi.CheckResponse(res); err != nil {
  3315. return nil, err
  3316. }
  3317. ret := &Operation{
  3318. ServerResponse: googleapi.ServerResponse{
  3319. Header: res.Header,
  3320. HTTPStatusCode: res.StatusCode,
  3321. },
  3322. }
  3323. target := &ret
  3324. if err := gensupport.DecodeResponse(target, res); err != nil {
  3325. return nil, err
  3326. }
  3327. return ret, nil
  3328. // {
  3329. // "description": "Updates a composite type. This method supports patch semantics.",
  3330. // "httpMethod": "PATCH",
  3331. // "id": "deploymentmanager.compositeTypes.patch",
  3332. // "parameterOrder": [
  3333. // "project",
  3334. // "compositeType"
  3335. // ],
  3336. // "parameters": {
  3337. // "compositeType": {
  3338. // "description": "The name of the composite type for this request.",
  3339. // "location": "path",
  3340. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  3341. // "required": true,
  3342. // "type": "string"
  3343. // },
  3344. // "project": {
  3345. // "description": "The project ID for this request.",
  3346. // "location": "path",
  3347. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  3348. // "required": true,
  3349. // "type": "string"
  3350. // }
  3351. // },
  3352. // "path": "{project}/global/compositeTypes/{compositeType}",
  3353. // "request": {
  3354. // "$ref": "CompositeType"
  3355. // },
  3356. // "response": {
  3357. // "$ref": "Operation"
  3358. // },
  3359. // "scopes": [
  3360. // "https://www.googleapis.com/auth/cloud-platform",
  3361. // "https://www.googleapis.com/auth/ndev.cloudman"
  3362. // ]
  3363. // }
  3364. }
  3365. // method id "deploymentmanager.compositeTypes.update":
  3366. type CompositeTypesUpdateCall struct {
  3367. s *Service
  3368. project string
  3369. compositeType string
  3370. compositetype *CompositeType
  3371. urlParams_ gensupport.URLParams
  3372. ctx_ context.Context
  3373. header_ http.Header
  3374. }
  3375. // Update: Updates a composite type.
  3376. func (r *CompositeTypesService) Update(project string, compositeType string, compositetype *CompositeType) *CompositeTypesUpdateCall {
  3377. c := &CompositeTypesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3378. c.project = project
  3379. c.compositeType = compositeType
  3380. c.compositetype = compositetype
  3381. return c
  3382. }
  3383. // Fields allows partial responses to be retrieved. See
  3384. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3385. // for more information.
  3386. func (c *CompositeTypesUpdateCall) Fields(s ...googleapi.Field) *CompositeTypesUpdateCall {
  3387. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3388. return c
  3389. }
  3390. // Context sets the context to be used in this call's Do method. Any
  3391. // pending HTTP request will be aborted if the provided context is
  3392. // canceled.
  3393. func (c *CompositeTypesUpdateCall) Context(ctx context.Context) *CompositeTypesUpdateCall {
  3394. c.ctx_ = ctx
  3395. return c
  3396. }
  3397. // Header returns an http.Header that can be modified by the caller to
  3398. // add HTTP headers to the request.
  3399. func (c *CompositeTypesUpdateCall) Header() http.Header {
  3400. if c.header_ == nil {
  3401. c.header_ = make(http.Header)
  3402. }
  3403. return c.header_
  3404. }
  3405. func (c *CompositeTypesUpdateCall) doRequest(alt string) (*http.Response, error) {
  3406. reqHeaders := make(http.Header)
  3407. for k, v := range c.header_ {
  3408. reqHeaders[k] = v
  3409. }
  3410. reqHeaders.Set("User-Agent", c.s.userAgent())
  3411. var body io.Reader = nil
  3412. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  3413. if err != nil {
  3414. return nil, err
  3415. }
  3416. reqHeaders.Set("Content-Type", "application/json")
  3417. c.urlParams_.Set("alt", alt)
  3418. c.urlParams_.Set("prettyPrint", "false")
  3419. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  3420. urls += "?" + c.urlParams_.Encode()
  3421. req, err := http.NewRequest("PUT", urls, body)
  3422. if err != nil {
  3423. return nil, err
  3424. }
  3425. req.Header = reqHeaders
  3426. googleapi.Expand(req.URL, map[string]string{
  3427. "project": c.project,
  3428. "compositeType": c.compositeType,
  3429. })
  3430. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3431. }
  3432. // Do executes the "deploymentmanager.compositeTypes.update" call.
  3433. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3434. // status code is an error. Response headers are in either
  3435. // *Operation.ServerResponse.Header or (if a response was returned at
  3436. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3437. // to check whether the returned error was because
  3438. // http.StatusNotModified was returned.
  3439. func (c *CompositeTypesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3440. gensupport.SetOptions(c.urlParams_, opts...)
  3441. res, err := c.doRequest("json")
  3442. if res != nil && res.StatusCode == http.StatusNotModified {
  3443. if res.Body != nil {
  3444. res.Body.Close()
  3445. }
  3446. return nil, &googleapi.Error{
  3447. Code: res.StatusCode,
  3448. Header: res.Header,
  3449. }
  3450. }
  3451. if err != nil {
  3452. return nil, err
  3453. }
  3454. defer googleapi.CloseBody(res)
  3455. if err := googleapi.CheckResponse(res); err != nil {
  3456. return nil, err
  3457. }
  3458. ret := &Operation{
  3459. ServerResponse: googleapi.ServerResponse{
  3460. Header: res.Header,
  3461. HTTPStatusCode: res.StatusCode,
  3462. },
  3463. }
  3464. target := &ret
  3465. if err := gensupport.DecodeResponse(target, res); err != nil {
  3466. return nil, err
  3467. }
  3468. return ret, nil
  3469. // {
  3470. // "description": "Updates a composite type.",
  3471. // "httpMethod": "PUT",
  3472. // "id": "deploymentmanager.compositeTypes.update",
  3473. // "parameterOrder": [
  3474. // "project",
  3475. // "compositeType"
  3476. // ],
  3477. // "parameters": {
  3478. // "compositeType": {
  3479. // "description": "The name of the composite type for this request.",
  3480. // "location": "path",
  3481. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  3482. // "required": true,
  3483. // "type": "string"
  3484. // },
  3485. // "project": {
  3486. // "description": "The project ID for this request.",
  3487. // "location": "path",
  3488. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  3489. // "required": true,
  3490. // "type": "string"
  3491. // }
  3492. // },
  3493. // "path": "{project}/global/compositeTypes/{compositeType}",
  3494. // "request": {
  3495. // "$ref": "CompositeType"
  3496. // },
  3497. // "response": {
  3498. // "$ref": "Operation"
  3499. // },
  3500. // "scopes": [
  3501. // "https://www.googleapis.com/auth/cloud-platform",
  3502. // "https://www.googleapis.com/auth/ndev.cloudman"
  3503. // ]
  3504. // }
  3505. }
  3506. // method id "deploymentmanager.deployments.cancelPreview":
  3507. type DeploymentsCancelPreviewCall struct {
  3508. s *Service
  3509. project string
  3510. deployment string
  3511. deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest
  3512. urlParams_ gensupport.URLParams
  3513. ctx_ context.Context
  3514. header_ http.Header
  3515. }
  3516. // CancelPreview: Cancels and removes the preview currently associated
  3517. // with the deployment.
  3518. func (r *DeploymentsService) CancelPreview(project string, deployment string, deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest) *DeploymentsCancelPreviewCall {
  3519. c := &DeploymentsCancelPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3520. c.project = project
  3521. c.deployment = deployment
  3522. c.deploymentscancelpreviewrequest = deploymentscancelpreviewrequest
  3523. return c
  3524. }
  3525. // Fields allows partial responses to be retrieved. See
  3526. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3527. // for more information.
  3528. func (c *DeploymentsCancelPreviewCall) Fields(s ...googleapi.Field) *DeploymentsCancelPreviewCall {
  3529. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3530. return c
  3531. }
  3532. // Context sets the context to be used in this call's Do method. Any
  3533. // pending HTTP request will be aborted if the provided context is
  3534. // canceled.
  3535. func (c *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall {
  3536. c.ctx_ = ctx
  3537. return c
  3538. }
  3539. // Header returns an http.Header that can be modified by the caller to
  3540. // add HTTP headers to the request.
  3541. func (c *DeploymentsCancelPreviewCall) Header() http.Header {
  3542. if c.header_ == nil {
  3543. c.header_ = make(http.Header)
  3544. }
  3545. return c.header_
  3546. }
  3547. func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) {
  3548. reqHeaders := make(http.Header)
  3549. for k, v := range c.header_ {
  3550. reqHeaders[k] = v
  3551. }
  3552. reqHeaders.Set("User-Agent", c.s.userAgent())
  3553. var body io.Reader = nil
  3554. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest)
  3555. if err != nil {
  3556. return nil, err
  3557. }
  3558. reqHeaders.Set("Content-Type", "application/json")
  3559. c.urlParams_.Set("alt", alt)
  3560. c.urlParams_.Set("prettyPrint", "false")
  3561. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/cancelPreview")
  3562. urls += "?" + c.urlParams_.Encode()
  3563. req, err := http.NewRequest("POST", urls, body)
  3564. if err != nil {
  3565. return nil, err
  3566. }
  3567. req.Header = reqHeaders
  3568. googleapi.Expand(req.URL, map[string]string{
  3569. "project": c.project,
  3570. "deployment": c.deployment,
  3571. })
  3572. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3573. }
  3574. // Do executes the "deploymentmanager.deployments.cancelPreview" call.
  3575. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3576. // status code is an error. Response headers are in either
  3577. // *Operation.ServerResponse.Header or (if a response was returned at
  3578. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3579. // to check whether the returned error was because
  3580. // http.StatusNotModified was returned.
  3581. func (c *DeploymentsCancelPreviewCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3582. gensupport.SetOptions(c.urlParams_, opts...)
  3583. res, err := c.doRequest("json")
  3584. if res != nil && res.StatusCode == http.StatusNotModified {
  3585. if res.Body != nil {
  3586. res.Body.Close()
  3587. }
  3588. return nil, &googleapi.Error{
  3589. Code: res.StatusCode,
  3590. Header: res.Header,
  3591. }
  3592. }
  3593. if err != nil {
  3594. return nil, err
  3595. }
  3596. defer googleapi.CloseBody(res)
  3597. if err := googleapi.CheckResponse(res); err != nil {
  3598. return nil, err
  3599. }
  3600. ret := &Operation{
  3601. ServerResponse: googleapi.ServerResponse{
  3602. Header: res.Header,
  3603. HTTPStatusCode: res.StatusCode,
  3604. },
  3605. }
  3606. target := &ret
  3607. if err := gensupport.DecodeResponse(target, res); err != nil {
  3608. return nil, err
  3609. }
  3610. return ret, nil
  3611. // {
  3612. // "description": "Cancels and removes the preview currently associated with the deployment.",
  3613. // "httpMethod": "POST",
  3614. // "id": "deploymentmanager.deployments.cancelPreview",
  3615. // "parameterOrder": [
  3616. // "project",
  3617. // "deployment"
  3618. // ],
  3619. // "parameters": {
  3620. // "deployment": {
  3621. // "description": "The name of the deployment for this request.",
  3622. // "location": "path",
  3623. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  3624. // "required": true,
  3625. // "type": "string"
  3626. // },
  3627. // "project": {
  3628. // "description": "The project ID for this request.",
  3629. // "location": "path",
  3630. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  3631. // "required": true,
  3632. // "type": "string"
  3633. // }
  3634. // },
  3635. // "path": "{project}/global/deployments/{deployment}/cancelPreview",
  3636. // "request": {
  3637. // "$ref": "DeploymentsCancelPreviewRequest"
  3638. // },
  3639. // "response": {
  3640. // "$ref": "Operation"
  3641. // },
  3642. // "scopes": [
  3643. // "https://www.googleapis.com/auth/cloud-platform",
  3644. // "https://www.googleapis.com/auth/ndev.cloudman"
  3645. // ]
  3646. // }
  3647. }
  3648. // method id "deploymentmanager.deployments.delete":
  3649. type DeploymentsDeleteCall struct {
  3650. s *Service
  3651. project string
  3652. deployment string
  3653. urlParams_ gensupport.URLParams
  3654. ctx_ context.Context
  3655. header_ http.Header
  3656. }
  3657. // Delete: Deletes a deployment and all of the resources in the
  3658. // deployment.
  3659. func (r *DeploymentsService) Delete(project string, deployment string) *DeploymentsDeleteCall {
  3660. c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3661. c.project = project
  3662. c.deployment = deployment
  3663. return c
  3664. }
  3665. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  3666. // policy to use for deleting resources.
  3667. //
  3668. // Possible values:
  3669. // "ABANDON"
  3670. // "DELETE" (default)
  3671. func (c *DeploymentsDeleteCall) DeletePolicy(deletePolicy string) *DeploymentsDeleteCall {
  3672. c.urlParams_.Set("deletePolicy", deletePolicy)
  3673. return c
  3674. }
  3675. // Fields allows partial responses to be retrieved. See
  3676. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3677. // for more information.
  3678. func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall {
  3679. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3680. return c
  3681. }
  3682. // Context sets the context to be used in this call's Do method. Any
  3683. // pending HTTP request will be aborted if the provided context is
  3684. // canceled.
  3685. func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
  3686. c.ctx_ = ctx
  3687. return c
  3688. }
  3689. // Header returns an http.Header that can be modified by the caller to
  3690. // add HTTP headers to the request.
  3691. func (c *DeploymentsDeleteCall) Header() http.Header {
  3692. if c.header_ == nil {
  3693. c.header_ = make(http.Header)
  3694. }
  3695. return c.header_
  3696. }
  3697. func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3698. reqHeaders := make(http.Header)
  3699. for k, v := range c.header_ {
  3700. reqHeaders[k] = v
  3701. }
  3702. reqHeaders.Set("User-Agent", c.s.userAgent())
  3703. var body io.Reader = nil
  3704. c.urlParams_.Set("alt", alt)
  3705. c.urlParams_.Set("prettyPrint", "false")
  3706. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  3707. urls += "?" + c.urlParams_.Encode()
  3708. req, err := http.NewRequest("DELETE", urls, body)
  3709. if err != nil {
  3710. return nil, err
  3711. }
  3712. req.Header = reqHeaders
  3713. googleapi.Expand(req.URL, map[string]string{
  3714. "project": c.project,
  3715. "deployment": c.deployment,
  3716. })
  3717. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3718. }
  3719. // Do executes the "deploymentmanager.deployments.delete" call.
  3720. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3721. // status code is an error. Response headers are in either
  3722. // *Operation.ServerResponse.Header or (if a response was returned at
  3723. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3724. // to check whether the returned error was because
  3725. // http.StatusNotModified was returned.
  3726. func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3727. gensupport.SetOptions(c.urlParams_, opts...)
  3728. res, err := c.doRequest("json")
  3729. if res != nil && res.StatusCode == http.StatusNotModified {
  3730. if res.Body != nil {
  3731. res.Body.Close()
  3732. }
  3733. return nil, &googleapi.Error{
  3734. Code: res.StatusCode,
  3735. Header: res.Header,
  3736. }
  3737. }
  3738. if err != nil {
  3739. return nil, err
  3740. }
  3741. defer googleapi.CloseBody(res)
  3742. if err := googleapi.CheckResponse(res); err != nil {
  3743. return nil, err
  3744. }
  3745. ret := &Operation{
  3746. ServerResponse: googleapi.ServerResponse{
  3747. Header: res.Header,
  3748. HTTPStatusCode: res.StatusCode,
  3749. },
  3750. }
  3751. target := &ret
  3752. if err := gensupport.DecodeResponse(target, res); err != nil {
  3753. return nil, err
  3754. }
  3755. return ret, nil
  3756. // {
  3757. // "description": "Deletes a deployment and all of the resources in the deployment.",
  3758. // "httpMethod": "DELETE",
  3759. // "id": "deploymentmanager.deployments.delete",
  3760. // "parameterOrder": [
  3761. // "project",
  3762. // "deployment"
  3763. // ],
  3764. // "parameters": {
  3765. // "deletePolicy": {
  3766. // "default": "DELETE",
  3767. // "description": "Sets the policy to use for deleting resources.",
  3768. // "enum": [
  3769. // "ABANDON",
  3770. // "DELETE"
  3771. // ],
  3772. // "enumDescriptions": [
  3773. // "",
  3774. // ""
  3775. // ],
  3776. // "location": "query",
  3777. // "type": "string"
  3778. // },
  3779. // "deployment": {
  3780. // "description": "The name of the deployment for this request.",
  3781. // "location": "path",
  3782. // "required": true,
  3783. // "type": "string"
  3784. // },
  3785. // "project": {
  3786. // "description": "The project ID for this request.",
  3787. // "location": "path",
  3788. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  3789. // "required": true,
  3790. // "type": "string"
  3791. // }
  3792. // },
  3793. // "path": "{project}/global/deployments/{deployment}",
  3794. // "response": {
  3795. // "$ref": "Operation"
  3796. // },
  3797. // "scopes": [
  3798. // "https://www.googleapis.com/auth/cloud-platform",
  3799. // "https://www.googleapis.com/auth/ndev.cloudman"
  3800. // ]
  3801. // }
  3802. }
  3803. // method id "deploymentmanager.deployments.get":
  3804. type DeploymentsGetCall struct {
  3805. s *Service
  3806. project string
  3807. deployment string
  3808. urlParams_ gensupport.URLParams
  3809. ifNoneMatch_ string
  3810. ctx_ context.Context
  3811. header_ http.Header
  3812. }
  3813. // Get: Gets information about a specific deployment.
  3814. func (r *DeploymentsService) Get(project string, deployment string) *DeploymentsGetCall {
  3815. c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3816. c.project = project
  3817. c.deployment = deployment
  3818. return c
  3819. }
  3820. // Fields allows partial responses to be retrieved. See
  3821. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3822. // for more information.
  3823. func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall {
  3824. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3825. return c
  3826. }
  3827. // IfNoneMatch sets the optional parameter which makes the operation
  3828. // fail if the object's ETag matches the given value. This is useful for
  3829. // getting updates only after the object has changed since the last
  3830. // request. Use googleapi.IsNotModified to check whether the response
  3831. // error from Do is the result of In-None-Match.
  3832. func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall {
  3833. c.ifNoneMatch_ = entityTag
  3834. return c
  3835. }
  3836. // Context sets the context to be used in this call's Do method. Any
  3837. // pending HTTP request will be aborted if the provided context is
  3838. // canceled.
  3839. func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
  3840. c.ctx_ = ctx
  3841. return c
  3842. }
  3843. // Header returns an http.Header that can be modified by the caller to
  3844. // add HTTP headers to the request.
  3845. func (c *DeploymentsGetCall) Header() http.Header {
  3846. if c.header_ == nil {
  3847. c.header_ = make(http.Header)
  3848. }
  3849. return c.header_
  3850. }
  3851. func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  3852. reqHeaders := make(http.Header)
  3853. for k, v := range c.header_ {
  3854. reqHeaders[k] = v
  3855. }
  3856. reqHeaders.Set("User-Agent", c.s.userAgent())
  3857. if c.ifNoneMatch_ != "" {
  3858. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3859. }
  3860. var body io.Reader = nil
  3861. c.urlParams_.Set("alt", alt)
  3862. c.urlParams_.Set("prettyPrint", "false")
  3863. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  3864. urls += "?" + c.urlParams_.Encode()
  3865. req, err := http.NewRequest("GET", urls, body)
  3866. if err != nil {
  3867. return nil, err
  3868. }
  3869. req.Header = reqHeaders
  3870. googleapi.Expand(req.URL, map[string]string{
  3871. "project": c.project,
  3872. "deployment": c.deployment,
  3873. })
  3874. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3875. }
  3876. // Do executes the "deploymentmanager.deployments.get" call.
  3877. // Exactly one of *Deployment or error will be non-nil. Any non-2xx
  3878. // status code is an error. Response headers are in either
  3879. // *Deployment.ServerResponse.Header or (if a response was returned at
  3880. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3881. // to check whether the returned error was because
  3882. // http.StatusNotModified was returned.
  3883. func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
  3884. gensupport.SetOptions(c.urlParams_, opts...)
  3885. res, err := c.doRequest("json")
  3886. if res != nil && res.StatusCode == http.StatusNotModified {
  3887. if res.Body != nil {
  3888. res.Body.Close()
  3889. }
  3890. return nil, &googleapi.Error{
  3891. Code: res.StatusCode,
  3892. Header: res.Header,
  3893. }
  3894. }
  3895. if err != nil {
  3896. return nil, err
  3897. }
  3898. defer googleapi.CloseBody(res)
  3899. if err := googleapi.CheckResponse(res); err != nil {
  3900. return nil, err
  3901. }
  3902. ret := &Deployment{
  3903. ServerResponse: googleapi.ServerResponse{
  3904. Header: res.Header,
  3905. HTTPStatusCode: res.StatusCode,
  3906. },
  3907. }
  3908. target := &ret
  3909. if err := gensupport.DecodeResponse(target, res); err != nil {
  3910. return nil, err
  3911. }
  3912. return ret, nil
  3913. // {
  3914. // "description": "Gets information about a specific deployment.",
  3915. // "httpMethod": "GET",
  3916. // "id": "deploymentmanager.deployments.get",
  3917. // "parameterOrder": [
  3918. // "project",
  3919. // "deployment"
  3920. // ],
  3921. // "parameters": {
  3922. // "deployment": {
  3923. // "description": "The name of the deployment for this request.",
  3924. // "location": "path",
  3925. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  3926. // "required": true,
  3927. // "type": "string"
  3928. // },
  3929. // "project": {
  3930. // "description": "The project ID for this request.",
  3931. // "location": "path",
  3932. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  3933. // "required": true,
  3934. // "type": "string"
  3935. // }
  3936. // },
  3937. // "path": "{project}/global/deployments/{deployment}",
  3938. // "response": {
  3939. // "$ref": "Deployment"
  3940. // },
  3941. // "scopes": [
  3942. // "https://www.googleapis.com/auth/cloud-platform",
  3943. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  3944. // "https://www.googleapis.com/auth/ndev.cloudman",
  3945. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  3946. // ]
  3947. // }
  3948. }
  3949. // method id "deploymentmanager.deployments.getIamPolicy":
  3950. type DeploymentsGetIamPolicyCall struct {
  3951. s *Service
  3952. project string
  3953. resource string
  3954. urlParams_ gensupport.URLParams
  3955. ifNoneMatch_ string
  3956. ctx_ context.Context
  3957. header_ http.Header
  3958. }
  3959. // GetIamPolicy: Gets the access control policy for a resource. May be
  3960. // empty if no such policy or resource exists.
  3961. func (r *DeploymentsService) GetIamPolicy(project string, resource string) *DeploymentsGetIamPolicyCall {
  3962. c := &DeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3963. c.project = project
  3964. c.resource = resource
  3965. return c
  3966. }
  3967. // Fields allows partial responses to be retrieved. See
  3968. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3969. // for more information.
  3970. func (c *DeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsGetIamPolicyCall {
  3971. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3972. return c
  3973. }
  3974. // IfNoneMatch sets the optional parameter which makes the operation
  3975. // fail if the object's ETag matches the given value. This is useful for
  3976. // getting updates only after the object has changed since the last
  3977. // request. Use googleapi.IsNotModified to check whether the response
  3978. // error from Do is the result of In-None-Match.
  3979. func (c *DeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *DeploymentsGetIamPolicyCall {
  3980. c.ifNoneMatch_ = entityTag
  3981. return c
  3982. }
  3983. // Context sets the context to be used in this call's Do method. Any
  3984. // pending HTTP request will be aborted if the provided context is
  3985. // canceled.
  3986. func (c *DeploymentsGetIamPolicyCall) Context(ctx context.Context) *DeploymentsGetIamPolicyCall {
  3987. c.ctx_ = ctx
  3988. return c
  3989. }
  3990. // Header returns an http.Header that can be modified by the caller to
  3991. // add HTTP headers to the request.
  3992. func (c *DeploymentsGetIamPolicyCall) Header() http.Header {
  3993. if c.header_ == nil {
  3994. c.header_ = make(http.Header)
  3995. }
  3996. return c.header_
  3997. }
  3998. func (c *DeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3999. reqHeaders := make(http.Header)
  4000. for k, v := range c.header_ {
  4001. reqHeaders[k] = v
  4002. }
  4003. reqHeaders.Set("User-Agent", c.s.userAgent())
  4004. if c.ifNoneMatch_ != "" {
  4005. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4006. }
  4007. var body io.Reader = nil
  4008. c.urlParams_.Set("alt", alt)
  4009. c.urlParams_.Set("prettyPrint", "false")
  4010. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/getIamPolicy")
  4011. urls += "?" + c.urlParams_.Encode()
  4012. req, err := http.NewRequest("GET", urls, body)
  4013. if err != nil {
  4014. return nil, err
  4015. }
  4016. req.Header = reqHeaders
  4017. googleapi.Expand(req.URL, map[string]string{
  4018. "project": c.project,
  4019. "resource": c.resource,
  4020. })
  4021. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4022. }
  4023. // Do executes the "deploymentmanager.deployments.getIamPolicy" call.
  4024. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4025. // code is an error. Response headers are in either
  4026. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4027. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4028. // check whether the returned error was because http.StatusNotModified
  4029. // was returned.
  4030. func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4031. gensupport.SetOptions(c.urlParams_, opts...)
  4032. res, err := c.doRequest("json")
  4033. if res != nil && res.StatusCode == http.StatusNotModified {
  4034. if res.Body != nil {
  4035. res.Body.Close()
  4036. }
  4037. return nil, &googleapi.Error{
  4038. Code: res.StatusCode,
  4039. Header: res.Header,
  4040. }
  4041. }
  4042. if err != nil {
  4043. return nil, err
  4044. }
  4045. defer googleapi.CloseBody(res)
  4046. if err := googleapi.CheckResponse(res); err != nil {
  4047. return nil, err
  4048. }
  4049. ret := &Policy{
  4050. ServerResponse: googleapi.ServerResponse{
  4051. Header: res.Header,
  4052. HTTPStatusCode: res.StatusCode,
  4053. },
  4054. }
  4055. target := &ret
  4056. if err := gensupport.DecodeResponse(target, res); err != nil {
  4057. return nil, err
  4058. }
  4059. return ret, nil
  4060. // {
  4061. // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
  4062. // "httpMethod": "GET",
  4063. // "id": "deploymentmanager.deployments.getIamPolicy",
  4064. // "parameterOrder": [
  4065. // "project",
  4066. // "resource"
  4067. // ],
  4068. // "parameters": {
  4069. // "project": {
  4070. // "description": "Project ID for this request.",
  4071. // "location": "path",
  4072. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  4073. // "required": true,
  4074. // "type": "string"
  4075. // },
  4076. // "resource": {
  4077. // "description": "Name or id of the resource for this request.",
  4078. // "location": "path",
  4079. // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
  4080. // "required": true,
  4081. // "type": "string"
  4082. // }
  4083. // },
  4084. // "path": "{project}/global/deployments/{resource}/getIamPolicy",
  4085. // "response": {
  4086. // "$ref": "Policy"
  4087. // },
  4088. // "scopes": [
  4089. // "https://www.googleapis.com/auth/cloud-platform",
  4090. // "https://www.googleapis.com/auth/ndev.cloudman"
  4091. // ]
  4092. // }
  4093. }
  4094. // method id "deploymentmanager.deployments.insert":
  4095. type DeploymentsInsertCall struct {
  4096. s *Service
  4097. project string
  4098. deployment *Deployment
  4099. urlParams_ gensupport.URLParams
  4100. ctx_ context.Context
  4101. header_ http.Header
  4102. }
  4103. // Insert: Creates a deployment and all of the resources described by
  4104. // the deployment manifest.
  4105. func (r *DeploymentsService) Insert(project string, deployment *Deployment) *DeploymentsInsertCall {
  4106. c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4107. c.project = project
  4108. c.deployment = deployment
  4109. return c
  4110. }
  4111. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  4112. // policy to use for creating new resources.
  4113. //
  4114. // Possible values:
  4115. // "ACQUIRE"
  4116. // "CREATE"
  4117. // "CREATE_OR_ACQUIRE" (default)
  4118. func (c *DeploymentsInsertCall) CreatePolicy(createPolicy string) *DeploymentsInsertCall {
  4119. c.urlParams_.Set("createPolicy", createPolicy)
  4120. return c
  4121. }
  4122. // Preview sets the optional parameter "preview": If set to true,
  4123. // creates a deployment and creates "shell" resources but does not
  4124. // actually instantiate these resources. This allows you to preview what
  4125. // your deployment looks like. After previewing a deployment, you can
  4126. // deploy your resources by making a request with the update() method or
  4127. // you can use the cancelPreview() method to cancel the preview
  4128. // altogether. Note that the deployment will still exist after you
  4129. // cancel the preview and you must separately delete this deployment if
  4130. // you want to remove it.
  4131. func (c *DeploymentsInsertCall) Preview(preview bool) *DeploymentsInsertCall {
  4132. c.urlParams_.Set("preview", fmt.Sprint(preview))
  4133. return c
  4134. }
  4135. // Fields allows partial responses to be retrieved. See
  4136. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4137. // for more information.
  4138. func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall {
  4139. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4140. return c
  4141. }
  4142. // Context sets the context to be used in this call's Do method. Any
  4143. // pending HTTP request will be aborted if the provided context is
  4144. // canceled.
  4145. func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
  4146. c.ctx_ = ctx
  4147. return c
  4148. }
  4149. // Header returns an http.Header that can be modified by the caller to
  4150. // add HTTP headers to the request.
  4151. func (c *DeploymentsInsertCall) Header() http.Header {
  4152. if c.header_ == nil {
  4153. c.header_ = make(http.Header)
  4154. }
  4155. return c.header_
  4156. }
  4157. func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
  4158. reqHeaders := make(http.Header)
  4159. for k, v := range c.header_ {
  4160. reqHeaders[k] = v
  4161. }
  4162. reqHeaders.Set("User-Agent", c.s.userAgent())
  4163. var body io.Reader = nil
  4164. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
  4165. if err != nil {
  4166. return nil, err
  4167. }
  4168. reqHeaders.Set("Content-Type", "application/json")
  4169. c.urlParams_.Set("alt", alt)
  4170. c.urlParams_.Set("prettyPrint", "false")
  4171. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
  4172. urls += "?" + c.urlParams_.Encode()
  4173. req, err := http.NewRequest("POST", urls, body)
  4174. if err != nil {
  4175. return nil, err
  4176. }
  4177. req.Header = reqHeaders
  4178. googleapi.Expand(req.URL, map[string]string{
  4179. "project": c.project,
  4180. })
  4181. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4182. }
  4183. // Do executes the "deploymentmanager.deployments.insert" call.
  4184. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4185. // status code is an error. Response headers are in either
  4186. // *Operation.ServerResponse.Header or (if a response was returned at
  4187. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4188. // to check whether the returned error was because
  4189. // http.StatusNotModified was returned.
  4190. func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4191. gensupport.SetOptions(c.urlParams_, opts...)
  4192. res, err := c.doRequest("json")
  4193. if res != nil && res.StatusCode == http.StatusNotModified {
  4194. if res.Body != nil {
  4195. res.Body.Close()
  4196. }
  4197. return nil, &googleapi.Error{
  4198. Code: res.StatusCode,
  4199. Header: res.Header,
  4200. }
  4201. }
  4202. if err != nil {
  4203. return nil, err
  4204. }
  4205. defer googleapi.CloseBody(res)
  4206. if err := googleapi.CheckResponse(res); err != nil {
  4207. return nil, err
  4208. }
  4209. ret := &Operation{
  4210. ServerResponse: googleapi.ServerResponse{
  4211. Header: res.Header,
  4212. HTTPStatusCode: res.StatusCode,
  4213. },
  4214. }
  4215. target := &ret
  4216. if err := gensupport.DecodeResponse(target, res); err != nil {
  4217. return nil, err
  4218. }
  4219. return ret, nil
  4220. // {
  4221. // "description": "Creates a deployment and all of the resources described by the deployment manifest.",
  4222. // "httpMethod": "POST",
  4223. // "id": "deploymentmanager.deployments.insert",
  4224. // "parameterOrder": [
  4225. // "project"
  4226. // ],
  4227. // "parameters": {
  4228. // "createPolicy": {
  4229. // "default": "CREATE_OR_ACQUIRE",
  4230. // "description": "Sets the policy to use for creating new resources.",
  4231. // "enum": [
  4232. // "ACQUIRE",
  4233. // "CREATE",
  4234. // "CREATE_OR_ACQUIRE"
  4235. // ],
  4236. // "enumDescriptions": [
  4237. // "",
  4238. // "",
  4239. // ""
  4240. // ],
  4241. // "location": "query",
  4242. // "type": "string"
  4243. // },
  4244. // "preview": {
  4245. // "description": "If set to true, creates a deployment and creates \"shell\" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.",
  4246. // "location": "query",
  4247. // "type": "boolean"
  4248. // },
  4249. // "project": {
  4250. // "description": "The project ID for this request.",
  4251. // "location": "path",
  4252. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  4253. // "required": true,
  4254. // "type": "string"
  4255. // }
  4256. // },
  4257. // "path": "{project}/global/deployments",
  4258. // "request": {
  4259. // "$ref": "Deployment"
  4260. // },
  4261. // "response": {
  4262. // "$ref": "Operation"
  4263. // },
  4264. // "scopes": [
  4265. // "https://www.googleapis.com/auth/cloud-platform",
  4266. // "https://www.googleapis.com/auth/ndev.cloudman"
  4267. // ]
  4268. // }
  4269. }
  4270. // method id "deploymentmanager.deployments.list":
  4271. type DeploymentsListCall struct {
  4272. s *Service
  4273. project string
  4274. urlParams_ gensupport.URLParams
  4275. ifNoneMatch_ string
  4276. ctx_ context.Context
  4277. header_ http.Header
  4278. }
  4279. // List: Lists all deployments for a given project.
  4280. func (r *DeploymentsService) List(project string) *DeploymentsListCall {
  4281. c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4282. c.project = project
  4283. return c
  4284. }
  4285. // Filter sets the optional parameter "filter": A filter expression that
  4286. // filters resources listed in the response. The expression must specify
  4287. // the field name, a comparison operator, and the value that you want to
  4288. // use for filtering. The value must be a string, a number, or a
  4289. // boolean. The comparison operator must be either =, !=, >, or <.
  4290. //
  4291. // For example, if you are filtering Compute Engine instances, you can
  4292. // exclude instances named example-instance by specifying name !=
  4293. // example-instance.
  4294. //
  4295. // You can also filter nested fields. For example, you could specify
  4296. // scheduling.automaticRestart = false to include instances only if they
  4297. // are not scheduled for automatic restarts. You can use filtering on
  4298. // nested fields to filter based on resource labels.
  4299. //
  4300. // To filter on multiple expressions, provide each separate expression
  4301. // within parentheses. For example, (scheduling.automaticRestart = true)
  4302. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  4303. // AND expression. However, you can include AND and OR expressions
  4304. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  4305. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  4306. // true).
  4307. func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall {
  4308. c.urlParams_.Set("filter", filter)
  4309. return c
  4310. }
  4311. // MaxResults sets the optional parameter "maxResults": The maximum
  4312. // number of results per page that should be returned. If the number of
  4313. // available results is larger than maxResults, Compute Engine returns a
  4314. // nextPageToken that can be used to get the next page of results in
  4315. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  4316. // (Default: 500)
  4317. func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall {
  4318. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4319. return c
  4320. }
  4321. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  4322. // a certain order. By default, results are returned in alphanumerical
  4323. // order based on the resource name.
  4324. //
  4325. // You can also sort results in descending order based on the creation
  4326. // timestamp using orderBy="creationTimestamp desc". This sorts results
  4327. // based on the creationTimestamp field in reverse chronological order
  4328. // (newest result first). Use this to sort resources like operations so
  4329. // that the newest operation is returned first.
  4330. //
  4331. // Currently, only sorting by name or creationTimestamp desc is
  4332. // supported.
  4333. func (c *DeploymentsListCall) OrderBy(orderBy string) *DeploymentsListCall {
  4334. c.urlParams_.Set("orderBy", orderBy)
  4335. return c
  4336. }
  4337. // PageToken sets the optional parameter "pageToken": Specifies a page
  4338. // token to use. Set pageToken to the nextPageToken returned by a
  4339. // previous list request to get the next page of results.
  4340. func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall {
  4341. c.urlParams_.Set("pageToken", pageToken)
  4342. return c
  4343. }
  4344. // Fields allows partial responses to be retrieved. See
  4345. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4346. // for more information.
  4347. func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall {
  4348. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4349. return c
  4350. }
  4351. // IfNoneMatch sets the optional parameter which makes the operation
  4352. // fail if the object's ETag matches the given value. This is useful for
  4353. // getting updates only after the object has changed since the last
  4354. // request. Use googleapi.IsNotModified to check whether the response
  4355. // error from Do is the result of In-None-Match.
  4356. func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall {
  4357. c.ifNoneMatch_ = entityTag
  4358. return c
  4359. }
  4360. // Context sets the context to be used in this call's Do method. Any
  4361. // pending HTTP request will be aborted if the provided context is
  4362. // canceled.
  4363. func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
  4364. c.ctx_ = ctx
  4365. return c
  4366. }
  4367. // Header returns an http.Header that can be modified by the caller to
  4368. // add HTTP headers to the request.
  4369. func (c *DeploymentsListCall) Header() http.Header {
  4370. if c.header_ == nil {
  4371. c.header_ = make(http.Header)
  4372. }
  4373. return c.header_
  4374. }
  4375. func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  4376. reqHeaders := make(http.Header)
  4377. for k, v := range c.header_ {
  4378. reqHeaders[k] = v
  4379. }
  4380. reqHeaders.Set("User-Agent", c.s.userAgent())
  4381. if c.ifNoneMatch_ != "" {
  4382. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4383. }
  4384. var body io.Reader = nil
  4385. c.urlParams_.Set("alt", alt)
  4386. c.urlParams_.Set("prettyPrint", "false")
  4387. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
  4388. urls += "?" + c.urlParams_.Encode()
  4389. req, err := http.NewRequest("GET", urls, body)
  4390. if err != nil {
  4391. return nil, err
  4392. }
  4393. req.Header = reqHeaders
  4394. googleapi.Expand(req.URL, map[string]string{
  4395. "project": c.project,
  4396. })
  4397. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4398. }
  4399. // Do executes the "deploymentmanager.deployments.list" call.
  4400. // Exactly one of *DeploymentsListResponse or error will be non-nil. Any
  4401. // non-2xx status code is an error. Response headers are in either
  4402. // *DeploymentsListResponse.ServerResponse.Header or (if a response was
  4403. // returned at all) in error.(*googleapi.Error).Header. Use
  4404. // googleapi.IsNotModified to check whether the returned error was
  4405. // because http.StatusNotModified was returned.
  4406. func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) {
  4407. gensupport.SetOptions(c.urlParams_, opts...)
  4408. res, err := c.doRequest("json")
  4409. if res != nil && res.StatusCode == http.StatusNotModified {
  4410. if res.Body != nil {
  4411. res.Body.Close()
  4412. }
  4413. return nil, &googleapi.Error{
  4414. Code: res.StatusCode,
  4415. Header: res.Header,
  4416. }
  4417. }
  4418. if err != nil {
  4419. return nil, err
  4420. }
  4421. defer googleapi.CloseBody(res)
  4422. if err := googleapi.CheckResponse(res); err != nil {
  4423. return nil, err
  4424. }
  4425. ret := &DeploymentsListResponse{
  4426. ServerResponse: googleapi.ServerResponse{
  4427. Header: res.Header,
  4428. HTTPStatusCode: res.StatusCode,
  4429. },
  4430. }
  4431. target := &ret
  4432. if err := gensupport.DecodeResponse(target, res); err != nil {
  4433. return nil, err
  4434. }
  4435. return ret, nil
  4436. // {
  4437. // "description": "Lists all deployments for a given project.",
  4438. // "httpMethod": "GET",
  4439. // "id": "deploymentmanager.deployments.list",
  4440. // "parameterOrder": [
  4441. // "project"
  4442. // ],
  4443. // "parameters": {
  4444. // "filter": {
  4445. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  4446. // "location": "query",
  4447. // "type": "string"
  4448. // },
  4449. // "maxResults": {
  4450. // "default": "500",
  4451. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  4452. // "format": "uint32",
  4453. // "location": "query",
  4454. // "minimum": "0",
  4455. // "type": "integer"
  4456. // },
  4457. // "orderBy": {
  4458. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  4459. // "location": "query",
  4460. // "type": "string"
  4461. // },
  4462. // "pageToken": {
  4463. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  4464. // "location": "query",
  4465. // "type": "string"
  4466. // },
  4467. // "project": {
  4468. // "description": "The project ID for this request.",
  4469. // "location": "path",
  4470. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  4471. // "required": true,
  4472. // "type": "string"
  4473. // }
  4474. // },
  4475. // "path": "{project}/global/deployments",
  4476. // "response": {
  4477. // "$ref": "DeploymentsListResponse"
  4478. // },
  4479. // "scopes": [
  4480. // "https://www.googleapis.com/auth/cloud-platform",
  4481. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  4482. // "https://www.googleapis.com/auth/ndev.cloudman",
  4483. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  4484. // ]
  4485. // }
  4486. }
  4487. // Pages invokes f for each page of results.
  4488. // A non-nil error returned from f will halt the iteration.
  4489. // The provided context supersedes any context provided to the Context method.
  4490. func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error {
  4491. c.ctx_ = ctx
  4492. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4493. for {
  4494. x, err := c.Do()
  4495. if err != nil {
  4496. return err
  4497. }
  4498. if err := f(x); err != nil {
  4499. return err
  4500. }
  4501. if x.NextPageToken == "" {
  4502. return nil
  4503. }
  4504. c.PageToken(x.NextPageToken)
  4505. }
  4506. }
  4507. // method id "deploymentmanager.deployments.patch":
  4508. type DeploymentsPatchCall struct {
  4509. s *Service
  4510. project string
  4511. deployment string
  4512. deployment2 *Deployment
  4513. urlParams_ gensupport.URLParams
  4514. ctx_ context.Context
  4515. header_ http.Header
  4516. }
  4517. // Patch: Updates a deployment and all of the resources described by the
  4518. // deployment manifest. This method supports patch semantics.
  4519. func (r *DeploymentsService) Patch(project string, deployment string, deployment2 *Deployment) *DeploymentsPatchCall {
  4520. c := &DeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4521. c.project = project
  4522. c.deployment = deployment
  4523. c.deployment2 = deployment2
  4524. return c
  4525. }
  4526. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  4527. // policy to use for creating new resources.
  4528. //
  4529. // Possible values:
  4530. // "ACQUIRE"
  4531. // "CREATE"
  4532. // "CREATE_OR_ACQUIRE" (default)
  4533. func (c *DeploymentsPatchCall) CreatePolicy(createPolicy string) *DeploymentsPatchCall {
  4534. c.urlParams_.Set("createPolicy", createPolicy)
  4535. return c
  4536. }
  4537. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  4538. // policy to use for deleting resources.
  4539. //
  4540. // Possible values:
  4541. // "ABANDON"
  4542. // "DELETE" (default)
  4543. func (c *DeploymentsPatchCall) DeletePolicy(deletePolicy string) *DeploymentsPatchCall {
  4544. c.urlParams_.Set("deletePolicy", deletePolicy)
  4545. return c
  4546. }
  4547. // Preview sets the optional parameter "preview": If set to true,
  4548. // updates the deployment and creates and updates the "shell" resources
  4549. // but does not actually alter or instantiate these resources. This
  4550. // allows you to preview what your deployment will look like. You can
  4551. // use this intent to preview how an update would affect your
  4552. // deployment. You must provide a target.config with a configuration if
  4553. // this is set to true. After previewing a deployment, you can deploy
  4554. // your resources by making a request with the update() or you can
  4555. // cancelPreview() to remove the preview altogether. Note that the
  4556. // deployment will still exist after you cancel the preview and you must
  4557. // separately delete this deployment if you want to remove it.
  4558. func (c *DeploymentsPatchCall) Preview(preview bool) *DeploymentsPatchCall {
  4559. c.urlParams_.Set("preview", fmt.Sprint(preview))
  4560. return c
  4561. }
  4562. // Fields allows partial responses to be retrieved. See
  4563. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4564. // for more information.
  4565. func (c *DeploymentsPatchCall) Fields(s ...googleapi.Field) *DeploymentsPatchCall {
  4566. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4567. return c
  4568. }
  4569. // Context sets the context to be used in this call's Do method. Any
  4570. // pending HTTP request will be aborted if the provided context is
  4571. // canceled.
  4572. func (c *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall {
  4573. c.ctx_ = ctx
  4574. return c
  4575. }
  4576. // Header returns an http.Header that can be modified by the caller to
  4577. // add HTTP headers to the request.
  4578. func (c *DeploymentsPatchCall) Header() http.Header {
  4579. if c.header_ == nil {
  4580. c.header_ = make(http.Header)
  4581. }
  4582. return c.header_
  4583. }
  4584. func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
  4585. reqHeaders := make(http.Header)
  4586. for k, v := range c.header_ {
  4587. reqHeaders[k] = v
  4588. }
  4589. reqHeaders.Set("User-Agent", c.s.userAgent())
  4590. var body io.Reader = nil
  4591. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
  4592. if err != nil {
  4593. return nil, err
  4594. }
  4595. reqHeaders.Set("Content-Type", "application/json")
  4596. c.urlParams_.Set("alt", alt)
  4597. c.urlParams_.Set("prettyPrint", "false")
  4598. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  4599. urls += "?" + c.urlParams_.Encode()
  4600. req, err := http.NewRequest("PATCH", urls, body)
  4601. if err != nil {
  4602. return nil, err
  4603. }
  4604. req.Header = reqHeaders
  4605. googleapi.Expand(req.URL, map[string]string{
  4606. "project": c.project,
  4607. "deployment": c.deployment,
  4608. })
  4609. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4610. }
  4611. // Do executes the "deploymentmanager.deployments.patch" call.
  4612. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4613. // status code is an error. Response headers are in either
  4614. // *Operation.ServerResponse.Header or (if a response was returned at
  4615. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4616. // to check whether the returned error was because
  4617. // http.StatusNotModified was returned.
  4618. func (c *DeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4619. gensupport.SetOptions(c.urlParams_, opts...)
  4620. res, err := c.doRequest("json")
  4621. if res != nil && res.StatusCode == http.StatusNotModified {
  4622. if res.Body != nil {
  4623. res.Body.Close()
  4624. }
  4625. return nil, &googleapi.Error{
  4626. Code: res.StatusCode,
  4627. Header: res.Header,
  4628. }
  4629. }
  4630. if err != nil {
  4631. return nil, err
  4632. }
  4633. defer googleapi.CloseBody(res)
  4634. if err := googleapi.CheckResponse(res); err != nil {
  4635. return nil, err
  4636. }
  4637. ret := &Operation{
  4638. ServerResponse: googleapi.ServerResponse{
  4639. Header: res.Header,
  4640. HTTPStatusCode: res.StatusCode,
  4641. },
  4642. }
  4643. target := &ret
  4644. if err := gensupport.DecodeResponse(target, res); err != nil {
  4645. return nil, err
  4646. }
  4647. return ret, nil
  4648. // {
  4649. // "description": "Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.",
  4650. // "httpMethod": "PATCH",
  4651. // "id": "deploymentmanager.deployments.patch",
  4652. // "parameterOrder": [
  4653. // "project",
  4654. // "deployment"
  4655. // ],
  4656. // "parameters": {
  4657. // "createPolicy": {
  4658. // "default": "CREATE_OR_ACQUIRE",
  4659. // "description": "Sets the policy to use for creating new resources.",
  4660. // "enum": [
  4661. // "ACQUIRE",
  4662. // "CREATE",
  4663. // "CREATE_OR_ACQUIRE"
  4664. // ],
  4665. // "enumDescriptions": [
  4666. // "",
  4667. // "",
  4668. // ""
  4669. // ],
  4670. // "location": "query",
  4671. // "type": "string"
  4672. // },
  4673. // "deletePolicy": {
  4674. // "default": "DELETE",
  4675. // "description": "Sets the policy to use for deleting resources.",
  4676. // "enum": [
  4677. // "ABANDON",
  4678. // "DELETE"
  4679. // ],
  4680. // "enumDescriptions": [
  4681. // "",
  4682. // ""
  4683. // ],
  4684. // "location": "query",
  4685. // "type": "string"
  4686. // },
  4687. // "deployment": {
  4688. // "description": "The name of the deployment for this request.",
  4689. // "location": "path",
  4690. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  4691. // "required": true,
  4692. // "type": "string"
  4693. // },
  4694. // "preview": {
  4695. // "default": "false",
  4696. // "description": "If set to true, updates the deployment and creates and updates the \"shell\" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.",
  4697. // "location": "query",
  4698. // "type": "boolean"
  4699. // },
  4700. // "project": {
  4701. // "description": "The project ID for this request.",
  4702. // "location": "path",
  4703. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  4704. // "required": true,
  4705. // "type": "string"
  4706. // }
  4707. // },
  4708. // "path": "{project}/global/deployments/{deployment}",
  4709. // "request": {
  4710. // "$ref": "Deployment"
  4711. // },
  4712. // "response": {
  4713. // "$ref": "Operation"
  4714. // },
  4715. // "scopes": [
  4716. // "https://www.googleapis.com/auth/cloud-platform",
  4717. // "https://www.googleapis.com/auth/ndev.cloudman"
  4718. // ]
  4719. // }
  4720. }
  4721. // method id "deploymentmanager.deployments.setIamPolicy":
  4722. type DeploymentsSetIamPolicyCall struct {
  4723. s *Service
  4724. project string
  4725. resource string
  4726. globalsetpolicyrequest *GlobalSetPolicyRequest
  4727. urlParams_ gensupport.URLParams
  4728. ctx_ context.Context
  4729. header_ http.Header
  4730. }
  4731. // SetIamPolicy: Sets the access control policy on the specified
  4732. // resource. Replaces any existing policy.
  4733. func (r *DeploymentsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *DeploymentsSetIamPolicyCall {
  4734. c := &DeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4735. c.project = project
  4736. c.resource = resource
  4737. c.globalsetpolicyrequest = globalsetpolicyrequest
  4738. return c
  4739. }
  4740. // Fields allows partial responses to be retrieved. See
  4741. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4742. // for more information.
  4743. func (c *DeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsSetIamPolicyCall {
  4744. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4745. return c
  4746. }
  4747. // Context sets the context to be used in this call's Do method. Any
  4748. // pending HTTP request will be aborted if the provided context is
  4749. // canceled.
  4750. func (c *DeploymentsSetIamPolicyCall) Context(ctx context.Context) *DeploymentsSetIamPolicyCall {
  4751. c.ctx_ = ctx
  4752. return c
  4753. }
  4754. // Header returns an http.Header that can be modified by the caller to
  4755. // add HTTP headers to the request.
  4756. func (c *DeploymentsSetIamPolicyCall) Header() http.Header {
  4757. if c.header_ == nil {
  4758. c.header_ = make(http.Header)
  4759. }
  4760. return c.header_
  4761. }
  4762. func (c *DeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4763. reqHeaders := make(http.Header)
  4764. for k, v := range c.header_ {
  4765. reqHeaders[k] = v
  4766. }
  4767. reqHeaders.Set("User-Agent", c.s.userAgent())
  4768. var body io.Reader = nil
  4769. body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
  4770. if err != nil {
  4771. return nil, err
  4772. }
  4773. reqHeaders.Set("Content-Type", "application/json")
  4774. c.urlParams_.Set("alt", alt)
  4775. c.urlParams_.Set("prettyPrint", "false")
  4776. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/setIamPolicy")
  4777. urls += "?" + c.urlParams_.Encode()
  4778. req, err := http.NewRequest("POST", urls, body)
  4779. if err != nil {
  4780. return nil, err
  4781. }
  4782. req.Header = reqHeaders
  4783. googleapi.Expand(req.URL, map[string]string{
  4784. "project": c.project,
  4785. "resource": c.resource,
  4786. })
  4787. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4788. }
  4789. // Do executes the "deploymentmanager.deployments.setIamPolicy" call.
  4790. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4791. // code is an error. Response headers are in either
  4792. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4793. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4794. // check whether the returned error was because http.StatusNotModified
  4795. // was returned.
  4796. func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4797. gensupport.SetOptions(c.urlParams_, opts...)
  4798. res, err := c.doRequest("json")
  4799. if res != nil && res.StatusCode == http.StatusNotModified {
  4800. if res.Body != nil {
  4801. res.Body.Close()
  4802. }
  4803. return nil, &googleapi.Error{
  4804. Code: res.StatusCode,
  4805. Header: res.Header,
  4806. }
  4807. }
  4808. if err != nil {
  4809. return nil, err
  4810. }
  4811. defer googleapi.CloseBody(res)
  4812. if err := googleapi.CheckResponse(res); err != nil {
  4813. return nil, err
  4814. }
  4815. ret := &Policy{
  4816. ServerResponse: googleapi.ServerResponse{
  4817. Header: res.Header,
  4818. HTTPStatusCode: res.StatusCode,
  4819. },
  4820. }
  4821. target := &ret
  4822. if err := gensupport.DecodeResponse(target, res); err != nil {
  4823. return nil, err
  4824. }
  4825. return ret, nil
  4826. // {
  4827. // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
  4828. // "httpMethod": "POST",
  4829. // "id": "deploymentmanager.deployments.setIamPolicy",
  4830. // "parameterOrder": [
  4831. // "project",
  4832. // "resource"
  4833. // ],
  4834. // "parameters": {
  4835. // "project": {
  4836. // "description": "Project ID for this request.",
  4837. // "location": "path",
  4838. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  4839. // "required": true,
  4840. // "type": "string"
  4841. // },
  4842. // "resource": {
  4843. // "description": "Name or id of the resource for this request.",
  4844. // "location": "path",
  4845. // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
  4846. // "required": true,
  4847. // "type": "string"
  4848. // }
  4849. // },
  4850. // "path": "{project}/global/deployments/{resource}/setIamPolicy",
  4851. // "request": {
  4852. // "$ref": "GlobalSetPolicyRequest"
  4853. // },
  4854. // "response": {
  4855. // "$ref": "Policy"
  4856. // },
  4857. // "scopes": [
  4858. // "https://www.googleapis.com/auth/cloud-platform",
  4859. // "https://www.googleapis.com/auth/ndev.cloudman"
  4860. // ]
  4861. // }
  4862. }
  4863. // method id "deploymentmanager.deployments.stop":
  4864. type DeploymentsStopCall struct {
  4865. s *Service
  4866. project string
  4867. deployment string
  4868. deploymentsstoprequest *DeploymentsStopRequest
  4869. urlParams_ gensupport.URLParams
  4870. ctx_ context.Context
  4871. header_ http.Header
  4872. }
  4873. // Stop: Stops an ongoing operation. This does not roll back any work
  4874. // that has already been completed, but prevents any new work from being
  4875. // started.
  4876. func (r *DeploymentsService) Stop(project string, deployment string, deploymentsstoprequest *DeploymentsStopRequest) *DeploymentsStopCall {
  4877. c := &DeploymentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4878. c.project = project
  4879. c.deployment = deployment
  4880. c.deploymentsstoprequest = deploymentsstoprequest
  4881. return c
  4882. }
  4883. // Fields allows partial responses to be retrieved. See
  4884. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4885. // for more information.
  4886. func (c *DeploymentsStopCall) Fields(s ...googleapi.Field) *DeploymentsStopCall {
  4887. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4888. return c
  4889. }
  4890. // Context sets the context to be used in this call's Do method. Any
  4891. // pending HTTP request will be aborted if the provided context is
  4892. // canceled.
  4893. func (c *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall {
  4894. c.ctx_ = ctx
  4895. return c
  4896. }
  4897. // Header returns an http.Header that can be modified by the caller to
  4898. // add HTTP headers to the request.
  4899. func (c *DeploymentsStopCall) Header() http.Header {
  4900. if c.header_ == nil {
  4901. c.header_ = make(http.Header)
  4902. }
  4903. return c.header_
  4904. }
  4905. func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) {
  4906. reqHeaders := make(http.Header)
  4907. for k, v := range c.header_ {
  4908. reqHeaders[k] = v
  4909. }
  4910. reqHeaders.Set("User-Agent", c.s.userAgent())
  4911. var body io.Reader = nil
  4912. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest)
  4913. if err != nil {
  4914. return nil, err
  4915. }
  4916. reqHeaders.Set("Content-Type", "application/json")
  4917. c.urlParams_.Set("alt", alt)
  4918. c.urlParams_.Set("prettyPrint", "false")
  4919. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/stop")
  4920. urls += "?" + c.urlParams_.Encode()
  4921. req, err := http.NewRequest("POST", urls, body)
  4922. if err != nil {
  4923. return nil, err
  4924. }
  4925. req.Header = reqHeaders
  4926. googleapi.Expand(req.URL, map[string]string{
  4927. "project": c.project,
  4928. "deployment": c.deployment,
  4929. })
  4930. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4931. }
  4932. // Do executes the "deploymentmanager.deployments.stop" call.
  4933. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4934. // status code is an error. Response headers are in either
  4935. // *Operation.ServerResponse.Header or (if a response was returned at
  4936. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4937. // to check whether the returned error was because
  4938. // http.StatusNotModified was returned.
  4939. func (c *DeploymentsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4940. gensupport.SetOptions(c.urlParams_, opts...)
  4941. res, err := c.doRequest("json")
  4942. if res != nil && res.StatusCode == http.StatusNotModified {
  4943. if res.Body != nil {
  4944. res.Body.Close()
  4945. }
  4946. return nil, &googleapi.Error{
  4947. Code: res.StatusCode,
  4948. Header: res.Header,
  4949. }
  4950. }
  4951. if err != nil {
  4952. return nil, err
  4953. }
  4954. defer googleapi.CloseBody(res)
  4955. if err := googleapi.CheckResponse(res); err != nil {
  4956. return nil, err
  4957. }
  4958. ret := &Operation{
  4959. ServerResponse: googleapi.ServerResponse{
  4960. Header: res.Header,
  4961. HTTPStatusCode: res.StatusCode,
  4962. },
  4963. }
  4964. target := &ret
  4965. if err := gensupport.DecodeResponse(target, res); err != nil {
  4966. return nil, err
  4967. }
  4968. return ret, nil
  4969. // {
  4970. // "description": "Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.",
  4971. // "httpMethod": "POST",
  4972. // "id": "deploymentmanager.deployments.stop",
  4973. // "parameterOrder": [
  4974. // "project",
  4975. // "deployment"
  4976. // ],
  4977. // "parameters": {
  4978. // "deployment": {
  4979. // "description": "The name of the deployment for this request.",
  4980. // "location": "path",
  4981. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  4982. // "required": true,
  4983. // "type": "string"
  4984. // },
  4985. // "project": {
  4986. // "description": "The project ID for this request.",
  4987. // "location": "path",
  4988. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  4989. // "required": true,
  4990. // "type": "string"
  4991. // }
  4992. // },
  4993. // "path": "{project}/global/deployments/{deployment}/stop",
  4994. // "request": {
  4995. // "$ref": "DeploymentsStopRequest"
  4996. // },
  4997. // "response": {
  4998. // "$ref": "Operation"
  4999. // },
  5000. // "scopes": [
  5001. // "https://www.googleapis.com/auth/cloud-platform",
  5002. // "https://www.googleapis.com/auth/ndev.cloudman"
  5003. // ]
  5004. // }
  5005. }
  5006. // method id "deploymentmanager.deployments.testIamPermissions":
  5007. type DeploymentsTestIamPermissionsCall struct {
  5008. s *Service
  5009. project string
  5010. resource string
  5011. testpermissionsrequest *TestPermissionsRequest
  5012. urlParams_ gensupport.URLParams
  5013. ctx_ context.Context
  5014. header_ http.Header
  5015. }
  5016. // TestIamPermissions: Returns permissions that a caller has on the
  5017. // specified resource.
  5018. func (r *DeploymentsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *DeploymentsTestIamPermissionsCall {
  5019. c := &DeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5020. c.project = project
  5021. c.resource = resource
  5022. c.testpermissionsrequest = testpermissionsrequest
  5023. return c
  5024. }
  5025. // Fields allows partial responses to be retrieved. See
  5026. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5027. // for more information.
  5028. func (c *DeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DeploymentsTestIamPermissionsCall {
  5029. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5030. return c
  5031. }
  5032. // Context sets the context to be used in this call's Do method. Any
  5033. // pending HTTP request will be aborted if the provided context is
  5034. // canceled.
  5035. func (c *DeploymentsTestIamPermissionsCall) Context(ctx context.Context) *DeploymentsTestIamPermissionsCall {
  5036. c.ctx_ = ctx
  5037. return c
  5038. }
  5039. // Header returns an http.Header that can be modified by the caller to
  5040. // add HTTP headers to the request.
  5041. func (c *DeploymentsTestIamPermissionsCall) Header() http.Header {
  5042. if c.header_ == nil {
  5043. c.header_ = make(http.Header)
  5044. }
  5045. return c.header_
  5046. }
  5047. func (c *DeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5048. reqHeaders := make(http.Header)
  5049. for k, v := range c.header_ {
  5050. reqHeaders[k] = v
  5051. }
  5052. reqHeaders.Set("User-Agent", c.s.userAgent())
  5053. var body io.Reader = nil
  5054. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
  5055. if err != nil {
  5056. return nil, err
  5057. }
  5058. reqHeaders.Set("Content-Type", "application/json")
  5059. c.urlParams_.Set("alt", alt)
  5060. c.urlParams_.Set("prettyPrint", "false")
  5061. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/testIamPermissions")
  5062. urls += "?" + c.urlParams_.Encode()
  5063. req, err := http.NewRequest("POST", urls, body)
  5064. if err != nil {
  5065. return nil, err
  5066. }
  5067. req.Header = reqHeaders
  5068. googleapi.Expand(req.URL, map[string]string{
  5069. "project": c.project,
  5070. "resource": c.resource,
  5071. })
  5072. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5073. }
  5074. // Do executes the "deploymentmanager.deployments.testIamPermissions" call.
  5075. // Exactly one of *TestPermissionsResponse or error will be non-nil. Any
  5076. // non-2xx status code is an error. Response headers are in either
  5077. // *TestPermissionsResponse.ServerResponse.Header or (if a response was
  5078. // returned at all) in error.(*googleapi.Error).Header. Use
  5079. // googleapi.IsNotModified to check whether the returned error was
  5080. // because http.StatusNotModified was returned.
  5081. func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
  5082. gensupport.SetOptions(c.urlParams_, opts...)
  5083. res, err := c.doRequest("json")
  5084. if res != nil && res.StatusCode == http.StatusNotModified {
  5085. if res.Body != nil {
  5086. res.Body.Close()
  5087. }
  5088. return nil, &googleapi.Error{
  5089. Code: res.StatusCode,
  5090. Header: res.Header,
  5091. }
  5092. }
  5093. if err != nil {
  5094. return nil, err
  5095. }
  5096. defer googleapi.CloseBody(res)
  5097. if err := googleapi.CheckResponse(res); err != nil {
  5098. return nil, err
  5099. }
  5100. ret := &TestPermissionsResponse{
  5101. ServerResponse: googleapi.ServerResponse{
  5102. Header: res.Header,
  5103. HTTPStatusCode: res.StatusCode,
  5104. },
  5105. }
  5106. target := &ret
  5107. if err := gensupport.DecodeResponse(target, res); err != nil {
  5108. return nil, err
  5109. }
  5110. return ret, nil
  5111. // {
  5112. // "description": "Returns permissions that a caller has on the specified resource.",
  5113. // "httpMethod": "POST",
  5114. // "id": "deploymentmanager.deployments.testIamPermissions",
  5115. // "parameterOrder": [
  5116. // "project",
  5117. // "resource"
  5118. // ],
  5119. // "parameters": {
  5120. // "project": {
  5121. // "description": "Project ID for this request.",
  5122. // "location": "path",
  5123. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  5124. // "required": true,
  5125. // "type": "string"
  5126. // },
  5127. // "resource": {
  5128. // "description": "Name or id of the resource for this request.",
  5129. // "location": "path",
  5130. // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
  5131. // "required": true,
  5132. // "type": "string"
  5133. // }
  5134. // },
  5135. // "path": "{project}/global/deployments/{resource}/testIamPermissions",
  5136. // "request": {
  5137. // "$ref": "TestPermissionsRequest"
  5138. // },
  5139. // "response": {
  5140. // "$ref": "TestPermissionsResponse"
  5141. // },
  5142. // "scopes": [
  5143. // "https://www.googleapis.com/auth/cloud-platform",
  5144. // "https://www.googleapis.com/auth/ndev.cloudman"
  5145. // ]
  5146. // }
  5147. }
  5148. // method id "deploymentmanager.deployments.update":
  5149. type DeploymentsUpdateCall struct {
  5150. s *Service
  5151. project string
  5152. deployment string
  5153. deployment2 *Deployment
  5154. urlParams_ gensupport.URLParams
  5155. ctx_ context.Context
  5156. header_ http.Header
  5157. }
  5158. // Update: Updates a deployment and all of the resources described by
  5159. // the deployment manifest.
  5160. func (r *DeploymentsService) Update(project string, deployment string, deployment2 *Deployment) *DeploymentsUpdateCall {
  5161. c := &DeploymentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5162. c.project = project
  5163. c.deployment = deployment
  5164. c.deployment2 = deployment2
  5165. return c
  5166. }
  5167. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  5168. // policy to use for creating new resources.
  5169. //
  5170. // Possible values:
  5171. // "ACQUIRE"
  5172. // "CREATE"
  5173. // "CREATE_OR_ACQUIRE" (default)
  5174. func (c *DeploymentsUpdateCall) CreatePolicy(createPolicy string) *DeploymentsUpdateCall {
  5175. c.urlParams_.Set("createPolicy", createPolicy)
  5176. return c
  5177. }
  5178. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  5179. // policy to use for deleting resources.
  5180. //
  5181. // Possible values:
  5182. // "ABANDON"
  5183. // "DELETE" (default)
  5184. func (c *DeploymentsUpdateCall) DeletePolicy(deletePolicy string) *DeploymentsUpdateCall {
  5185. c.urlParams_.Set("deletePolicy", deletePolicy)
  5186. return c
  5187. }
  5188. // Preview sets the optional parameter "preview": If set to true,
  5189. // updates the deployment and creates and updates the "shell" resources
  5190. // but does not actually alter or instantiate these resources. This
  5191. // allows you to preview what your deployment will look like. You can
  5192. // use this intent to preview how an update would affect your
  5193. // deployment. You must provide a target.config with a configuration if
  5194. // this is set to true. After previewing a deployment, you can deploy
  5195. // your resources by making a request with the update() or you can
  5196. // cancelPreview() to remove the preview altogether. Note that the
  5197. // deployment will still exist after you cancel the preview and you must
  5198. // separately delete this deployment if you want to remove it.
  5199. func (c *DeploymentsUpdateCall) Preview(preview bool) *DeploymentsUpdateCall {
  5200. c.urlParams_.Set("preview", fmt.Sprint(preview))
  5201. return c
  5202. }
  5203. // Fields allows partial responses to be retrieved. See
  5204. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5205. // for more information.
  5206. func (c *DeploymentsUpdateCall) Fields(s ...googleapi.Field) *DeploymentsUpdateCall {
  5207. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5208. return c
  5209. }
  5210. // Context sets the context to be used in this call's Do method. Any
  5211. // pending HTTP request will be aborted if the provided context is
  5212. // canceled.
  5213. func (c *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall {
  5214. c.ctx_ = ctx
  5215. return c
  5216. }
  5217. // Header returns an http.Header that can be modified by the caller to
  5218. // add HTTP headers to the request.
  5219. func (c *DeploymentsUpdateCall) Header() http.Header {
  5220. if c.header_ == nil {
  5221. c.header_ = make(http.Header)
  5222. }
  5223. return c.header_
  5224. }
  5225. func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5226. reqHeaders := make(http.Header)
  5227. for k, v := range c.header_ {
  5228. reqHeaders[k] = v
  5229. }
  5230. reqHeaders.Set("User-Agent", c.s.userAgent())
  5231. var body io.Reader = nil
  5232. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
  5233. if err != nil {
  5234. return nil, err
  5235. }
  5236. reqHeaders.Set("Content-Type", "application/json")
  5237. c.urlParams_.Set("alt", alt)
  5238. c.urlParams_.Set("prettyPrint", "false")
  5239. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  5240. urls += "?" + c.urlParams_.Encode()
  5241. req, err := http.NewRequest("PUT", urls, body)
  5242. if err != nil {
  5243. return nil, err
  5244. }
  5245. req.Header = reqHeaders
  5246. googleapi.Expand(req.URL, map[string]string{
  5247. "project": c.project,
  5248. "deployment": c.deployment,
  5249. })
  5250. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5251. }
  5252. // Do executes the "deploymentmanager.deployments.update" call.
  5253. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5254. // status code is an error. Response headers are in either
  5255. // *Operation.ServerResponse.Header or (if a response was returned at
  5256. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5257. // to check whether the returned error was because
  5258. // http.StatusNotModified was returned.
  5259. func (c *DeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5260. gensupport.SetOptions(c.urlParams_, opts...)
  5261. res, err := c.doRequest("json")
  5262. if res != nil && res.StatusCode == http.StatusNotModified {
  5263. if res.Body != nil {
  5264. res.Body.Close()
  5265. }
  5266. return nil, &googleapi.Error{
  5267. Code: res.StatusCode,
  5268. Header: res.Header,
  5269. }
  5270. }
  5271. if err != nil {
  5272. return nil, err
  5273. }
  5274. defer googleapi.CloseBody(res)
  5275. if err := googleapi.CheckResponse(res); err != nil {
  5276. return nil, err
  5277. }
  5278. ret := &Operation{
  5279. ServerResponse: googleapi.ServerResponse{
  5280. Header: res.Header,
  5281. HTTPStatusCode: res.StatusCode,
  5282. },
  5283. }
  5284. target := &ret
  5285. if err := gensupport.DecodeResponse(target, res); err != nil {
  5286. return nil, err
  5287. }
  5288. return ret, nil
  5289. // {
  5290. // "description": "Updates a deployment and all of the resources described by the deployment manifest.",
  5291. // "httpMethod": "PUT",
  5292. // "id": "deploymentmanager.deployments.update",
  5293. // "parameterOrder": [
  5294. // "project",
  5295. // "deployment"
  5296. // ],
  5297. // "parameters": {
  5298. // "createPolicy": {
  5299. // "default": "CREATE_OR_ACQUIRE",
  5300. // "description": "Sets the policy to use for creating new resources.",
  5301. // "enum": [
  5302. // "ACQUIRE",
  5303. // "CREATE",
  5304. // "CREATE_OR_ACQUIRE"
  5305. // ],
  5306. // "enumDescriptions": [
  5307. // "",
  5308. // "",
  5309. // ""
  5310. // ],
  5311. // "location": "query",
  5312. // "type": "string"
  5313. // },
  5314. // "deletePolicy": {
  5315. // "default": "DELETE",
  5316. // "description": "Sets the policy to use for deleting resources.",
  5317. // "enum": [
  5318. // "ABANDON",
  5319. // "DELETE"
  5320. // ],
  5321. // "enumDescriptions": [
  5322. // "",
  5323. // ""
  5324. // ],
  5325. // "location": "query",
  5326. // "type": "string"
  5327. // },
  5328. // "deployment": {
  5329. // "description": "The name of the deployment for this request.",
  5330. // "location": "path",
  5331. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5332. // "required": true,
  5333. // "type": "string"
  5334. // },
  5335. // "preview": {
  5336. // "default": "false",
  5337. // "description": "If set to true, updates the deployment and creates and updates the \"shell\" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.",
  5338. // "location": "query",
  5339. // "type": "boolean"
  5340. // },
  5341. // "project": {
  5342. // "description": "The project ID for this request.",
  5343. // "location": "path",
  5344. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  5345. // "required": true,
  5346. // "type": "string"
  5347. // }
  5348. // },
  5349. // "path": "{project}/global/deployments/{deployment}",
  5350. // "request": {
  5351. // "$ref": "Deployment"
  5352. // },
  5353. // "response": {
  5354. // "$ref": "Operation"
  5355. // },
  5356. // "scopes": [
  5357. // "https://www.googleapis.com/auth/cloud-platform",
  5358. // "https://www.googleapis.com/auth/ndev.cloudman"
  5359. // ]
  5360. // }
  5361. }
  5362. // method id "deploymentmanager.manifests.get":
  5363. type ManifestsGetCall struct {
  5364. s *Service
  5365. project string
  5366. deployment string
  5367. manifest string
  5368. urlParams_ gensupport.URLParams
  5369. ifNoneMatch_ string
  5370. ctx_ context.Context
  5371. header_ http.Header
  5372. }
  5373. // Get: Gets information about a specific manifest.
  5374. func (r *ManifestsService) Get(project string, deployment string, manifest string) *ManifestsGetCall {
  5375. c := &ManifestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5376. c.project = project
  5377. c.deployment = deployment
  5378. c.manifest = manifest
  5379. return c
  5380. }
  5381. // Fields allows partial responses to be retrieved. See
  5382. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5383. // for more information.
  5384. func (c *ManifestsGetCall) Fields(s ...googleapi.Field) *ManifestsGetCall {
  5385. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5386. return c
  5387. }
  5388. // IfNoneMatch sets the optional parameter which makes the operation
  5389. // fail if the object's ETag matches the given value. This is useful for
  5390. // getting updates only after the object has changed since the last
  5391. // request. Use googleapi.IsNotModified to check whether the response
  5392. // error from Do is the result of In-None-Match.
  5393. func (c *ManifestsGetCall) IfNoneMatch(entityTag string) *ManifestsGetCall {
  5394. c.ifNoneMatch_ = entityTag
  5395. return c
  5396. }
  5397. // Context sets the context to be used in this call's Do method. Any
  5398. // pending HTTP request will be aborted if the provided context is
  5399. // canceled.
  5400. func (c *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
  5401. c.ctx_ = ctx
  5402. return c
  5403. }
  5404. // Header returns an http.Header that can be modified by the caller to
  5405. // add HTTP headers to the request.
  5406. func (c *ManifestsGetCall) Header() http.Header {
  5407. if c.header_ == nil {
  5408. c.header_ = make(http.Header)
  5409. }
  5410. return c.header_
  5411. }
  5412. func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
  5413. reqHeaders := make(http.Header)
  5414. for k, v := range c.header_ {
  5415. reqHeaders[k] = v
  5416. }
  5417. reqHeaders.Set("User-Agent", c.s.userAgent())
  5418. if c.ifNoneMatch_ != "" {
  5419. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5420. }
  5421. var body io.Reader = nil
  5422. c.urlParams_.Set("alt", alt)
  5423. c.urlParams_.Set("prettyPrint", "false")
  5424. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests/{manifest}")
  5425. urls += "?" + c.urlParams_.Encode()
  5426. req, err := http.NewRequest("GET", urls, body)
  5427. if err != nil {
  5428. return nil, err
  5429. }
  5430. req.Header = reqHeaders
  5431. googleapi.Expand(req.URL, map[string]string{
  5432. "project": c.project,
  5433. "deployment": c.deployment,
  5434. "manifest": c.manifest,
  5435. })
  5436. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5437. }
  5438. // Do executes the "deploymentmanager.manifests.get" call.
  5439. // Exactly one of *Manifest or error will be non-nil. Any non-2xx status
  5440. // code is an error. Response headers are in either
  5441. // *Manifest.ServerResponse.Header or (if a response was returned at
  5442. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5443. // to check whether the returned error was because
  5444. // http.StatusNotModified was returned.
  5445. func (c *ManifestsGetCall) Do(opts ...googleapi.CallOption) (*Manifest, error) {
  5446. gensupport.SetOptions(c.urlParams_, opts...)
  5447. res, err := c.doRequest("json")
  5448. if res != nil && res.StatusCode == http.StatusNotModified {
  5449. if res.Body != nil {
  5450. res.Body.Close()
  5451. }
  5452. return nil, &googleapi.Error{
  5453. Code: res.StatusCode,
  5454. Header: res.Header,
  5455. }
  5456. }
  5457. if err != nil {
  5458. return nil, err
  5459. }
  5460. defer googleapi.CloseBody(res)
  5461. if err := googleapi.CheckResponse(res); err != nil {
  5462. return nil, err
  5463. }
  5464. ret := &Manifest{
  5465. ServerResponse: googleapi.ServerResponse{
  5466. Header: res.Header,
  5467. HTTPStatusCode: res.StatusCode,
  5468. },
  5469. }
  5470. target := &ret
  5471. if err := gensupport.DecodeResponse(target, res); err != nil {
  5472. return nil, err
  5473. }
  5474. return ret, nil
  5475. // {
  5476. // "description": "Gets information about a specific manifest.",
  5477. // "httpMethod": "GET",
  5478. // "id": "deploymentmanager.manifests.get",
  5479. // "parameterOrder": [
  5480. // "project",
  5481. // "deployment",
  5482. // "manifest"
  5483. // ],
  5484. // "parameters": {
  5485. // "deployment": {
  5486. // "description": "The name of the deployment for this request.",
  5487. // "location": "path",
  5488. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5489. // "required": true,
  5490. // "type": "string"
  5491. // },
  5492. // "manifest": {
  5493. // "description": "The name of the manifest for this request.",
  5494. // "location": "path",
  5495. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5496. // "required": true,
  5497. // "type": "string"
  5498. // },
  5499. // "project": {
  5500. // "description": "The project ID for this request.",
  5501. // "location": "path",
  5502. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  5503. // "required": true,
  5504. // "type": "string"
  5505. // }
  5506. // },
  5507. // "path": "{project}/global/deployments/{deployment}/manifests/{manifest}",
  5508. // "response": {
  5509. // "$ref": "Manifest"
  5510. // },
  5511. // "scopes": [
  5512. // "https://www.googleapis.com/auth/cloud-platform",
  5513. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5514. // "https://www.googleapis.com/auth/ndev.cloudman",
  5515. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5516. // ]
  5517. // }
  5518. }
  5519. // method id "deploymentmanager.manifests.list":
  5520. type ManifestsListCall struct {
  5521. s *Service
  5522. project string
  5523. deployment string
  5524. urlParams_ gensupport.URLParams
  5525. ifNoneMatch_ string
  5526. ctx_ context.Context
  5527. header_ http.Header
  5528. }
  5529. // List: Lists all manifests for a given deployment.
  5530. func (r *ManifestsService) List(project string, deployment string) *ManifestsListCall {
  5531. c := &ManifestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5532. c.project = project
  5533. c.deployment = deployment
  5534. return c
  5535. }
  5536. // Filter sets the optional parameter "filter": A filter expression that
  5537. // filters resources listed in the response. The expression must specify
  5538. // the field name, a comparison operator, and the value that you want to
  5539. // use for filtering. The value must be a string, a number, or a
  5540. // boolean. The comparison operator must be either =, !=, >, or <.
  5541. //
  5542. // For example, if you are filtering Compute Engine instances, you can
  5543. // exclude instances named example-instance by specifying name !=
  5544. // example-instance.
  5545. //
  5546. // You can also filter nested fields. For example, you could specify
  5547. // scheduling.automaticRestart = false to include instances only if they
  5548. // are not scheduled for automatic restarts. You can use filtering on
  5549. // nested fields to filter based on resource labels.
  5550. //
  5551. // To filter on multiple expressions, provide each separate expression
  5552. // within parentheses. For example, (scheduling.automaticRestart = true)
  5553. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  5554. // AND expression. However, you can include AND and OR expressions
  5555. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  5556. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  5557. // true).
  5558. func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall {
  5559. c.urlParams_.Set("filter", filter)
  5560. return c
  5561. }
  5562. // MaxResults sets the optional parameter "maxResults": The maximum
  5563. // number of results per page that should be returned. If the number of
  5564. // available results is larger than maxResults, Compute Engine returns a
  5565. // nextPageToken that can be used to get the next page of results in
  5566. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  5567. // (Default: 500)
  5568. func (c *ManifestsListCall) MaxResults(maxResults int64) *ManifestsListCall {
  5569. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5570. return c
  5571. }
  5572. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  5573. // a certain order. By default, results are returned in alphanumerical
  5574. // order based on the resource name.
  5575. //
  5576. // You can also sort results in descending order based on the creation
  5577. // timestamp using orderBy="creationTimestamp desc". This sorts results
  5578. // based on the creationTimestamp field in reverse chronological order
  5579. // (newest result first). Use this to sort resources like operations so
  5580. // that the newest operation is returned first.
  5581. //
  5582. // Currently, only sorting by name or creationTimestamp desc is
  5583. // supported.
  5584. func (c *ManifestsListCall) OrderBy(orderBy string) *ManifestsListCall {
  5585. c.urlParams_.Set("orderBy", orderBy)
  5586. return c
  5587. }
  5588. // PageToken sets the optional parameter "pageToken": Specifies a page
  5589. // token to use. Set pageToken to the nextPageToken returned by a
  5590. // previous list request to get the next page of results.
  5591. func (c *ManifestsListCall) PageToken(pageToken string) *ManifestsListCall {
  5592. c.urlParams_.Set("pageToken", pageToken)
  5593. return c
  5594. }
  5595. // Fields allows partial responses to be retrieved. See
  5596. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5597. // for more information.
  5598. func (c *ManifestsListCall) Fields(s ...googleapi.Field) *ManifestsListCall {
  5599. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5600. return c
  5601. }
  5602. // IfNoneMatch sets the optional parameter which makes the operation
  5603. // fail if the object's ETag matches the given value. This is useful for
  5604. // getting updates only after the object has changed since the last
  5605. // request. Use googleapi.IsNotModified to check whether the response
  5606. // error from Do is the result of In-None-Match.
  5607. func (c *ManifestsListCall) IfNoneMatch(entityTag string) *ManifestsListCall {
  5608. c.ifNoneMatch_ = entityTag
  5609. return c
  5610. }
  5611. // Context sets the context to be used in this call's Do method. Any
  5612. // pending HTTP request will be aborted if the provided context is
  5613. // canceled.
  5614. func (c *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
  5615. c.ctx_ = ctx
  5616. return c
  5617. }
  5618. // Header returns an http.Header that can be modified by the caller to
  5619. // add HTTP headers to the request.
  5620. func (c *ManifestsListCall) Header() http.Header {
  5621. if c.header_ == nil {
  5622. c.header_ = make(http.Header)
  5623. }
  5624. return c.header_
  5625. }
  5626. func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
  5627. reqHeaders := make(http.Header)
  5628. for k, v := range c.header_ {
  5629. reqHeaders[k] = v
  5630. }
  5631. reqHeaders.Set("User-Agent", c.s.userAgent())
  5632. if c.ifNoneMatch_ != "" {
  5633. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5634. }
  5635. var body io.Reader = nil
  5636. c.urlParams_.Set("alt", alt)
  5637. c.urlParams_.Set("prettyPrint", "false")
  5638. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests")
  5639. urls += "?" + c.urlParams_.Encode()
  5640. req, err := http.NewRequest("GET", urls, body)
  5641. if err != nil {
  5642. return nil, err
  5643. }
  5644. req.Header = reqHeaders
  5645. googleapi.Expand(req.URL, map[string]string{
  5646. "project": c.project,
  5647. "deployment": c.deployment,
  5648. })
  5649. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5650. }
  5651. // Do executes the "deploymentmanager.manifests.list" call.
  5652. // Exactly one of *ManifestsListResponse or error will be non-nil. Any
  5653. // non-2xx status code is an error. Response headers are in either
  5654. // *ManifestsListResponse.ServerResponse.Header or (if a response was
  5655. // returned at all) in error.(*googleapi.Error).Header. Use
  5656. // googleapi.IsNotModified to check whether the returned error was
  5657. // because http.StatusNotModified was returned.
  5658. func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResponse, error) {
  5659. gensupport.SetOptions(c.urlParams_, opts...)
  5660. res, err := c.doRequest("json")
  5661. if res != nil && res.StatusCode == http.StatusNotModified {
  5662. if res.Body != nil {
  5663. res.Body.Close()
  5664. }
  5665. return nil, &googleapi.Error{
  5666. Code: res.StatusCode,
  5667. Header: res.Header,
  5668. }
  5669. }
  5670. if err != nil {
  5671. return nil, err
  5672. }
  5673. defer googleapi.CloseBody(res)
  5674. if err := googleapi.CheckResponse(res); err != nil {
  5675. return nil, err
  5676. }
  5677. ret := &ManifestsListResponse{
  5678. ServerResponse: googleapi.ServerResponse{
  5679. Header: res.Header,
  5680. HTTPStatusCode: res.StatusCode,
  5681. },
  5682. }
  5683. target := &ret
  5684. if err := gensupport.DecodeResponse(target, res); err != nil {
  5685. return nil, err
  5686. }
  5687. return ret, nil
  5688. // {
  5689. // "description": "Lists all manifests for a given deployment.",
  5690. // "httpMethod": "GET",
  5691. // "id": "deploymentmanager.manifests.list",
  5692. // "parameterOrder": [
  5693. // "project",
  5694. // "deployment"
  5695. // ],
  5696. // "parameters": {
  5697. // "deployment": {
  5698. // "description": "The name of the deployment for this request.",
  5699. // "location": "path",
  5700. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5701. // "required": true,
  5702. // "type": "string"
  5703. // },
  5704. // "filter": {
  5705. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  5706. // "location": "query",
  5707. // "type": "string"
  5708. // },
  5709. // "maxResults": {
  5710. // "default": "500",
  5711. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  5712. // "format": "uint32",
  5713. // "location": "query",
  5714. // "minimum": "0",
  5715. // "type": "integer"
  5716. // },
  5717. // "orderBy": {
  5718. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  5719. // "location": "query",
  5720. // "type": "string"
  5721. // },
  5722. // "pageToken": {
  5723. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  5724. // "location": "query",
  5725. // "type": "string"
  5726. // },
  5727. // "project": {
  5728. // "description": "The project ID for this request.",
  5729. // "location": "path",
  5730. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  5731. // "required": true,
  5732. // "type": "string"
  5733. // }
  5734. // },
  5735. // "path": "{project}/global/deployments/{deployment}/manifests",
  5736. // "response": {
  5737. // "$ref": "ManifestsListResponse"
  5738. // },
  5739. // "scopes": [
  5740. // "https://www.googleapis.com/auth/cloud-platform",
  5741. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5742. // "https://www.googleapis.com/auth/ndev.cloudman",
  5743. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5744. // ]
  5745. // }
  5746. }
  5747. // Pages invokes f for each page of results.
  5748. // A non-nil error returned from f will halt the iteration.
  5749. // The provided context supersedes any context provided to the Context method.
  5750. func (c *ManifestsListCall) Pages(ctx context.Context, f func(*ManifestsListResponse) error) error {
  5751. c.ctx_ = ctx
  5752. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5753. for {
  5754. x, err := c.Do()
  5755. if err != nil {
  5756. return err
  5757. }
  5758. if err := f(x); err != nil {
  5759. return err
  5760. }
  5761. if x.NextPageToken == "" {
  5762. return nil
  5763. }
  5764. c.PageToken(x.NextPageToken)
  5765. }
  5766. }
  5767. // method id "deploymentmanager.operations.get":
  5768. type OperationsGetCall struct {
  5769. s *Service
  5770. project string
  5771. operation string
  5772. urlParams_ gensupport.URLParams
  5773. ifNoneMatch_ string
  5774. ctx_ context.Context
  5775. header_ http.Header
  5776. }
  5777. // Get: Gets information about a specific operation.
  5778. func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
  5779. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5780. c.project = project
  5781. c.operation = operation
  5782. return c
  5783. }
  5784. // Fields allows partial responses to be retrieved. See
  5785. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5786. // for more information.
  5787. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  5788. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5789. return c
  5790. }
  5791. // IfNoneMatch sets the optional parameter which makes the operation
  5792. // fail if the object's ETag matches the given value. This is useful for
  5793. // getting updates only after the object has changed since the last
  5794. // request. Use googleapi.IsNotModified to check whether the response
  5795. // error from Do is the result of In-None-Match.
  5796. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  5797. c.ifNoneMatch_ = entityTag
  5798. return c
  5799. }
  5800. // Context sets the context to be used in this call's Do method. Any
  5801. // pending HTTP request will be aborted if the provided context is
  5802. // canceled.
  5803. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  5804. c.ctx_ = ctx
  5805. return c
  5806. }
  5807. // Header returns an http.Header that can be modified by the caller to
  5808. // add HTTP headers to the request.
  5809. func (c *OperationsGetCall) Header() http.Header {
  5810. if c.header_ == nil {
  5811. c.header_ = make(http.Header)
  5812. }
  5813. return c.header_
  5814. }
  5815. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5816. reqHeaders := make(http.Header)
  5817. for k, v := range c.header_ {
  5818. reqHeaders[k] = v
  5819. }
  5820. reqHeaders.Set("User-Agent", c.s.userAgent())
  5821. if c.ifNoneMatch_ != "" {
  5822. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5823. }
  5824. var body io.Reader = nil
  5825. c.urlParams_.Set("alt", alt)
  5826. c.urlParams_.Set("prettyPrint", "false")
  5827. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
  5828. urls += "?" + c.urlParams_.Encode()
  5829. req, err := http.NewRequest("GET", urls, body)
  5830. if err != nil {
  5831. return nil, err
  5832. }
  5833. req.Header = reqHeaders
  5834. googleapi.Expand(req.URL, map[string]string{
  5835. "project": c.project,
  5836. "operation": c.operation,
  5837. })
  5838. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5839. }
  5840. // Do executes the "deploymentmanager.operations.get" call.
  5841. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5842. // status code is an error. Response headers are in either
  5843. // *Operation.ServerResponse.Header or (if a response was returned at
  5844. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5845. // to check whether the returned error was because
  5846. // http.StatusNotModified was returned.
  5847. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5848. gensupport.SetOptions(c.urlParams_, opts...)
  5849. res, err := c.doRequest("json")
  5850. if res != nil && res.StatusCode == http.StatusNotModified {
  5851. if res.Body != nil {
  5852. res.Body.Close()
  5853. }
  5854. return nil, &googleapi.Error{
  5855. Code: res.StatusCode,
  5856. Header: res.Header,
  5857. }
  5858. }
  5859. if err != nil {
  5860. return nil, err
  5861. }
  5862. defer googleapi.CloseBody(res)
  5863. if err := googleapi.CheckResponse(res); err != nil {
  5864. return nil, err
  5865. }
  5866. ret := &Operation{
  5867. ServerResponse: googleapi.ServerResponse{
  5868. Header: res.Header,
  5869. HTTPStatusCode: res.StatusCode,
  5870. },
  5871. }
  5872. target := &ret
  5873. if err := gensupport.DecodeResponse(target, res); err != nil {
  5874. return nil, err
  5875. }
  5876. return ret, nil
  5877. // {
  5878. // "description": "Gets information about a specific operation.",
  5879. // "httpMethod": "GET",
  5880. // "id": "deploymentmanager.operations.get",
  5881. // "parameterOrder": [
  5882. // "project",
  5883. // "operation"
  5884. // ],
  5885. // "parameters": {
  5886. // "operation": {
  5887. // "description": "The name of the operation for this request.",
  5888. // "location": "path",
  5889. // "required": true,
  5890. // "type": "string"
  5891. // },
  5892. // "project": {
  5893. // "description": "The project ID for this request.",
  5894. // "location": "path",
  5895. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  5896. // "required": true,
  5897. // "type": "string"
  5898. // }
  5899. // },
  5900. // "path": "{project}/global/operations/{operation}",
  5901. // "response": {
  5902. // "$ref": "Operation"
  5903. // },
  5904. // "scopes": [
  5905. // "https://www.googleapis.com/auth/cloud-platform",
  5906. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5907. // "https://www.googleapis.com/auth/ndev.cloudman",
  5908. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5909. // ]
  5910. // }
  5911. }
  5912. // method id "deploymentmanager.operations.list":
  5913. type OperationsListCall struct {
  5914. s *Service
  5915. project string
  5916. urlParams_ gensupport.URLParams
  5917. ifNoneMatch_ string
  5918. ctx_ context.Context
  5919. header_ http.Header
  5920. }
  5921. // List: Lists all operations for a project.
  5922. func (r *OperationsService) List(project string) *OperationsListCall {
  5923. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5924. c.project = project
  5925. return c
  5926. }
  5927. // Filter sets the optional parameter "filter": A filter expression that
  5928. // filters resources listed in the response. The expression must specify
  5929. // the field name, a comparison operator, and the value that you want to
  5930. // use for filtering. The value must be a string, a number, or a
  5931. // boolean. The comparison operator must be either =, !=, >, or <.
  5932. //
  5933. // For example, if you are filtering Compute Engine instances, you can
  5934. // exclude instances named example-instance by specifying name !=
  5935. // example-instance.
  5936. //
  5937. // You can also filter nested fields. For example, you could specify
  5938. // scheduling.automaticRestart = false to include instances only if they
  5939. // are not scheduled for automatic restarts. You can use filtering on
  5940. // nested fields to filter based on resource labels.
  5941. //
  5942. // To filter on multiple expressions, provide each separate expression
  5943. // within parentheses. For example, (scheduling.automaticRestart = true)
  5944. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  5945. // AND expression. However, you can include AND and OR expressions
  5946. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  5947. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  5948. // true).
  5949. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  5950. c.urlParams_.Set("filter", filter)
  5951. return c
  5952. }
  5953. // MaxResults sets the optional parameter "maxResults": The maximum
  5954. // number of results per page that should be returned. If the number of
  5955. // available results is larger than maxResults, Compute Engine returns a
  5956. // nextPageToken that can be used to get the next page of results in
  5957. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  5958. // (Default: 500)
  5959. func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
  5960. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5961. return c
  5962. }
  5963. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  5964. // a certain order. By default, results are returned in alphanumerical
  5965. // order based on the resource name.
  5966. //
  5967. // You can also sort results in descending order based on the creation
  5968. // timestamp using orderBy="creationTimestamp desc". This sorts results
  5969. // based on the creationTimestamp field in reverse chronological order
  5970. // (newest result first). Use this to sort resources like operations so
  5971. // that the newest operation is returned first.
  5972. //
  5973. // Currently, only sorting by name or creationTimestamp desc is
  5974. // supported.
  5975. func (c *OperationsListCall) OrderBy(orderBy string) *OperationsListCall {
  5976. c.urlParams_.Set("orderBy", orderBy)
  5977. return c
  5978. }
  5979. // PageToken sets the optional parameter "pageToken": Specifies a page
  5980. // token to use. Set pageToken to the nextPageToken returned by a
  5981. // previous list request to get the next page of results.
  5982. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  5983. c.urlParams_.Set("pageToken", pageToken)
  5984. return c
  5985. }
  5986. // Fields allows partial responses to be retrieved. See
  5987. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5988. // for more information.
  5989. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  5990. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5991. return c
  5992. }
  5993. // IfNoneMatch sets the optional parameter which makes the operation
  5994. // fail if the object's ETag matches the given value. This is useful for
  5995. // getting updates only after the object has changed since the last
  5996. // request. Use googleapi.IsNotModified to check whether the response
  5997. // error from Do is the result of In-None-Match.
  5998. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  5999. c.ifNoneMatch_ = entityTag
  6000. return c
  6001. }
  6002. // Context sets the context to be used in this call's Do method. Any
  6003. // pending HTTP request will be aborted if the provided context is
  6004. // canceled.
  6005. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  6006. c.ctx_ = ctx
  6007. return c
  6008. }
  6009. // Header returns an http.Header that can be modified by the caller to
  6010. // add HTTP headers to the request.
  6011. func (c *OperationsListCall) Header() http.Header {
  6012. if c.header_ == nil {
  6013. c.header_ = make(http.Header)
  6014. }
  6015. return c.header_
  6016. }
  6017. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  6018. reqHeaders := make(http.Header)
  6019. for k, v := range c.header_ {
  6020. reqHeaders[k] = v
  6021. }
  6022. reqHeaders.Set("User-Agent", c.s.userAgent())
  6023. if c.ifNoneMatch_ != "" {
  6024. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6025. }
  6026. var body io.Reader = nil
  6027. c.urlParams_.Set("alt", alt)
  6028. c.urlParams_.Set("prettyPrint", "false")
  6029. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
  6030. urls += "?" + c.urlParams_.Encode()
  6031. req, err := http.NewRequest("GET", urls, body)
  6032. if err != nil {
  6033. return nil, err
  6034. }
  6035. req.Header = reqHeaders
  6036. googleapi.Expand(req.URL, map[string]string{
  6037. "project": c.project,
  6038. })
  6039. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6040. }
  6041. // Do executes the "deploymentmanager.operations.list" call.
  6042. // Exactly one of *OperationsListResponse or error will be non-nil. Any
  6043. // non-2xx status code is an error. Response headers are in either
  6044. // *OperationsListResponse.ServerResponse.Header or (if a response was
  6045. // returned at all) in error.(*googleapi.Error).Header. Use
  6046. // googleapi.IsNotModified to check whether the returned error was
  6047. // because http.StatusNotModified was returned.
  6048. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
  6049. gensupport.SetOptions(c.urlParams_, opts...)
  6050. res, err := c.doRequest("json")
  6051. if res != nil && res.StatusCode == http.StatusNotModified {
  6052. if res.Body != nil {
  6053. res.Body.Close()
  6054. }
  6055. return nil, &googleapi.Error{
  6056. Code: res.StatusCode,
  6057. Header: res.Header,
  6058. }
  6059. }
  6060. if err != nil {
  6061. return nil, err
  6062. }
  6063. defer googleapi.CloseBody(res)
  6064. if err := googleapi.CheckResponse(res); err != nil {
  6065. return nil, err
  6066. }
  6067. ret := &OperationsListResponse{
  6068. ServerResponse: googleapi.ServerResponse{
  6069. Header: res.Header,
  6070. HTTPStatusCode: res.StatusCode,
  6071. },
  6072. }
  6073. target := &ret
  6074. if err := gensupport.DecodeResponse(target, res); err != nil {
  6075. return nil, err
  6076. }
  6077. return ret, nil
  6078. // {
  6079. // "description": "Lists all operations for a project.",
  6080. // "httpMethod": "GET",
  6081. // "id": "deploymentmanager.operations.list",
  6082. // "parameterOrder": [
  6083. // "project"
  6084. // ],
  6085. // "parameters": {
  6086. // "filter": {
  6087. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  6088. // "location": "query",
  6089. // "type": "string"
  6090. // },
  6091. // "maxResults": {
  6092. // "default": "500",
  6093. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  6094. // "format": "uint32",
  6095. // "location": "query",
  6096. // "minimum": "0",
  6097. // "type": "integer"
  6098. // },
  6099. // "orderBy": {
  6100. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  6101. // "location": "query",
  6102. // "type": "string"
  6103. // },
  6104. // "pageToken": {
  6105. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  6106. // "location": "query",
  6107. // "type": "string"
  6108. // },
  6109. // "project": {
  6110. // "description": "The project ID for this request.",
  6111. // "location": "path",
  6112. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  6113. // "required": true,
  6114. // "type": "string"
  6115. // }
  6116. // },
  6117. // "path": "{project}/global/operations",
  6118. // "response": {
  6119. // "$ref": "OperationsListResponse"
  6120. // },
  6121. // "scopes": [
  6122. // "https://www.googleapis.com/auth/cloud-platform",
  6123. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6124. // "https://www.googleapis.com/auth/ndev.cloudman",
  6125. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6126. // ]
  6127. // }
  6128. }
  6129. // Pages invokes f for each page of results.
  6130. // A non-nil error returned from f will halt the iteration.
  6131. // The provided context supersedes any context provided to the Context method.
  6132. func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
  6133. c.ctx_ = ctx
  6134. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6135. for {
  6136. x, err := c.Do()
  6137. if err != nil {
  6138. return err
  6139. }
  6140. if err := f(x); err != nil {
  6141. return err
  6142. }
  6143. if x.NextPageToken == "" {
  6144. return nil
  6145. }
  6146. c.PageToken(x.NextPageToken)
  6147. }
  6148. }
  6149. // method id "deploymentmanager.resources.get":
  6150. type ResourcesGetCall struct {
  6151. s *Service
  6152. project string
  6153. deployment string
  6154. resource string
  6155. urlParams_ gensupport.URLParams
  6156. ifNoneMatch_ string
  6157. ctx_ context.Context
  6158. header_ http.Header
  6159. }
  6160. // Get: Gets information about a single resource.
  6161. func (r *ResourcesService) Get(project string, deployment string, resource string) *ResourcesGetCall {
  6162. c := &ResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6163. c.project = project
  6164. c.deployment = deployment
  6165. c.resource = resource
  6166. return c
  6167. }
  6168. // Fields allows partial responses to be retrieved. See
  6169. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6170. // for more information.
  6171. func (c *ResourcesGetCall) Fields(s ...googleapi.Field) *ResourcesGetCall {
  6172. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6173. return c
  6174. }
  6175. // IfNoneMatch sets the optional parameter which makes the operation
  6176. // fail if the object's ETag matches the given value. This is useful for
  6177. // getting updates only after the object has changed since the last
  6178. // request. Use googleapi.IsNotModified to check whether the response
  6179. // error from Do is the result of In-None-Match.
  6180. func (c *ResourcesGetCall) IfNoneMatch(entityTag string) *ResourcesGetCall {
  6181. c.ifNoneMatch_ = entityTag
  6182. return c
  6183. }
  6184. // Context sets the context to be used in this call's Do method. Any
  6185. // pending HTTP request will be aborted if the provided context is
  6186. // canceled.
  6187. func (c *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
  6188. c.ctx_ = ctx
  6189. return c
  6190. }
  6191. // Header returns an http.Header that can be modified by the caller to
  6192. // add HTTP headers to the request.
  6193. func (c *ResourcesGetCall) Header() http.Header {
  6194. if c.header_ == nil {
  6195. c.header_ = make(http.Header)
  6196. }
  6197. return c.header_
  6198. }
  6199. func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
  6200. reqHeaders := make(http.Header)
  6201. for k, v := range c.header_ {
  6202. reqHeaders[k] = v
  6203. }
  6204. reqHeaders.Set("User-Agent", c.s.userAgent())
  6205. if c.ifNoneMatch_ != "" {
  6206. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6207. }
  6208. var body io.Reader = nil
  6209. c.urlParams_.Set("alt", alt)
  6210. c.urlParams_.Set("prettyPrint", "false")
  6211. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources/{resource}")
  6212. urls += "?" + c.urlParams_.Encode()
  6213. req, err := http.NewRequest("GET", urls, body)
  6214. if err != nil {
  6215. return nil, err
  6216. }
  6217. req.Header = reqHeaders
  6218. googleapi.Expand(req.URL, map[string]string{
  6219. "project": c.project,
  6220. "deployment": c.deployment,
  6221. "resource": c.resource,
  6222. })
  6223. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6224. }
  6225. // Do executes the "deploymentmanager.resources.get" call.
  6226. // Exactly one of *Resource or error will be non-nil. Any non-2xx status
  6227. // code is an error. Response headers are in either
  6228. // *Resource.ServerResponse.Header or (if a response was returned at
  6229. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6230. // to check whether the returned error was because
  6231. // http.StatusNotModified was returned.
  6232. func (c *ResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) {
  6233. gensupport.SetOptions(c.urlParams_, opts...)
  6234. res, err := c.doRequest("json")
  6235. if res != nil && res.StatusCode == http.StatusNotModified {
  6236. if res.Body != nil {
  6237. res.Body.Close()
  6238. }
  6239. return nil, &googleapi.Error{
  6240. Code: res.StatusCode,
  6241. Header: res.Header,
  6242. }
  6243. }
  6244. if err != nil {
  6245. return nil, err
  6246. }
  6247. defer googleapi.CloseBody(res)
  6248. if err := googleapi.CheckResponse(res); err != nil {
  6249. return nil, err
  6250. }
  6251. ret := &Resource{
  6252. ServerResponse: googleapi.ServerResponse{
  6253. Header: res.Header,
  6254. HTTPStatusCode: res.StatusCode,
  6255. },
  6256. }
  6257. target := &ret
  6258. if err := gensupport.DecodeResponse(target, res); err != nil {
  6259. return nil, err
  6260. }
  6261. return ret, nil
  6262. // {
  6263. // "description": "Gets information about a single resource.",
  6264. // "httpMethod": "GET",
  6265. // "id": "deploymentmanager.resources.get",
  6266. // "parameterOrder": [
  6267. // "project",
  6268. // "deployment",
  6269. // "resource"
  6270. // ],
  6271. // "parameters": {
  6272. // "deployment": {
  6273. // "description": "The name of the deployment for this request.",
  6274. // "location": "path",
  6275. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6276. // "required": true,
  6277. // "type": "string"
  6278. // },
  6279. // "project": {
  6280. // "description": "The project ID for this request.",
  6281. // "location": "path",
  6282. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  6283. // "required": true,
  6284. // "type": "string"
  6285. // },
  6286. // "resource": {
  6287. // "description": "The name of the resource for this request.",
  6288. // "location": "path",
  6289. // "required": true,
  6290. // "type": "string"
  6291. // }
  6292. // },
  6293. // "path": "{project}/global/deployments/{deployment}/resources/{resource}",
  6294. // "response": {
  6295. // "$ref": "Resource"
  6296. // },
  6297. // "scopes": [
  6298. // "https://www.googleapis.com/auth/cloud-platform",
  6299. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6300. // "https://www.googleapis.com/auth/ndev.cloudman",
  6301. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6302. // ]
  6303. // }
  6304. }
  6305. // method id "deploymentmanager.resources.list":
  6306. type ResourcesListCall struct {
  6307. s *Service
  6308. project string
  6309. deployment string
  6310. urlParams_ gensupport.URLParams
  6311. ifNoneMatch_ string
  6312. ctx_ context.Context
  6313. header_ http.Header
  6314. }
  6315. // List: Lists all resources in a given deployment.
  6316. func (r *ResourcesService) List(project string, deployment string) *ResourcesListCall {
  6317. c := &ResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6318. c.project = project
  6319. c.deployment = deployment
  6320. return c
  6321. }
  6322. // Filter sets the optional parameter "filter": A filter expression that
  6323. // filters resources listed in the response. The expression must specify
  6324. // the field name, a comparison operator, and the value that you want to
  6325. // use for filtering. The value must be a string, a number, or a
  6326. // boolean. The comparison operator must be either =, !=, >, or <.
  6327. //
  6328. // For example, if you are filtering Compute Engine instances, you can
  6329. // exclude instances named example-instance by specifying name !=
  6330. // example-instance.
  6331. //
  6332. // You can also filter nested fields. For example, you could specify
  6333. // scheduling.automaticRestart = false to include instances only if they
  6334. // are not scheduled for automatic restarts. You can use filtering on
  6335. // nested fields to filter based on resource labels.
  6336. //
  6337. // To filter on multiple expressions, provide each separate expression
  6338. // within parentheses. For example, (scheduling.automaticRestart = true)
  6339. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  6340. // AND expression. However, you can include AND and OR expressions
  6341. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  6342. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  6343. // true).
  6344. func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall {
  6345. c.urlParams_.Set("filter", filter)
  6346. return c
  6347. }
  6348. // MaxResults sets the optional parameter "maxResults": The maximum
  6349. // number of results per page that should be returned. If the number of
  6350. // available results is larger than maxResults, Compute Engine returns a
  6351. // nextPageToken that can be used to get the next page of results in
  6352. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  6353. // (Default: 500)
  6354. func (c *ResourcesListCall) MaxResults(maxResults int64) *ResourcesListCall {
  6355. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6356. return c
  6357. }
  6358. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  6359. // a certain order. By default, results are returned in alphanumerical
  6360. // order based on the resource name.
  6361. //
  6362. // You can also sort results in descending order based on the creation
  6363. // timestamp using orderBy="creationTimestamp desc". This sorts results
  6364. // based on the creationTimestamp field in reverse chronological order
  6365. // (newest result first). Use this to sort resources like operations so
  6366. // that the newest operation is returned first.
  6367. //
  6368. // Currently, only sorting by name or creationTimestamp desc is
  6369. // supported.
  6370. func (c *ResourcesListCall) OrderBy(orderBy string) *ResourcesListCall {
  6371. c.urlParams_.Set("orderBy", orderBy)
  6372. return c
  6373. }
  6374. // PageToken sets the optional parameter "pageToken": Specifies a page
  6375. // token to use. Set pageToken to the nextPageToken returned by a
  6376. // previous list request to get the next page of results.
  6377. func (c *ResourcesListCall) PageToken(pageToken string) *ResourcesListCall {
  6378. c.urlParams_.Set("pageToken", pageToken)
  6379. return c
  6380. }
  6381. // Fields allows partial responses to be retrieved. See
  6382. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6383. // for more information.
  6384. func (c *ResourcesListCall) Fields(s ...googleapi.Field) *ResourcesListCall {
  6385. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6386. return c
  6387. }
  6388. // IfNoneMatch sets the optional parameter which makes the operation
  6389. // fail if the object's ETag matches the given value. This is useful for
  6390. // getting updates only after the object has changed since the last
  6391. // request. Use googleapi.IsNotModified to check whether the response
  6392. // error from Do is the result of In-None-Match.
  6393. func (c *ResourcesListCall) IfNoneMatch(entityTag string) *ResourcesListCall {
  6394. c.ifNoneMatch_ = entityTag
  6395. return c
  6396. }
  6397. // Context sets the context to be used in this call's Do method. Any
  6398. // pending HTTP request will be aborted if the provided context is
  6399. // canceled.
  6400. func (c *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
  6401. c.ctx_ = ctx
  6402. return c
  6403. }
  6404. // Header returns an http.Header that can be modified by the caller to
  6405. // add HTTP headers to the request.
  6406. func (c *ResourcesListCall) Header() http.Header {
  6407. if c.header_ == nil {
  6408. c.header_ = make(http.Header)
  6409. }
  6410. return c.header_
  6411. }
  6412. func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
  6413. reqHeaders := make(http.Header)
  6414. for k, v := range c.header_ {
  6415. reqHeaders[k] = v
  6416. }
  6417. reqHeaders.Set("User-Agent", c.s.userAgent())
  6418. if c.ifNoneMatch_ != "" {
  6419. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6420. }
  6421. var body io.Reader = nil
  6422. c.urlParams_.Set("alt", alt)
  6423. c.urlParams_.Set("prettyPrint", "false")
  6424. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources")
  6425. urls += "?" + c.urlParams_.Encode()
  6426. req, err := http.NewRequest("GET", urls, body)
  6427. if err != nil {
  6428. return nil, err
  6429. }
  6430. req.Header = reqHeaders
  6431. googleapi.Expand(req.URL, map[string]string{
  6432. "project": c.project,
  6433. "deployment": c.deployment,
  6434. })
  6435. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6436. }
  6437. // Do executes the "deploymentmanager.resources.list" call.
  6438. // Exactly one of *ResourcesListResponse or error will be non-nil. Any
  6439. // non-2xx status code is an error. Response headers are in either
  6440. // *ResourcesListResponse.ServerResponse.Header or (if a response was
  6441. // returned at all) in error.(*googleapi.Error).Header. Use
  6442. // googleapi.IsNotModified to check whether the returned error was
  6443. // because http.StatusNotModified was returned.
  6444. func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResponse, error) {
  6445. gensupport.SetOptions(c.urlParams_, opts...)
  6446. res, err := c.doRequest("json")
  6447. if res != nil && res.StatusCode == http.StatusNotModified {
  6448. if res.Body != nil {
  6449. res.Body.Close()
  6450. }
  6451. return nil, &googleapi.Error{
  6452. Code: res.StatusCode,
  6453. Header: res.Header,
  6454. }
  6455. }
  6456. if err != nil {
  6457. return nil, err
  6458. }
  6459. defer googleapi.CloseBody(res)
  6460. if err := googleapi.CheckResponse(res); err != nil {
  6461. return nil, err
  6462. }
  6463. ret := &ResourcesListResponse{
  6464. ServerResponse: googleapi.ServerResponse{
  6465. Header: res.Header,
  6466. HTTPStatusCode: res.StatusCode,
  6467. },
  6468. }
  6469. target := &ret
  6470. if err := gensupport.DecodeResponse(target, res); err != nil {
  6471. return nil, err
  6472. }
  6473. return ret, nil
  6474. // {
  6475. // "description": "Lists all resources in a given deployment.",
  6476. // "httpMethod": "GET",
  6477. // "id": "deploymentmanager.resources.list",
  6478. // "parameterOrder": [
  6479. // "project",
  6480. // "deployment"
  6481. // ],
  6482. // "parameters": {
  6483. // "deployment": {
  6484. // "description": "The name of the deployment for this request.",
  6485. // "location": "path",
  6486. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6487. // "required": true,
  6488. // "type": "string"
  6489. // },
  6490. // "filter": {
  6491. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  6492. // "location": "query",
  6493. // "type": "string"
  6494. // },
  6495. // "maxResults": {
  6496. // "default": "500",
  6497. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  6498. // "format": "uint32",
  6499. // "location": "query",
  6500. // "minimum": "0",
  6501. // "type": "integer"
  6502. // },
  6503. // "orderBy": {
  6504. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  6505. // "location": "query",
  6506. // "type": "string"
  6507. // },
  6508. // "pageToken": {
  6509. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  6510. // "location": "query",
  6511. // "type": "string"
  6512. // },
  6513. // "project": {
  6514. // "description": "The project ID for this request.",
  6515. // "location": "path",
  6516. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  6517. // "required": true,
  6518. // "type": "string"
  6519. // }
  6520. // },
  6521. // "path": "{project}/global/deployments/{deployment}/resources",
  6522. // "response": {
  6523. // "$ref": "ResourcesListResponse"
  6524. // },
  6525. // "scopes": [
  6526. // "https://www.googleapis.com/auth/cloud-platform",
  6527. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6528. // "https://www.googleapis.com/auth/ndev.cloudman",
  6529. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6530. // ]
  6531. // }
  6532. }
  6533. // Pages invokes f for each page of results.
  6534. // A non-nil error returned from f will halt the iteration.
  6535. // The provided context supersedes any context provided to the Context method.
  6536. func (c *ResourcesListCall) Pages(ctx context.Context, f func(*ResourcesListResponse) error) error {
  6537. c.ctx_ = ctx
  6538. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6539. for {
  6540. x, err := c.Do()
  6541. if err != nil {
  6542. return err
  6543. }
  6544. if err := f(x); err != nil {
  6545. return err
  6546. }
  6547. if x.NextPageToken == "" {
  6548. return nil
  6549. }
  6550. c.PageToken(x.NextPageToken)
  6551. }
  6552. }
  6553. // method id "deploymentmanager.typeProviders.delete":
  6554. type TypeProvidersDeleteCall struct {
  6555. s *Service
  6556. project string
  6557. typeProvider string
  6558. urlParams_ gensupport.URLParams
  6559. ctx_ context.Context
  6560. header_ http.Header
  6561. }
  6562. // Delete: Deletes a type provider.
  6563. func (r *TypeProvidersService) Delete(project string, typeProvider string) *TypeProvidersDeleteCall {
  6564. c := &TypeProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6565. c.project = project
  6566. c.typeProvider = typeProvider
  6567. return c
  6568. }
  6569. // Fields allows partial responses to be retrieved. See
  6570. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6571. // for more information.
  6572. func (c *TypeProvidersDeleteCall) Fields(s ...googleapi.Field) *TypeProvidersDeleteCall {
  6573. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6574. return c
  6575. }
  6576. // Context sets the context to be used in this call's Do method. Any
  6577. // pending HTTP request will be aborted if the provided context is
  6578. // canceled.
  6579. func (c *TypeProvidersDeleteCall) Context(ctx context.Context) *TypeProvidersDeleteCall {
  6580. c.ctx_ = ctx
  6581. return c
  6582. }
  6583. // Header returns an http.Header that can be modified by the caller to
  6584. // add HTTP headers to the request.
  6585. func (c *TypeProvidersDeleteCall) Header() http.Header {
  6586. if c.header_ == nil {
  6587. c.header_ = make(http.Header)
  6588. }
  6589. return c.header_
  6590. }
  6591. func (c *TypeProvidersDeleteCall) doRequest(alt string) (*http.Response, error) {
  6592. reqHeaders := make(http.Header)
  6593. for k, v := range c.header_ {
  6594. reqHeaders[k] = v
  6595. }
  6596. reqHeaders.Set("User-Agent", c.s.userAgent())
  6597. var body io.Reader = nil
  6598. c.urlParams_.Set("alt", alt)
  6599. c.urlParams_.Set("prettyPrint", "false")
  6600. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  6601. urls += "?" + c.urlParams_.Encode()
  6602. req, err := http.NewRequest("DELETE", urls, body)
  6603. if err != nil {
  6604. return nil, err
  6605. }
  6606. req.Header = reqHeaders
  6607. googleapi.Expand(req.URL, map[string]string{
  6608. "project": c.project,
  6609. "typeProvider": c.typeProvider,
  6610. })
  6611. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6612. }
  6613. // Do executes the "deploymentmanager.typeProviders.delete" call.
  6614. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6615. // status code is an error. Response headers are in either
  6616. // *Operation.ServerResponse.Header or (if a response was returned at
  6617. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6618. // to check whether the returned error was because
  6619. // http.StatusNotModified was returned.
  6620. func (c *TypeProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6621. gensupport.SetOptions(c.urlParams_, opts...)
  6622. res, err := c.doRequest("json")
  6623. if res != nil && res.StatusCode == http.StatusNotModified {
  6624. if res.Body != nil {
  6625. res.Body.Close()
  6626. }
  6627. return nil, &googleapi.Error{
  6628. Code: res.StatusCode,
  6629. Header: res.Header,
  6630. }
  6631. }
  6632. if err != nil {
  6633. return nil, err
  6634. }
  6635. defer googleapi.CloseBody(res)
  6636. if err := googleapi.CheckResponse(res); err != nil {
  6637. return nil, err
  6638. }
  6639. ret := &Operation{
  6640. ServerResponse: googleapi.ServerResponse{
  6641. Header: res.Header,
  6642. HTTPStatusCode: res.StatusCode,
  6643. },
  6644. }
  6645. target := &ret
  6646. if err := gensupport.DecodeResponse(target, res); err != nil {
  6647. return nil, err
  6648. }
  6649. return ret, nil
  6650. // {
  6651. // "description": "Deletes a type provider.",
  6652. // "httpMethod": "DELETE",
  6653. // "id": "deploymentmanager.typeProviders.delete",
  6654. // "parameterOrder": [
  6655. // "project",
  6656. // "typeProvider"
  6657. // ],
  6658. // "parameters": {
  6659. // "project": {
  6660. // "description": "The project ID for this request.",
  6661. // "location": "path",
  6662. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  6663. // "required": true,
  6664. // "type": "string"
  6665. // },
  6666. // "typeProvider": {
  6667. // "description": "The name of the type provider for this request.",
  6668. // "location": "path",
  6669. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6670. // "required": true,
  6671. // "type": "string"
  6672. // }
  6673. // },
  6674. // "path": "{project}/global/typeProviders/{typeProvider}",
  6675. // "response": {
  6676. // "$ref": "Operation"
  6677. // },
  6678. // "scopes": [
  6679. // "https://www.googleapis.com/auth/cloud-platform",
  6680. // "https://www.googleapis.com/auth/ndev.cloudman"
  6681. // ]
  6682. // }
  6683. }
  6684. // method id "deploymentmanager.typeProviders.get":
  6685. type TypeProvidersGetCall struct {
  6686. s *Service
  6687. project string
  6688. typeProvider string
  6689. urlParams_ gensupport.URLParams
  6690. ifNoneMatch_ string
  6691. ctx_ context.Context
  6692. header_ http.Header
  6693. }
  6694. // Get: Gets information about a specific type provider.
  6695. func (r *TypeProvidersService) Get(project string, typeProvider string) *TypeProvidersGetCall {
  6696. c := &TypeProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6697. c.project = project
  6698. c.typeProvider = typeProvider
  6699. return c
  6700. }
  6701. // Fields allows partial responses to be retrieved. See
  6702. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6703. // for more information.
  6704. func (c *TypeProvidersGetCall) Fields(s ...googleapi.Field) *TypeProvidersGetCall {
  6705. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6706. return c
  6707. }
  6708. // IfNoneMatch sets the optional parameter which makes the operation
  6709. // fail if the object's ETag matches the given value. This is useful for
  6710. // getting updates only after the object has changed since the last
  6711. // request. Use googleapi.IsNotModified to check whether the response
  6712. // error from Do is the result of In-None-Match.
  6713. func (c *TypeProvidersGetCall) IfNoneMatch(entityTag string) *TypeProvidersGetCall {
  6714. c.ifNoneMatch_ = entityTag
  6715. return c
  6716. }
  6717. // Context sets the context to be used in this call's Do method. Any
  6718. // pending HTTP request will be aborted if the provided context is
  6719. // canceled.
  6720. func (c *TypeProvidersGetCall) Context(ctx context.Context) *TypeProvidersGetCall {
  6721. c.ctx_ = ctx
  6722. return c
  6723. }
  6724. // Header returns an http.Header that can be modified by the caller to
  6725. // add HTTP headers to the request.
  6726. func (c *TypeProvidersGetCall) Header() http.Header {
  6727. if c.header_ == nil {
  6728. c.header_ = make(http.Header)
  6729. }
  6730. return c.header_
  6731. }
  6732. func (c *TypeProvidersGetCall) doRequest(alt string) (*http.Response, error) {
  6733. reqHeaders := make(http.Header)
  6734. for k, v := range c.header_ {
  6735. reqHeaders[k] = v
  6736. }
  6737. reqHeaders.Set("User-Agent", c.s.userAgent())
  6738. if c.ifNoneMatch_ != "" {
  6739. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6740. }
  6741. var body io.Reader = nil
  6742. c.urlParams_.Set("alt", alt)
  6743. c.urlParams_.Set("prettyPrint", "false")
  6744. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  6745. urls += "?" + c.urlParams_.Encode()
  6746. req, err := http.NewRequest("GET", urls, body)
  6747. if err != nil {
  6748. return nil, err
  6749. }
  6750. req.Header = reqHeaders
  6751. googleapi.Expand(req.URL, map[string]string{
  6752. "project": c.project,
  6753. "typeProvider": c.typeProvider,
  6754. })
  6755. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6756. }
  6757. // Do executes the "deploymentmanager.typeProviders.get" call.
  6758. // Exactly one of *TypeProvider or error will be non-nil. Any non-2xx
  6759. // status code is an error. Response headers are in either
  6760. // *TypeProvider.ServerResponse.Header or (if a response was returned at
  6761. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6762. // to check whether the returned error was because
  6763. // http.StatusNotModified was returned.
  6764. func (c *TypeProvidersGetCall) Do(opts ...googleapi.CallOption) (*TypeProvider, error) {
  6765. gensupport.SetOptions(c.urlParams_, opts...)
  6766. res, err := c.doRequest("json")
  6767. if res != nil && res.StatusCode == http.StatusNotModified {
  6768. if res.Body != nil {
  6769. res.Body.Close()
  6770. }
  6771. return nil, &googleapi.Error{
  6772. Code: res.StatusCode,
  6773. Header: res.Header,
  6774. }
  6775. }
  6776. if err != nil {
  6777. return nil, err
  6778. }
  6779. defer googleapi.CloseBody(res)
  6780. if err := googleapi.CheckResponse(res); err != nil {
  6781. return nil, err
  6782. }
  6783. ret := &TypeProvider{
  6784. ServerResponse: googleapi.ServerResponse{
  6785. Header: res.Header,
  6786. HTTPStatusCode: res.StatusCode,
  6787. },
  6788. }
  6789. target := &ret
  6790. if err := gensupport.DecodeResponse(target, res); err != nil {
  6791. return nil, err
  6792. }
  6793. return ret, nil
  6794. // {
  6795. // "description": "Gets information about a specific type provider.",
  6796. // "httpMethod": "GET",
  6797. // "id": "deploymentmanager.typeProviders.get",
  6798. // "parameterOrder": [
  6799. // "project",
  6800. // "typeProvider"
  6801. // ],
  6802. // "parameters": {
  6803. // "project": {
  6804. // "description": "The project ID for this request.",
  6805. // "location": "path",
  6806. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  6807. // "required": true,
  6808. // "type": "string"
  6809. // },
  6810. // "typeProvider": {
  6811. // "description": "The name of the type provider for this request.",
  6812. // "location": "path",
  6813. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6814. // "required": true,
  6815. // "type": "string"
  6816. // }
  6817. // },
  6818. // "path": "{project}/global/typeProviders/{typeProvider}",
  6819. // "response": {
  6820. // "$ref": "TypeProvider"
  6821. // },
  6822. // "scopes": [
  6823. // "https://www.googleapis.com/auth/cloud-platform",
  6824. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6825. // "https://www.googleapis.com/auth/ndev.cloudman",
  6826. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6827. // ]
  6828. // }
  6829. }
  6830. // method id "deploymentmanager.typeProviders.getType":
  6831. type TypeProvidersGetTypeCall struct {
  6832. s *Service
  6833. project string
  6834. typeProvider string
  6835. type_ string
  6836. urlParams_ gensupport.URLParams
  6837. ifNoneMatch_ string
  6838. ctx_ context.Context
  6839. header_ http.Header
  6840. }
  6841. // GetType: Gets a type info for a type provided by a TypeProvider.
  6842. func (r *TypeProvidersService) GetType(project string, typeProvider string, type_ string) *TypeProvidersGetTypeCall {
  6843. c := &TypeProvidersGetTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6844. c.project = project
  6845. c.typeProvider = typeProvider
  6846. c.type_ = type_
  6847. return c
  6848. }
  6849. // Fields allows partial responses to be retrieved. See
  6850. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6851. // for more information.
  6852. func (c *TypeProvidersGetTypeCall) Fields(s ...googleapi.Field) *TypeProvidersGetTypeCall {
  6853. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6854. return c
  6855. }
  6856. // IfNoneMatch sets the optional parameter which makes the operation
  6857. // fail if the object's ETag matches the given value. This is useful for
  6858. // getting updates only after the object has changed since the last
  6859. // request. Use googleapi.IsNotModified to check whether the response
  6860. // error from Do is the result of In-None-Match.
  6861. func (c *TypeProvidersGetTypeCall) IfNoneMatch(entityTag string) *TypeProvidersGetTypeCall {
  6862. c.ifNoneMatch_ = entityTag
  6863. return c
  6864. }
  6865. // Context sets the context to be used in this call's Do method. Any
  6866. // pending HTTP request will be aborted if the provided context is
  6867. // canceled.
  6868. func (c *TypeProvidersGetTypeCall) Context(ctx context.Context) *TypeProvidersGetTypeCall {
  6869. c.ctx_ = ctx
  6870. return c
  6871. }
  6872. // Header returns an http.Header that can be modified by the caller to
  6873. // add HTTP headers to the request.
  6874. func (c *TypeProvidersGetTypeCall) Header() http.Header {
  6875. if c.header_ == nil {
  6876. c.header_ = make(http.Header)
  6877. }
  6878. return c.header_
  6879. }
  6880. func (c *TypeProvidersGetTypeCall) doRequest(alt string) (*http.Response, error) {
  6881. reqHeaders := make(http.Header)
  6882. for k, v := range c.header_ {
  6883. reqHeaders[k] = v
  6884. }
  6885. reqHeaders.Set("User-Agent", c.s.userAgent())
  6886. if c.ifNoneMatch_ != "" {
  6887. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6888. }
  6889. var body io.Reader = nil
  6890. c.urlParams_.Set("alt", alt)
  6891. c.urlParams_.Set("prettyPrint", "false")
  6892. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types/{type}")
  6893. urls += "?" + c.urlParams_.Encode()
  6894. req, err := http.NewRequest("GET", urls, body)
  6895. if err != nil {
  6896. return nil, err
  6897. }
  6898. req.Header = reqHeaders
  6899. googleapi.Expand(req.URL, map[string]string{
  6900. "project": c.project,
  6901. "typeProvider": c.typeProvider,
  6902. "type": c.type_,
  6903. })
  6904. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6905. }
  6906. // Do executes the "deploymentmanager.typeProviders.getType" call.
  6907. // Exactly one of *TypeInfo or error will be non-nil. Any non-2xx status
  6908. // code is an error. Response headers are in either
  6909. // *TypeInfo.ServerResponse.Header or (if a response was returned at
  6910. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6911. // to check whether the returned error was because
  6912. // http.StatusNotModified was returned.
  6913. func (c *TypeProvidersGetTypeCall) Do(opts ...googleapi.CallOption) (*TypeInfo, error) {
  6914. gensupport.SetOptions(c.urlParams_, opts...)
  6915. res, err := c.doRequest("json")
  6916. if res != nil && res.StatusCode == http.StatusNotModified {
  6917. if res.Body != nil {
  6918. res.Body.Close()
  6919. }
  6920. return nil, &googleapi.Error{
  6921. Code: res.StatusCode,
  6922. Header: res.Header,
  6923. }
  6924. }
  6925. if err != nil {
  6926. return nil, err
  6927. }
  6928. defer googleapi.CloseBody(res)
  6929. if err := googleapi.CheckResponse(res); err != nil {
  6930. return nil, err
  6931. }
  6932. ret := &TypeInfo{
  6933. ServerResponse: googleapi.ServerResponse{
  6934. Header: res.Header,
  6935. HTTPStatusCode: res.StatusCode,
  6936. },
  6937. }
  6938. target := &ret
  6939. if err := gensupport.DecodeResponse(target, res); err != nil {
  6940. return nil, err
  6941. }
  6942. return ret, nil
  6943. // {
  6944. // "description": "Gets a type info for a type provided by a TypeProvider.",
  6945. // "httpMethod": "GET",
  6946. // "id": "deploymentmanager.typeProviders.getType",
  6947. // "parameterOrder": [
  6948. // "project",
  6949. // "typeProvider",
  6950. // "type"
  6951. // ],
  6952. // "parameters": {
  6953. // "project": {
  6954. // "description": "The project ID for this request.",
  6955. // "location": "path",
  6956. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  6957. // "required": true,
  6958. // "type": "string"
  6959. // },
  6960. // "type": {
  6961. // "description": "The name of the type provider type for this request.",
  6962. // "location": "path",
  6963. // "required": true,
  6964. // "type": "string"
  6965. // },
  6966. // "typeProvider": {
  6967. // "description": "The name of the type provider for this request.",
  6968. // "location": "path",
  6969. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6970. // "required": true,
  6971. // "type": "string"
  6972. // }
  6973. // },
  6974. // "path": "{project}/global/typeProviders/{typeProvider}/types/{type}",
  6975. // "response": {
  6976. // "$ref": "TypeInfo"
  6977. // },
  6978. // "scopes": [
  6979. // "https://www.googleapis.com/auth/cloud-platform",
  6980. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6981. // "https://www.googleapis.com/auth/ndev.cloudman",
  6982. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6983. // ]
  6984. // }
  6985. }
  6986. // method id "deploymentmanager.typeProviders.insert":
  6987. type TypeProvidersInsertCall struct {
  6988. s *Service
  6989. project string
  6990. typeprovider *TypeProvider
  6991. urlParams_ gensupport.URLParams
  6992. ctx_ context.Context
  6993. header_ http.Header
  6994. }
  6995. // Insert: Creates a type provider.
  6996. func (r *TypeProvidersService) Insert(project string, typeprovider *TypeProvider) *TypeProvidersInsertCall {
  6997. c := &TypeProvidersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6998. c.project = project
  6999. c.typeprovider = typeprovider
  7000. return c
  7001. }
  7002. // Fields allows partial responses to be retrieved. See
  7003. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7004. // for more information.
  7005. func (c *TypeProvidersInsertCall) Fields(s ...googleapi.Field) *TypeProvidersInsertCall {
  7006. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7007. return c
  7008. }
  7009. // Context sets the context to be used in this call's Do method. Any
  7010. // pending HTTP request will be aborted if the provided context is
  7011. // canceled.
  7012. func (c *TypeProvidersInsertCall) Context(ctx context.Context) *TypeProvidersInsertCall {
  7013. c.ctx_ = ctx
  7014. return c
  7015. }
  7016. // Header returns an http.Header that can be modified by the caller to
  7017. // add HTTP headers to the request.
  7018. func (c *TypeProvidersInsertCall) Header() http.Header {
  7019. if c.header_ == nil {
  7020. c.header_ = make(http.Header)
  7021. }
  7022. return c.header_
  7023. }
  7024. func (c *TypeProvidersInsertCall) doRequest(alt string) (*http.Response, error) {
  7025. reqHeaders := make(http.Header)
  7026. for k, v := range c.header_ {
  7027. reqHeaders[k] = v
  7028. }
  7029. reqHeaders.Set("User-Agent", c.s.userAgent())
  7030. var body io.Reader = nil
  7031. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7032. if err != nil {
  7033. return nil, err
  7034. }
  7035. reqHeaders.Set("Content-Type", "application/json")
  7036. c.urlParams_.Set("alt", alt)
  7037. c.urlParams_.Set("prettyPrint", "false")
  7038. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders")
  7039. urls += "?" + c.urlParams_.Encode()
  7040. req, err := http.NewRequest("POST", urls, body)
  7041. if err != nil {
  7042. return nil, err
  7043. }
  7044. req.Header = reqHeaders
  7045. googleapi.Expand(req.URL, map[string]string{
  7046. "project": c.project,
  7047. })
  7048. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7049. }
  7050. // Do executes the "deploymentmanager.typeProviders.insert" call.
  7051. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7052. // status code is an error. Response headers are in either
  7053. // *Operation.ServerResponse.Header or (if a response was returned at
  7054. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7055. // to check whether the returned error was because
  7056. // http.StatusNotModified was returned.
  7057. func (c *TypeProvidersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7058. gensupport.SetOptions(c.urlParams_, opts...)
  7059. res, err := c.doRequest("json")
  7060. if res != nil && res.StatusCode == http.StatusNotModified {
  7061. if res.Body != nil {
  7062. res.Body.Close()
  7063. }
  7064. return nil, &googleapi.Error{
  7065. Code: res.StatusCode,
  7066. Header: res.Header,
  7067. }
  7068. }
  7069. if err != nil {
  7070. return nil, err
  7071. }
  7072. defer googleapi.CloseBody(res)
  7073. if err := googleapi.CheckResponse(res); err != nil {
  7074. return nil, err
  7075. }
  7076. ret := &Operation{
  7077. ServerResponse: googleapi.ServerResponse{
  7078. Header: res.Header,
  7079. HTTPStatusCode: res.StatusCode,
  7080. },
  7081. }
  7082. target := &ret
  7083. if err := gensupport.DecodeResponse(target, res); err != nil {
  7084. return nil, err
  7085. }
  7086. return ret, nil
  7087. // {
  7088. // "description": "Creates a type provider.",
  7089. // "httpMethod": "POST",
  7090. // "id": "deploymentmanager.typeProviders.insert",
  7091. // "parameterOrder": [
  7092. // "project"
  7093. // ],
  7094. // "parameters": {
  7095. // "project": {
  7096. // "description": "The project ID for this request.",
  7097. // "location": "path",
  7098. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  7099. // "required": true,
  7100. // "type": "string"
  7101. // }
  7102. // },
  7103. // "path": "{project}/global/typeProviders",
  7104. // "request": {
  7105. // "$ref": "TypeProvider"
  7106. // },
  7107. // "response": {
  7108. // "$ref": "Operation"
  7109. // },
  7110. // "scopes": [
  7111. // "https://www.googleapis.com/auth/cloud-platform",
  7112. // "https://www.googleapis.com/auth/ndev.cloudman"
  7113. // ]
  7114. // }
  7115. }
  7116. // method id "deploymentmanager.typeProviders.list":
  7117. type TypeProvidersListCall struct {
  7118. s *Service
  7119. project string
  7120. urlParams_ gensupport.URLParams
  7121. ifNoneMatch_ string
  7122. ctx_ context.Context
  7123. header_ http.Header
  7124. }
  7125. // List: Lists all resource type providers for Deployment Manager.
  7126. func (r *TypeProvidersService) List(project string) *TypeProvidersListCall {
  7127. c := &TypeProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7128. c.project = project
  7129. return c
  7130. }
  7131. // Filter sets the optional parameter "filter": A filter expression that
  7132. // filters resources listed in the response. The expression must specify
  7133. // the field name, a comparison operator, and the value that you want to
  7134. // use for filtering. The value must be a string, a number, or a
  7135. // boolean. The comparison operator must be either =, !=, >, or <.
  7136. //
  7137. // For example, if you are filtering Compute Engine instances, you can
  7138. // exclude instances named example-instance by specifying name !=
  7139. // example-instance.
  7140. //
  7141. // You can also filter nested fields. For example, you could specify
  7142. // scheduling.automaticRestart = false to include instances only if they
  7143. // are not scheduled for automatic restarts. You can use filtering on
  7144. // nested fields to filter based on resource labels.
  7145. //
  7146. // To filter on multiple expressions, provide each separate expression
  7147. // within parentheses. For example, (scheduling.automaticRestart = true)
  7148. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7149. // AND expression. However, you can include AND and OR expressions
  7150. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7151. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7152. // true).
  7153. func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall {
  7154. c.urlParams_.Set("filter", filter)
  7155. return c
  7156. }
  7157. // MaxResults sets the optional parameter "maxResults": The maximum
  7158. // number of results per page that should be returned. If the number of
  7159. // available results is larger than maxResults, Compute Engine returns a
  7160. // nextPageToken that can be used to get the next page of results in
  7161. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7162. // (Default: 500)
  7163. func (c *TypeProvidersListCall) MaxResults(maxResults int64) *TypeProvidersListCall {
  7164. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7165. return c
  7166. }
  7167. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7168. // a certain order. By default, results are returned in alphanumerical
  7169. // order based on the resource name.
  7170. //
  7171. // You can also sort results in descending order based on the creation
  7172. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7173. // based on the creationTimestamp field in reverse chronological order
  7174. // (newest result first). Use this to sort resources like operations so
  7175. // that the newest operation is returned first.
  7176. //
  7177. // Currently, only sorting by name or creationTimestamp desc is
  7178. // supported.
  7179. func (c *TypeProvidersListCall) OrderBy(orderBy string) *TypeProvidersListCall {
  7180. c.urlParams_.Set("orderBy", orderBy)
  7181. return c
  7182. }
  7183. // PageToken sets the optional parameter "pageToken": Specifies a page
  7184. // token to use. Set pageToken to the nextPageToken returned by a
  7185. // previous list request to get the next page of results.
  7186. func (c *TypeProvidersListCall) PageToken(pageToken string) *TypeProvidersListCall {
  7187. c.urlParams_.Set("pageToken", pageToken)
  7188. return c
  7189. }
  7190. // Fields allows partial responses to be retrieved. See
  7191. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7192. // for more information.
  7193. func (c *TypeProvidersListCall) Fields(s ...googleapi.Field) *TypeProvidersListCall {
  7194. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7195. return c
  7196. }
  7197. // IfNoneMatch sets the optional parameter which makes the operation
  7198. // fail if the object's ETag matches the given value. This is useful for
  7199. // getting updates only after the object has changed since the last
  7200. // request. Use googleapi.IsNotModified to check whether the response
  7201. // error from Do is the result of In-None-Match.
  7202. func (c *TypeProvidersListCall) IfNoneMatch(entityTag string) *TypeProvidersListCall {
  7203. c.ifNoneMatch_ = entityTag
  7204. return c
  7205. }
  7206. // Context sets the context to be used in this call's Do method. Any
  7207. // pending HTTP request will be aborted if the provided context is
  7208. // canceled.
  7209. func (c *TypeProvidersListCall) Context(ctx context.Context) *TypeProvidersListCall {
  7210. c.ctx_ = ctx
  7211. return c
  7212. }
  7213. // Header returns an http.Header that can be modified by the caller to
  7214. // add HTTP headers to the request.
  7215. func (c *TypeProvidersListCall) Header() http.Header {
  7216. if c.header_ == nil {
  7217. c.header_ = make(http.Header)
  7218. }
  7219. return c.header_
  7220. }
  7221. func (c *TypeProvidersListCall) doRequest(alt string) (*http.Response, error) {
  7222. reqHeaders := make(http.Header)
  7223. for k, v := range c.header_ {
  7224. reqHeaders[k] = v
  7225. }
  7226. reqHeaders.Set("User-Agent", c.s.userAgent())
  7227. if c.ifNoneMatch_ != "" {
  7228. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7229. }
  7230. var body io.Reader = nil
  7231. c.urlParams_.Set("alt", alt)
  7232. c.urlParams_.Set("prettyPrint", "false")
  7233. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders")
  7234. urls += "?" + c.urlParams_.Encode()
  7235. req, err := http.NewRequest("GET", urls, body)
  7236. if err != nil {
  7237. return nil, err
  7238. }
  7239. req.Header = reqHeaders
  7240. googleapi.Expand(req.URL, map[string]string{
  7241. "project": c.project,
  7242. })
  7243. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7244. }
  7245. // Do executes the "deploymentmanager.typeProviders.list" call.
  7246. // Exactly one of *TypeProvidersListResponse or error will be non-nil.
  7247. // Any non-2xx status code is an error. Response headers are in either
  7248. // *TypeProvidersListResponse.ServerResponse.Header or (if a response
  7249. // was returned at all) in error.(*googleapi.Error).Header. Use
  7250. // googleapi.IsNotModified to check whether the returned error was
  7251. // because http.StatusNotModified was returned.
  7252. func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListResponse, error) {
  7253. gensupport.SetOptions(c.urlParams_, opts...)
  7254. res, err := c.doRequest("json")
  7255. if res != nil && res.StatusCode == http.StatusNotModified {
  7256. if res.Body != nil {
  7257. res.Body.Close()
  7258. }
  7259. return nil, &googleapi.Error{
  7260. Code: res.StatusCode,
  7261. Header: res.Header,
  7262. }
  7263. }
  7264. if err != nil {
  7265. return nil, err
  7266. }
  7267. defer googleapi.CloseBody(res)
  7268. if err := googleapi.CheckResponse(res); err != nil {
  7269. return nil, err
  7270. }
  7271. ret := &TypeProvidersListResponse{
  7272. ServerResponse: googleapi.ServerResponse{
  7273. Header: res.Header,
  7274. HTTPStatusCode: res.StatusCode,
  7275. },
  7276. }
  7277. target := &ret
  7278. if err := gensupport.DecodeResponse(target, res); err != nil {
  7279. return nil, err
  7280. }
  7281. return ret, nil
  7282. // {
  7283. // "description": "Lists all resource type providers for Deployment Manager.",
  7284. // "httpMethod": "GET",
  7285. // "id": "deploymentmanager.typeProviders.list",
  7286. // "parameterOrder": [
  7287. // "project"
  7288. // ],
  7289. // "parameters": {
  7290. // "filter": {
  7291. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  7292. // "location": "query",
  7293. // "type": "string"
  7294. // },
  7295. // "maxResults": {
  7296. // "default": "500",
  7297. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  7298. // "format": "uint32",
  7299. // "location": "query",
  7300. // "minimum": "0",
  7301. // "type": "integer"
  7302. // },
  7303. // "orderBy": {
  7304. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  7305. // "location": "query",
  7306. // "type": "string"
  7307. // },
  7308. // "pageToken": {
  7309. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  7310. // "location": "query",
  7311. // "type": "string"
  7312. // },
  7313. // "project": {
  7314. // "description": "The project ID for this request.",
  7315. // "location": "path",
  7316. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  7317. // "required": true,
  7318. // "type": "string"
  7319. // }
  7320. // },
  7321. // "path": "{project}/global/typeProviders",
  7322. // "response": {
  7323. // "$ref": "TypeProvidersListResponse"
  7324. // },
  7325. // "scopes": [
  7326. // "https://www.googleapis.com/auth/cloud-platform",
  7327. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7328. // "https://www.googleapis.com/auth/ndev.cloudman",
  7329. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7330. // ]
  7331. // }
  7332. }
  7333. // Pages invokes f for each page of results.
  7334. // A non-nil error returned from f will halt the iteration.
  7335. // The provided context supersedes any context provided to the Context method.
  7336. func (c *TypeProvidersListCall) Pages(ctx context.Context, f func(*TypeProvidersListResponse) error) error {
  7337. c.ctx_ = ctx
  7338. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7339. for {
  7340. x, err := c.Do()
  7341. if err != nil {
  7342. return err
  7343. }
  7344. if err := f(x); err != nil {
  7345. return err
  7346. }
  7347. if x.NextPageToken == "" {
  7348. return nil
  7349. }
  7350. c.PageToken(x.NextPageToken)
  7351. }
  7352. }
  7353. // method id "deploymentmanager.typeProviders.listTypes":
  7354. type TypeProvidersListTypesCall struct {
  7355. s *Service
  7356. project string
  7357. typeProvider string
  7358. urlParams_ gensupport.URLParams
  7359. ifNoneMatch_ string
  7360. ctx_ context.Context
  7361. header_ http.Header
  7362. }
  7363. // ListTypes: Lists all the type info for a TypeProvider.
  7364. func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *TypeProvidersListTypesCall {
  7365. c := &TypeProvidersListTypesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7366. c.project = project
  7367. c.typeProvider = typeProvider
  7368. return c
  7369. }
  7370. // Filter sets the optional parameter "filter": A filter expression that
  7371. // filters resources listed in the response. The expression must specify
  7372. // the field name, a comparison operator, and the value that you want to
  7373. // use for filtering. The value must be a string, a number, or a
  7374. // boolean. The comparison operator must be either =, !=, >, or <.
  7375. //
  7376. // For example, if you are filtering Compute Engine instances, you can
  7377. // exclude instances named example-instance by specifying name !=
  7378. // example-instance.
  7379. //
  7380. // You can also filter nested fields. For example, you could specify
  7381. // scheduling.automaticRestart = false to include instances only if they
  7382. // are not scheduled for automatic restarts. You can use filtering on
  7383. // nested fields to filter based on resource labels.
  7384. //
  7385. // To filter on multiple expressions, provide each separate expression
  7386. // within parentheses. For example, (scheduling.automaticRestart = true)
  7387. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7388. // AND expression. However, you can include AND and OR expressions
  7389. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7390. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7391. // true).
  7392. func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall {
  7393. c.urlParams_.Set("filter", filter)
  7394. return c
  7395. }
  7396. // MaxResults sets the optional parameter "maxResults": The maximum
  7397. // number of results per page that should be returned. If the number of
  7398. // available results is larger than maxResults, Compute Engine returns a
  7399. // nextPageToken that can be used to get the next page of results in
  7400. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7401. // (Default: 500)
  7402. func (c *TypeProvidersListTypesCall) MaxResults(maxResults int64) *TypeProvidersListTypesCall {
  7403. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7404. return c
  7405. }
  7406. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7407. // a certain order. By default, results are returned in alphanumerical
  7408. // order based on the resource name.
  7409. //
  7410. // You can also sort results in descending order based on the creation
  7411. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7412. // based on the creationTimestamp field in reverse chronological order
  7413. // (newest result first). Use this to sort resources like operations so
  7414. // that the newest operation is returned first.
  7415. //
  7416. // Currently, only sorting by name or creationTimestamp desc is
  7417. // supported.
  7418. func (c *TypeProvidersListTypesCall) OrderBy(orderBy string) *TypeProvidersListTypesCall {
  7419. c.urlParams_.Set("orderBy", orderBy)
  7420. return c
  7421. }
  7422. // PageToken sets the optional parameter "pageToken": Specifies a page
  7423. // token to use. Set pageToken to the nextPageToken returned by a
  7424. // previous list request to get the next page of results.
  7425. func (c *TypeProvidersListTypesCall) PageToken(pageToken string) *TypeProvidersListTypesCall {
  7426. c.urlParams_.Set("pageToken", pageToken)
  7427. return c
  7428. }
  7429. // Fields allows partial responses to be retrieved. See
  7430. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7431. // for more information.
  7432. func (c *TypeProvidersListTypesCall) Fields(s ...googleapi.Field) *TypeProvidersListTypesCall {
  7433. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7434. return c
  7435. }
  7436. // IfNoneMatch sets the optional parameter which makes the operation
  7437. // fail if the object's ETag matches the given value. This is useful for
  7438. // getting updates only after the object has changed since the last
  7439. // request. Use googleapi.IsNotModified to check whether the response
  7440. // error from Do is the result of In-None-Match.
  7441. func (c *TypeProvidersListTypesCall) IfNoneMatch(entityTag string) *TypeProvidersListTypesCall {
  7442. c.ifNoneMatch_ = entityTag
  7443. return c
  7444. }
  7445. // Context sets the context to be used in this call's Do method. Any
  7446. // pending HTTP request will be aborted if the provided context is
  7447. // canceled.
  7448. func (c *TypeProvidersListTypesCall) Context(ctx context.Context) *TypeProvidersListTypesCall {
  7449. c.ctx_ = ctx
  7450. return c
  7451. }
  7452. // Header returns an http.Header that can be modified by the caller to
  7453. // add HTTP headers to the request.
  7454. func (c *TypeProvidersListTypesCall) Header() http.Header {
  7455. if c.header_ == nil {
  7456. c.header_ = make(http.Header)
  7457. }
  7458. return c.header_
  7459. }
  7460. func (c *TypeProvidersListTypesCall) doRequest(alt string) (*http.Response, error) {
  7461. reqHeaders := make(http.Header)
  7462. for k, v := range c.header_ {
  7463. reqHeaders[k] = v
  7464. }
  7465. reqHeaders.Set("User-Agent", c.s.userAgent())
  7466. if c.ifNoneMatch_ != "" {
  7467. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7468. }
  7469. var body io.Reader = nil
  7470. c.urlParams_.Set("alt", alt)
  7471. c.urlParams_.Set("prettyPrint", "false")
  7472. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types")
  7473. urls += "?" + c.urlParams_.Encode()
  7474. req, err := http.NewRequest("GET", urls, body)
  7475. if err != nil {
  7476. return nil, err
  7477. }
  7478. req.Header = reqHeaders
  7479. googleapi.Expand(req.URL, map[string]string{
  7480. "project": c.project,
  7481. "typeProvider": c.typeProvider,
  7482. })
  7483. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7484. }
  7485. // Do executes the "deploymentmanager.typeProviders.listTypes" call.
  7486. // Exactly one of *TypeProvidersListTypesResponse or error will be
  7487. // non-nil. Any non-2xx status code is an error. Response headers are in
  7488. // either *TypeProvidersListTypesResponse.ServerResponse.Header or (if a
  7489. // response was returned at all) in error.(*googleapi.Error).Header. Use
  7490. // googleapi.IsNotModified to check whether the returned error was
  7491. // because http.StatusNotModified was returned.
  7492. func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListTypesResponse, error) {
  7493. gensupport.SetOptions(c.urlParams_, opts...)
  7494. res, err := c.doRequest("json")
  7495. if res != nil && res.StatusCode == http.StatusNotModified {
  7496. if res.Body != nil {
  7497. res.Body.Close()
  7498. }
  7499. return nil, &googleapi.Error{
  7500. Code: res.StatusCode,
  7501. Header: res.Header,
  7502. }
  7503. }
  7504. if err != nil {
  7505. return nil, err
  7506. }
  7507. defer googleapi.CloseBody(res)
  7508. if err := googleapi.CheckResponse(res); err != nil {
  7509. return nil, err
  7510. }
  7511. ret := &TypeProvidersListTypesResponse{
  7512. ServerResponse: googleapi.ServerResponse{
  7513. Header: res.Header,
  7514. HTTPStatusCode: res.StatusCode,
  7515. },
  7516. }
  7517. target := &ret
  7518. if err := gensupport.DecodeResponse(target, res); err != nil {
  7519. return nil, err
  7520. }
  7521. return ret, nil
  7522. // {
  7523. // "description": "Lists all the type info for a TypeProvider.",
  7524. // "httpMethod": "GET",
  7525. // "id": "deploymentmanager.typeProviders.listTypes",
  7526. // "parameterOrder": [
  7527. // "project",
  7528. // "typeProvider"
  7529. // ],
  7530. // "parameters": {
  7531. // "filter": {
  7532. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  7533. // "location": "query",
  7534. // "type": "string"
  7535. // },
  7536. // "maxResults": {
  7537. // "default": "500",
  7538. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  7539. // "format": "uint32",
  7540. // "location": "query",
  7541. // "minimum": "0",
  7542. // "type": "integer"
  7543. // },
  7544. // "orderBy": {
  7545. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  7546. // "location": "query",
  7547. // "type": "string"
  7548. // },
  7549. // "pageToken": {
  7550. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  7551. // "location": "query",
  7552. // "type": "string"
  7553. // },
  7554. // "project": {
  7555. // "description": "The project ID for this request.",
  7556. // "location": "path",
  7557. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  7558. // "required": true,
  7559. // "type": "string"
  7560. // },
  7561. // "typeProvider": {
  7562. // "description": "The name of the type provider for this request.",
  7563. // "location": "path",
  7564. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7565. // "required": true,
  7566. // "type": "string"
  7567. // }
  7568. // },
  7569. // "path": "{project}/global/typeProviders/{typeProvider}/types",
  7570. // "response": {
  7571. // "$ref": "TypeProvidersListTypesResponse"
  7572. // },
  7573. // "scopes": [
  7574. // "https://www.googleapis.com/auth/cloud-platform",
  7575. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7576. // "https://www.googleapis.com/auth/ndev.cloudman",
  7577. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7578. // ]
  7579. // }
  7580. }
  7581. // Pages invokes f for each page of results.
  7582. // A non-nil error returned from f will halt the iteration.
  7583. // The provided context supersedes any context provided to the Context method.
  7584. func (c *TypeProvidersListTypesCall) Pages(ctx context.Context, f func(*TypeProvidersListTypesResponse) error) error {
  7585. c.ctx_ = ctx
  7586. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7587. for {
  7588. x, err := c.Do()
  7589. if err != nil {
  7590. return err
  7591. }
  7592. if err := f(x); err != nil {
  7593. return err
  7594. }
  7595. if x.NextPageToken == "" {
  7596. return nil
  7597. }
  7598. c.PageToken(x.NextPageToken)
  7599. }
  7600. }
  7601. // method id "deploymentmanager.typeProviders.patch":
  7602. type TypeProvidersPatchCall struct {
  7603. s *Service
  7604. project string
  7605. typeProvider string
  7606. typeprovider *TypeProvider
  7607. urlParams_ gensupport.URLParams
  7608. ctx_ context.Context
  7609. header_ http.Header
  7610. }
  7611. // Patch: Updates a type provider. This method supports patch semantics.
  7612. func (r *TypeProvidersService) Patch(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersPatchCall {
  7613. c := &TypeProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7614. c.project = project
  7615. c.typeProvider = typeProvider
  7616. c.typeprovider = typeprovider
  7617. return c
  7618. }
  7619. // Fields allows partial responses to be retrieved. See
  7620. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7621. // for more information.
  7622. func (c *TypeProvidersPatchCall) Fields(s ...googleapi.Field) *TypeProvidersPatchCall {
  7623. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7624. return c
  7625. }
  7626. // Context sets the context to be used in this call's Do method. Any
  7627. // pending HTTP request will be aborted if the provided context is
  7628. // canceled.
  7629. func (c *TypeProvidersPatchCall) Context(ctx context.Context) *TypeProvidersPatchCall {
  7630. c.ctx_ = ctx
  7631. return c
  7632. }
  7633. // Header returns an http.Header that can be modified by the caller to
  7634. // add HTTP headers to the request.
  7635. func (c *TypeProvidersPatchCall) Header() http.Header {
  7636. if c.header_ == nil {
  7637. c.header_ = make(http.Header)
  7638. }
  7639. return c.header_
  7640. }
  7641. func (c *TypeProvidersPatchCall) doRequest(alt string) (*http.Response, error) {
  7642. reqHeaders := make(http.Header)
  7643. for k, v := range c.header_ {
  7644. reqHeaders[k] = v
  7645. }
  7646. reqHeaders.Set("User-Agent", c.s.userAgent())
  7647. var body io.Reader = nil
  7648. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7649. if err != nil {
  7650. return nil, err
  7651. }
  7652. reqHeaders.Set("Content-Type", "application/json")
  7653. c.urlParams_.Set("alt", alt)
  7654. c.urlParams_.Set("prettyPrint", "false")
  7655. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  7656. urls += "?" + c.urlParams_.Encode()
  7657. req, err := http.NewRequest("PATCH", urls, body)
  7658. if err != nil {
  7659. return nil, err
  7660. }
  7661. req.Header = reqHeaders
  7662. googleapi.Expand(req.URL, map[string]string{
  7663. "project": c.project,
  7664. "typeProvider": c.typeProvider,
  7665. })
  7666. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7667. }
  7668. // Do executes the "deploymentmanager.typeProviders.patch" call.
  7669. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7670. // status code is an error. Response headers are in either
  7671. // *Operation.ServerResponse.Header or (if a response was returned at
  7672. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7673. // to check whether the returned error was because
  7674. // http.StatusNotModified was returned.
  7675. func (c *TypeProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7676. gensupport.SetOptions(c.urlParams_, opts...)
  7677. res, err := c.doRequest("json")
  7678. if res != nil && res.StatusCode == http.StatusNotModified {
  7679. if res.Body != nil {
  7680. res.Body.Close()
  7681. }
  7682. return nil, &googleapi.Error{
  7683. Code: res.StatusCode,
  7684. Header: res.Header,
  7685. }
  7686. }
  7687. if err != nil {
  7688. return nil, err
  7689. }
  7690. defer googleapi.CloseBody(res)
  7691. if err := googleapi.CheckResponse(res); err != nil {
  7692. return nil, err
  7693. }
  7694. ret := &Operation{
  7695. ServerResponse: googleapi.ServerResponse{
  7696. Header: res.Header,
  7697. HTTPStatusCode: res.StatusCode,
  7698. },
  7699. }
  7700. target := &ret
  7701. if err := gensupport.DecodeResponse(target, res); err != nil {
  7702. return nil, err
  7703. }
  7704. return ret, nil
  7705. // {
  7706. // "description": "Updates a type provider. This method supports patch semantics.",
  7707. // "httpMethod": "PATCH",
  7708. // "id": "deploymentmanager.typeProviders.patch",
  7709. // "parameterOrder": [
  7710. // "project",
  7711. // "typeProvider"
  7712. // ],
  7713. // "parameters": {
  7714. // "project": {
  7715. // "description": "The project ID for this request.",
  7716. // "location": "path",
  7717. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  7718. // "required": true,
  7719. // "type": "string"
  7720. // },
  7721. // "typeProvider": {
  7722. // "description": "The name of the type provider for this request.",
  7723. // "location": "path",
  7724. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7725. // "required": true,
  7726. // "type": "string"
  7727. // }
  7728. // },
  7729. // "path": "{project}/global/typeProviders/{typeProvider}",
  7730. // "request": {
  7731. // "$ref": "TypeProvider"
  7732. // },
  7733. // "response": {
  7734. // "$ref": "Operation"
  7735. // },
  7736. // "scopes": [
  7737. // "https://www.googleapis.com/auth/cloud-platform",
  7738. // "https://www.googleapis.com/auth/ndev.cloudman"
  7739. // ]
  7740. // }
  7741. }
  7742. // method id "deploymentmanager.typeProviders.update":
  7743. type TypeProvidersUpdateCall struct {
  7744. s *Service
  7745. project string
  7746. typeProvider string
  7747. typeprovider *TypeProvider
  7748. urlParams_ gensupport.URLParams
  7749. ctx_ context.Context
  7750. header_ http.Header
  7751. }
  7752. // Update: Updates a type provider.
  7753. func (r *TypeProvidersService) Update(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersUpdateCall {
  7754. c := &TypeProvidersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7755. c.project = project
  7756. c.typeProvider = typeProvider
  7757. c.typeprovider = typeprovider
  7758. return c
  7759. }
  7760. // Fields allows partial responses to be retrieved. See
  7761. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7762. // for more information.
  7763. func (c *TypeProvidersUpdateCall) Fields(s ...googleapi.Field) *TypeProvidersUpdateCall {
  7764. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7765. return c
  7766. }
  7767. // Context sets the context to be used in this call's Do method. Any
  7768. // pending HTTP request will be aborted if the provided context is
  7769. // canceled.
  7770. func (c *TypeProvidersUpdateCall) Context(ctx context.Context) *TypeProvidersUpdateCall {
  7771. c.ctx_ = ctx
  7772. return c
  7773. }
  7774. // Header returns an http.Header that can be modified by the caller to
  7775. // add HTTP headers to the request.
  7776. func (c *TypeProvidersUpdateCall) Header() http.Header {
  7777. if c.header_ == nil {
  7778. c.header_ = make(http.Header)
  7779. }
  7780. return c.header_
  7781. }
  7782. func (c *TypeProvidersUpdateCall) doRequest(alt string) (*http.Response, error) {
  7783. reqHeaders := make(http.Header)
  7784. for k, v := range c.header_ {
  7785. reqHeaders[k] = v
  7786. }
  7787. reqHeaders.Set("User-Agent", c.s.userAgent())
  7788. var body io.Reader = nil
  7789. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7790. if err != nil {
  7791. return nil, err
  7792. }
  7793. reqHeaders.Set("Content-Type", "application/json")
  7794. c.urlParams_.Set("alt", alt)
  7795. c.urlParams_.Set("prettyPrint", "false")
  7796. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  7797. urls += "?" + c.urlParams_.Encode()
  7798. req, err := http.NewRequest("PUT", urls, body)
  7799. if err != nil {
  7800. return nil, err
  7801. }
  7802. req.Header = reqHeaders
  7803. googleapi.Expand(req.URL, map[string]string{
  7804. "project": c.project,
  7805. "typeProvider": c.typeProvider,
  7806. })
  7807. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7808. }
  7809. // Do executes the "deploymentmanager.typeProviders.update" call.
  7810. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7811. // status code is an error. Response headers are in either
  7812. // *Operation.ServerResponse.Header or (if a response was returned at
  7813. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7814. // to check whether the returned error was because
  7815. // http.StatusNotModified was returned.
  7816. func (c *TypeProvidersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7817. gensupport.SetOptions(c.urlParams_, opts...)
  7818. res, err := c.doRequest("json")
  7819. if res != nil && res.StatusCode == http.StatusNotModified {
  7820. if res.Body != nil {
  7821. res.Body.Close()
  7822. }
  7823. return nil, &googleapi.Error{
  7824. Code: res.StatusCode,
  7825. Header: res.Header,
  7826. }
  7827. }
  7828. if err != nil {
  7829. return nil, err
  7830. }
  7831. defer googleapi.CloseBody(res)
  7832. if err := googleapi.CheckResponse(res); err != nil {
  7833. return nil, err
  7834. }
  7835. ret := &Operation{
  7836. ServerResponse: googleapi.ServerResponse{
  7837. Header: res.Header,
  7838. HTTPStatusCode: res.StatusCode,
  7839. },
  7840. }
  7841. target := &ret
  7842. if err := gensupport.DecodeResponse(target, res); err != nil {
  7843. return nil, err
  7844. }
  7845. return ret, nil
  7846. // {
  7847. // "description": "Updates a type provider.",
  7848. // "httpMethod": "PUT",
  7849. // "id": "deploymentmanager.typeProviders.update",
  7850. // "parameterOrder": [
  7851. // "project",
  7852. // "typeProvider"
  7853. // ],
  7854. // "parameters": {
  7855. // "project": {
  7856. // "description": "The project ID for this request.",
  7857. // "location": "path",
  7858. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  7859. // "required": true,
  7860. // "type": "string"
  7861. // },
  7862. // "typeProvider": {
  7863. // "description": "The name of the type provider for this request.",
  7864. // "location": "path",
  7865. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7866. // "required": true,
  7867. // "type": "string"
  7868. // }
  7869. // },
  7870. // "path": "{project}/global/typeProviders/{typeProvider}",
  7871. // "request": {
  7872. // "$ref": "TypeProvider"
  7873. // },
  7874. // "response": {
  7875. // "$ref": "Operation"
  7876. // },
  7877. // "scopes": [
  7878. // "https://www.googleapis.com/auth/cloud-platform",
  7879. // "https://www.googleapis.com/auth/ndev.cloudman"
  7880. // ]
  7881. // }
  7882. }
  7883. // method id "deploymentmanager.types.list":
  7884. type TypesListCall struct {
  7885. s *Service
  7886. project string
  7887. urlParams_ gensupport.URLParams
  7888. ifNoneMatch_ string
  7889. ctx_ context.Context
  7890. header_ http.Header
  7891. }
  7892. // List: Lists all resource types for Deployment Manager.
  7893. func (r *TypesService) List(project string) *TypesListCall {
  7894. c := &TypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7895. c.project = project
  7896. return c
  7897. }
  7898. // Filter sets the optional parameter "filter": A filter expression that
  7899. // filters resources listed in the response. The expression must specify
  7900. // the field name, a comparison operator, and the value that you want to
  7901. // use for filtering. The value must be a string, a number, or a
  7902. // boolean. The comparison operator must be either =, !=, >, or <.
  7903. //
  7904. // For example, if you are filtering Compute Engine instances, you can
  7905. // exclude instances named example-instance by specifying name !=
  7906. // example-instance.
  7907. //
  7908. // You can also filter nested fields. For example, you could specify
  7909. // scheduling.automaticRestart = false to include instances only if they
  7910. // are not scheduled for automatic restarts. You can use filtering on
  7911. // nested fields to filter based on resource labels.
  7912. //
  7913. // To filter on multiple expressions, provide each separate expression
  7914. // within parentheses. For example, (scheduling.automaticRestart = true)
  7915. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7916. // AND expression. However, you can include AND and OR expressions
  7917. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7918. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7919. // true).
  7920. func (c *TypesListCall) Filter(filter string) *TypesListCall {
  7921. c.urlParams_.Set("filter", filter)
  7922. return c
  7923. }
  7924. // MaxResults sets the optional parameter "maxResults": The maximum
  7925. // number of results per page that should be returned. If the number of
  7926. // available results is larger than maxResults, Compute Engine returns a
  7927. // nextPageToken that can be used to get the next page of results in
  7928. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7929. // (Default: 500)
  7930. func (c *TypesListCall) MaxResults(maxResults int64) *TypesListCall {
  7931. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7932. return c
  7933. }
  7934. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7935. // a certain order. By default, results are returned in alphanumerical
  7936. // order based on the resource name.
  7937. //
  7938. // You can also sort results in descending order based on the creation
  7939. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7940. // based on the creationTimestamp field in reverse chronological order
  7941. // (newest result first). Use this to sort resources like operations so
  7942. // that the newest operation is returned first.
  7943. //
  7944. // Currently, only sorting by name or creationTimestamp desc is
  7945. // supported.
  7946. func (c *TypesListCall) OrderBy(orderBy string) *TypesListCall {
  7947. c.urlParams_.Set("orderBy", orderBy)
  7948. return c
  7949. }
  7950. // PageToken sets the optional parameter "pageToken": Specifies a page
  7951. // token to use. Set pageToken to the nextPageToken returned by a
  7952. // previous list request to get the next page of results.
  7953. func (c *TypesListCall) PageToken(pageToken string) *TypesListCall {
  7954. c.urlParams_.Set("pageToken", pageToken)
  7955. return c
  7956. }
  7957. // Fields allows partial responses to be retrieved. See
  7958. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7959. // for more information.
  7960. func (c *TypesListCall) Fields(s ...googleapi.Field) *TypesListCall {
  7961. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7962. return c
  7963. }
  7964. // IfNoneMatch sets the optional parameter which makes the operation
  7965. // fail if the object's ETag matches the given value. This is useful for
  7966. // getting updates only after the object has changed since the last
  7967. // request. Use googleapi.IsNotModified to check whether the response
  7968. // error from Do is the result of In-None-Match.
  7969. func (c *TypesListCall) IfNoneMatch(entityTag string) *TypesListCall {
  7970. c.ifNoneMatch_ = entityTag
  7971. return c
  7972. }
  7973. // Context sets the context to be used in this call's Do method. Any
  7974. // pending HTTP request will be aborted if the provided context is
  7975. // canceled.
  7976. func (c *TypesListCall) Context(ctx context.Context) *TypesListCall {
  7977. c.ctx_ = ctx
  7978. return c
  7979. }
  7980. // Header returns an http.Header that can be modified by the caller to
  7981. // add HTTP headers to the request.
  7982. func (c *TypesListCall) Header() http.Header {
  7983. if c.header_ == nil {
  7984. c.header_ = make(http.Header)
  7985. }
  7986. return c.header_
  7987. }
  7988. func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
  7989. reqHeaders := make(http.Header)
  7990. for k, v := range c.header_ {
  7991. reqHeaders[k] = v
  7992. }
  7993. reqHeaders.Set("User-Agent", c.s.userAgent())
  7994. if c.ifNoneMatch_ != "" {
  7995. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7996. }
  7997. var body io.Reader = nil
  7998. c.urlParams_.Set("alt", alt)
  7999. c.urlParams_.Set("prettyPrint", "false")
  8000. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types")
  8001. urls += "?" + c.urlParams_.Encode()
  8002. req, err := http.NewRequest("GET", urls, body)
  8003. if err != nil {
  8004. return nil, err
  8005. }
  8006. req.Header = reqHeaders
  8007. googleapi.Expand(req.URL, map[string]string{
  8008. "project": c.project,
  8009. })
  8010. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8011. }
  8012. // Do executes the "deploymentmanager.types.list" call.
  8013. // Exactly one of *TypesListResponse or error will be non-nil. Any
  8014. // non-2xx status code is an error. Response headers are in either
  8015. // *TypesListResponse.ServerResponse.Header or (if a response was
  8016. // returned at all) in error.(*googleapi.Error).Header. Use
  8017. // googleapi.IsNotModified to check whether the returned error was
  8018. // because http.StatusNotModified was returned.
  8019. func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, error) {
  8020. gensupport.SetOptions(c.urlParams_, opts...)
  8021. res, err := c.doRequest("json")
  8022. if res != nil && res.StatusCode == http.StatusNotModified {
  8023. if res.Body != nil {
  8024. res.Body.Close()
  8025. }
  8026. return nil, &googleapi.Error{
  8027. Code: res.StatusCode,
  8028. Header: res.Header,
  8029. }
  8030. }
  8031. if err != nil {
  8032. return nil, err
  8033. }
  8034. defer googleapi.CloseBody(res)
  8035. if err := googleapi.CheckResponse(res); err != nil {
  8036. return nil, err
  8037. }
  8038. ret := &TypesListResponse{
  8039. ServerResponse: googleapi.ServerResponse{
  8040. Header: res.Header,
  8041. HTTPStatusCode: res.StatusCode,
  8042. },
  8043. }
  8044. target := &ret
  8045. if err := gensupport.DecodeResponse(target, res); err != nil {
  8046. return nil, err
  8047. }
  8048. return ret, nil
  8049. // {
  8050. // "description": "Lists all resource types for Deployment Manager.",
  8051. // "httpMethod": "GET",
  8052. // "id": "deploymentmanager.types.list",
  8053. // "parameterOrder": [
  8054. // "project"
  8055. // ],
  8056. // "parameters": {
  8057. // "filter": {
  8058. // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
  8059. // "location": "query",
  8060. // "type": "string"
  8061. // },
  8062. // "maxResults": {
  8063. // "default": "500",
  8064. // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
  8065. // "format": "uint32",
  8066. // "location": "query",
  8067. // "minimum": "0",
  8068. // "type": "integer"
  8069. // },
  8070. // "orderBy": {
  8071. // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
  8072. // "location": "query",
  8073. // "type": "string"
  8074. // },
  8075. // "pageToken": {
  8076. // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
  8077. // "location": "query",
  8078. // "type": "string"
  8079. // },
  8080. // "project": {
  8081. // "description": "The project ID for this request.",
  8082. // "location": "path",
  8083. // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
  8084. // "required": true,
  8085. // "type": "string"
  8086. // }
  8087. // },
  8088. // "path": "{project}/global/types",
  8089. // "response": {
  8090. // "$ref": "TypesListResponse"
  8091. // },
  8092. // "scopes": [
  8093. // "https://www.googleapis.com/auth/cloud-platform",
  8094. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  8095. // "https://www.googleapis.com/auth/ndev.cloudman",
  8096. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  8097. // ]
  8098. // }
  8099. }
  8100. // Pages invokes f for each page of results.
  8101. // A non-nil error returned from f will halt the iteration.
  8102. // The provided context supersedes any context provided to the Context method.
  8103. func (c *TypesListCall) Pages(ctx context.Context, f func(*TypesListResponse) error) error {
  8104. c.ctx_ = ctx
  8105. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8106. for {
  8107. x, err := c.Do()
  8108. if err != nil {
  8109. return err
  8110. }
  8111. if err := f(x); err != nil {
  8112. return err
  8113. }
  8114. if x.NextPageToken == "" {
  8115. return nil
  8116. }
  8117. c.PageToken(x.NextPageToken)
  8118. }
  8119. }