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.
 
 
 

9605 lines
357 KiB

  1. // Package deploymentmanager provides access to the Google Cloud Deployment Manager Alpha API.
  2. //
  3. // See https://cloud.google.com/deployment-manager/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/deploymentmanager/v0.alpha"
  8. // ...
  9. // deploymentmanagerService, err := deploymentmanager.New(oauthHttpClient)
  10. package deploymentmanager // import "google.golang.org/api/deploymentmanager/v0.alpha"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "deploymentmanager:alpha"
  41. const apiName = "deploymentmanager"
  42. const apiVersion = "alpha"
  43. const basePath = "https://www.googleapis.com/deploymentmanager/alpha/projects/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. // View your data across Google Cloud Platform services
  49. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  50. // View and manage your Google Cloud Platform management resources and
  51. // deployment status information
  52. NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman"
  53. // View your Google Cloud Platform management resources and deployment
  54. // status information
  55. NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  56. )
  57. func New(client *http.Client) (*Service, error) {
  58. if client == nil {
  59. return nil, errors.New("client is nil")
  60. }
  61. s := &Service{client: client, BasePath: basePath}
  62. s.CompositeTypes = NewCompositeTypesService(s)
  63. s.Deployments = NewDeploymentsService(s)
  64. s.Manifests = NewManifestsService(s)
  65. s.Operations = NewOperationsService(s)
  66. s.Resources = NewResourcesService(s)
  67. s.TypeProviders = NewTypeProvidersService(s)
  68. s.Types = NewTypesService(s)
  69. return s, nil
  70. }
  71. type Service struct {
  72. client *http.Client
  73. BasePath string // API endpoint base URL
  74. UserAgent string // optional additional User-Agent fragment
  75. CompositeTypes *CompositeTypesService
  76. Deployments *DeploymentsService
  77. Manifests *ManifestsService
  78. Operations *OperationsService
  79. Resources *ResourcesService
  80. TypeProviders *TypeProvidersService
  81. Types *TypesService
  82. }
  83. func (s *Service) userAgent() string {
  84. if s.UserAgent == "" {
  85. return googleapi.UserAgent
  86. }
  87. return googleapi.UserAgent + " " + s.UserAgent
  88. }
  89. func NewCompositeTypesService(s *Service) *CompositeTypesService {
  90. rs := &CompositeTypesService{s: s}
  91. return rs
  92. }
  93. type CompositeTypesService struct {
  94. s *Service
  95. }
  96. func NewDeploymentsService(s *Service) *DeploymentsService {
  97. rs := &DeploymentsService{s: s}
  98. return rs
  99. }
  100. type DeploymentsService struct {
  101. s *Service
  102. }
  103. func NewManifestsService(s *Service) *ManifestsService {
  104. rs := &ManifestsService{s: s}
  105. return rs
  106. }
  107. type ManifestsService struct {
  108. s *Service
  109. }
  110. func NewOperationsService(s *Service) *OperationsService {
  111. rs := &OperationsService{s: s}
  112. return rs
  113. }
  114. type OperationsService struct {
  115. s *Service
  116. }
  117. func NewResourcesService(s *Service) *ResourcesService {
  118. rs := &ResourcesService{s: s}
  119. return rs
  120. }
  121. type ResourcesService struct {
  122. s *Service
  123. }
  124. func NewTypeProvidersService(s *Service) *TypeProvidersService {
  125. rs := &TypeProvidersService{s: s}
  126. return rs
  127. }
  128. type TypeProvidersService struct {
  129. s *Service
  130. }
  131. func NewTypesService(s *Service) *TypesService {
  132. rs := &TypesService{s: s}
  133. return rs
  134. }
  135. type TypesService struct {
  136. s *Service
  137. }
  138. // AsyncOptions: Async options that determine when a resource should
  139. // finish.
  140. type AsyncOptions struct {
  141. // MethodMatch: Method regex where this policy will apply.
  142. MethodMatch string `json:"methodMatch,omitempty"`
  143. // PollingOptions: Deployment manager will poll instances for this API
  144. // resource setting a RUNNING state, and blocking until polling
  145. // conditions tell whether the resource is completed or failed.
  146. PollingOptions *PollingOptions `json:"pollingOptions,omitempty"`
  147. // ForceSendFields is a list of field names (e.g. "MethodMatch") to
  148. // unconditionally include in API requests. By default, fields with
  149. // empty values are omitted from API requests. However, any non-pointer,
  150. // non-interface field appearing in ForceSendFields will be sent to the
  151. // server regardless of whether the field is empty or not. This may be
  152. // used to include empty fields in Patch requests.
  153. ForceSendFields []string `json:"-"`
  154. // NullFields is a list of field names (e.g. "MethodMatch") to include
  155. // in API requests with the JSON null value. By default, fields with
  156. // empty values are omitted from API requests. However, any field with
  157. // an empty value appearing in NullFields will be sent to the server as
  158. // null. It is an error if a field in this list has a non-empty value.
  159. // This may be used to include null fields in Patch requests.
  160. NullFields []string `json:"-"`
  161. }
  162. func (s *AsyncOptions) MarshalJSON() ([]byte, error) {
  163. type NoMethod AsyncOptions
  164. raw := NoMethod(*s)
  165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  166. }
  167. // AuditConfig: Specifies the audit configuration for a service. The
  168. // configuration determines which permission types are logged, and what
  169. // identities, if any, are exempted from logging. An AuditConfig must
  170. // have one or more AuditLogConfigs.
  171. //
  172. // If there are AuditConfigs for both `allServices` and a specific
  173. // service, the union of the two AuditConfigs is used for that service:
  174. // the log_types specified in each AuditConfig are enabled, and the
  175. // exempted_members in each AuditLogConfig are exempted.
  176. //
  177. // Example Policy with multiple AuditConfigs:
  178. //
  179. // { "audit_configs": [ { "service": "allServices" "audit_log_configs":
  180. // [ { "log_type": "DATA_READ", "exempted_members": [
  181. // "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, {
  182. // "log_type": "ADMIN_READ", } ] }, { "service":
  183. // "fooservice.googleapis.com" "audit_log_configs": [ { "log_type":
  184. // "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [
  185. // "user:bar@gmail.com" ] } ] } ] }
  186. //
  187. // For fooservice, this policy enables DATA_READ, DATA_WRITE and
  188. // ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ
  189. // logging, and bar@gmail.com from DATA_WRITE logging.
  190. type AuditConfig struct {
  191. // AuditLogConfigs: The configuration for logging of each type of
  192. // permission.
  193. AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
  194. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  195. // Service: Specifies a service that will be enabled for audit logging.
  196. // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
  197. // `allServices` is a special value that covers all services.
  198. Service string `json:"service,omitempty"`
  199. // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  200. // unconditionally include in API requests. By default, fields with
  201. // empty values are omitted from API requests. However, any non-pointer,
  202. // non-interface field appearing in ForceSendFields will be sent to the
  203. // server regardless of whether the field is empty or not. This may be
  204. // used to include empty fields in Patch requests.
  205. ForceSendFields []string `json:"-"`
  206. // NullFields is a list of field names (e.g. "AuditLogConfigs") to
  207. // include in API requests with the JSON null value. By default, fields
  208. // with empty values are omitted from API requests. However, any field
  209. // with an empty value appearing in NullFields will be sent to the
  210. // server as null. It is an error if a field in this list has a
  211. // non-empty value. This may be used to include null fields in Patch
  212. // requests.
  213. NullFields []string `json:"-"`
  214. }
  215. func (s *AuditConfig) MarshalJSON() ([]byte, error) {
  216. type NoMethod AuditConfig
  217. raw := NoMethod(*s)
  218. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  219. }
  220. // AuditLogConfig: Provides the configuration for logging a type of
  221. // permissions. Example:
  222. //
  223. // { "audit_log_configs": [ { "log_type": "DATA_READ",
  224. // "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type":
  225. // "DATA_WRITE", } ] }
  226. //
  227. // This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
  228. // foo@gmail.com from DATA_READ logging.
  229. type AuditLogConfig struct {
  230. // ExemptedMembers: Specifies the identities that do not cause logging
  231. // for this type of permission. Follows the same format of
  232. // [Binding.members][].
  233. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  234. // LogType: The log type that this config enables.
  235. LogType string `json:"logType,omitempty"`
  236. // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  237. // unconditionally include in API requests. By default, fields with
  238. // empty values are omitted from API requests. However, any non-pointer,
  239. // non-interface field appearing in ForceSendFields will be sent to the
  240. // server regardless of whether the field is empty or not. This may be
  241. // used to include empty fields in Patch requests.
  242. ForceSendFields []string `json:"-"`
  243. // NullFields is a list of field names (e.g. "ExemptedMembers") to
  244. // include in API requests with the JSON null value. By default, fields
  245. // with empty values are omitted from API requests. However, any field
  246. // with an empty value appearing in NullFields will be sent to the
  247. // server as null. It is an error if a field in this list has a
  248. // non-empty value. This may be used to include null fields in Patch
  249. // requests.
  250. NullFields []string `json:"-"`
  251. }
  252. func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
  253. type NoMethod AuditLogConfig
  254. raw := NoMethod(*s)
  255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  256. }
  257. // AuthorizationLoggingOptions: Authorization-related information used
  258. // by Cloud Audit Logging.
  259. type AuthorizationLoggingOptions struct {
  260. // PermissionType: The type of the permission that was checked.
  261. PermissionType string `json:"permissionType,omitempty"`
  262. // ForceSendFields is a list of field names (e.g. "PermissionType") to
  263. // unconditionally include in API requests. By default, fields with
  264. // empty values are omitted from API requests. However, any non-pointer,
  265. // non-interface field appearing in ForceSendFields will be sent to the
  266. // server regardless of whether the field is empty or not. This may be
  267. // used to include empty fields in Patch requests.
  268. ForceSendFields []string `json:"-"`
  269. // NullFields is a list of field names (e.g. "PermissionType") to
  270. // include in API requests with the JSON null value. By default, fields
  271. // with empty values are omitted from API requests. However, any field
  272. // with an empty value appearing in NullFields will be sent to the
  273. // server as null. It is an error if a field in this list has a
  274. // non-empty value. This may be used to include null fields in Patch
  275. // requests.
  276. NullFields []string `json:"-"`
  277. }
  278. func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) {
  279. type NoMethod AuthorizationLoggingOptions
  280. raw := NoMethod(*s)
  281. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  282. }
  283. // BasicAuth: Basic Auth used as a credential.
  284. type BasicAuth struct {
  285. Password string `json:"password,omitempty"`
  286. User string `json:"user,omitempty"`
  287. // ForceSendFields is a list of field names (e.g. "Password") to
  288. // unconditionally include in API requests. By default, fields with
  289. // empty values are omitted from API requests. However, any non-pointer,
  290. // non-interface field appearing in ForceSendFields will be sent to the
  291. // server regardless of whether the field is empty or not. This may be
  292. // used to include empty fields in Patch requests.
  293. ForceSendFields []string `json:"-"`
  294. // NullFields is a list of field names (e.g. "Password") to include in
  295. // API requests with the JSON null value. By default, fields with empty
  296. // values are omitted from API requests. However, any field with an
  297. // empty value appearing in NullFields will be sent to the server as
  298. // null. It is an error if a field in this list has a non-empty value.
  299. // This may be used to include null fields in Patch requests.
  300. NullFields []string `json:"-"`
  301. }
  302. func (s *BasicAuth) MarshalJSON() ([]byte, error) {
  303. type NoMethod BasicAuth
  304. raw := NoMethod(*s)
  305. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  306. }
  307. // Binding: Associates `members` with a `role`.
  308. type Binding struct {
  309. // Condition: The condition that is associated with this binding. NOTE:
  310. // an unsatisfied condition will not allow user access via current
  311. // binding. Different bindings, including their conditions, are examined
  312. // independently. This field is only visible as GOOGLE_INTERNAL or
  313. // CONDITION_TRUSTED_TESTER.
  314. Condition *Expr `json:"condition,omitempty"`
  315. // Members: Specifies the identities requesting access for a Cloud
  316. // Platform resource. `members` can have the following values:
  317. //
  318. // * `allUsers`: A special identifier that represents anyone who is on
  319. // the internet; with or without a Google account.
  320. //
  321. // * `allAuthenticatedUsers`: A special identifier that represents
  322. // anyone who is authenticated with a Google account or a service
  323. // account.
  324. //
  325. // * `user:{emailid}`: An email address that represents a specific
  326. // Google account. For example, `alice@gmail.com` .
  327. //
  328. //
  329. //
  330. // * `serviceAccount:{emailid}`: An email address that represents a
  331. // service account. For example,
  332. // `my-other-app@appspot.gserviceaccount.com`.
  333. //
  334. // * `group:{emailid}`: An email address that represents a Google group.
  335. // For example, `admins@example.com`.
  336. //
  337. //
  338. //
  339. // * `domain:{domain}`: A Google Apps domain name that represents all
  340. // the users of that domain. For example, `google.com` or `example.com`.
  341. Members []string `json:"members,omitempty"`
  342. // Role: Role that is assigned to `members`. For example,
  343. // `roles/viewer`, `roles/editor`, or `roles/owner`.
  344. Role string `json:"role,omitempty"`
  345. // ForceSendFields is a list of field names (e.g. "Condition") to
  346. // unconditionally include in API requests. By default, fields with
  347. // empty values are omitted from API requests. However, any non-pointer,
  348. // non-interface field appearing in ForceSendFields will be sent to the
  349. // server regardless of whether the field is empty or not. This may be
  350. // used to include empty fields in Patch requests.
  351. ForceSendFields []string `json:"-"`
  352. // NullFields is a list of field names (e.g. "Condition") to include in
  353. // API requests with the JSON null value. By default, fields with empty
  354. // values are omitted from API requests. However, any field with an
  355. // empty value appearing in NullFields will be sent to the server as
  356. // null. It is an error if a field in this list has a non-empty value.
  357. // This may be used to include null fields in Patch requests.
  358. NullFields []string `json:"-"`
  359. }
  360. func (s *Binding) MarshalJSON() ([]byte, error) {
  361. type NoMethod Binding
  362. raw := NoMethod(*s)
  363. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  364. }
  365. // CollectionOverride: CollectionOverride allows resource handling
  366. // overrides for specific resources within a BaseType
  367. type CollectionOverride struct {
  368. // Collection: The collection that identifies this resource within its
  369. // service.
  370. Collection string `json:"collection,omitempty"`
  371. // MethodMap: Custom verb method mappings to support unordered list API
  372. // mappings.
  373. MethodMap *MethodMap `json:"methodMap,omitempty"`
  374. // Options: The options to apply to this resource-level override
  375. Options *Options `json:"options,omitempty"`
  376. // ForceSendFields is a list of field names (e.g. "Collection") to
  377. // unconditionally include in API requests. By default, fields with
  378. // empty values are omitted from API requests. However, any non-pointer,
  379. // non-interface field appearing in ForceSendFields will be sent to the
  380. // server regardless of whether the field is empty or not. This may be
  381. // used to include empty fields in Patch requests.
  382. ForceSendFields []string `json:"-"`
  383. // NullFields is a list of field names (e.g. "Collection") to include in
  384. // API requests with the JSON null value. By default, fields with empty
  385. // values are omitted from API requests. However, any field with an
  386. // empty value appearing in NullFields will be sent to the server as
  387. // null. It is an error if a field in this list has a non-empty value.
  388. // This may be used to include null fields in Patch requests.
  389. NullFields []string `json:"-"`
  390. }
  391. func (s *CollectionOverride) MarshalJSON() ([]byte, error) {
  392. type NoMethod CollectionOverride
  393. raw := NoMethod(*s)
  394. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  395. }
  396. // CompositeType: Holds the composite type.
  397. type CompositeType struct {
  398. // Description: An optional textual description of the resource;
  399. // provided by the client when the resource is created.
  400. Description string `json:"description,omitempty"`
  401. // Id: Output only. Unique identifier for the resource; defined by the
  402. // server.
  403. Id uint64 `json:"id,omitempty,string"`
  404. // InsertTime: Output only. Timestamp when the composite type was
  405. // created, in RFC3339 text format.
  406. InsertTime string `json:"insertTime,omitempty"`
  407. // Labels: Map of labels; provided by the client when the resource is
  408. // created or updated. Specifically: Label keys must be between 1 and 63
  409. // characters long and must conform to the following regular expression:
  410. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  411. // characters long and must conform to the regular expression
  412. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  413. Labels []*CompositeTypeLabelEntry `json:"labels,omitempty"`
  414. // Name: Name of the composite type, must follow the expression:
  415. // [a-z]([-a-z0-9_.]{0,61}[a-z0-9])?.
  416. Name string `json:"name,omitempty"`
  417. // Operation: Output only. The Operation that most recently ran, or is
  418. // currently running, on this composite type.
  419. Operation *Operation `json:"operation,omitempty"`
  420. // SelfLink: Output only. Self link for the type provider.
  421. SelfLink string `json:"selfLink,omitempty"`
  422. Status string `json:"status,omitempty"`
  423. // TemplateContents: Files for the template type.
  424. TemplateContents *TemplateContents `json:"templateContents,omitempty"`
  425. // ServerResponse contains the HTTP response code and headers from the
  426. // server.
  427. googleapi.ServerResponse `json:"-"`
  428. // ForceSendFields is a list of field names (e.g. "Description") to
  429. // unconditionally include in API requests. By default, fields with
  430. // empty values are omitted from API requests. However, any non-pointer,
  431. // non-interface field appearing in ForceSendFields will be sent to the
  432. // server regardless of whether the field is empty or not. This may be
  433. // used to include empty fields in Patch requests.
  434. ForceSendFields []string `json:"-"`
  435. // NullFields is a list of field names (e.g. "Description") to include
  436. // in API requests with the JSON null value. By default, fields with
  437. // empty values are omitted from API requests. However, any field with
  438. // an empty value appearing in NullFields will be sent to the server as
  439. // null. It is an error if a field in this list has a non-empty value.
  440. // This may be used to include null fields in Patch requests.
  441. NullFields []string `json:"-"`
  442. }
  443. func (s *CompositeType) MarshalJSON() ([]byte, error) {
  444. type NoMethod CompositeType
  445. raw := NoMethod(*s)
  446. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  447. }
  448. type CompositeTypeLabelEntry struct {
  449. Key string `json:"key,omitempty"`
  450. Value string `json:"value,omitempty"`
  451. // ForceSendFields is a list of field names (e.g. "Key") to
  452. // unconditionally include in API requests. By default, fields with
  453. // empty values are omitted from API requests. However, any non-pointer,
  454. // non-interface field appearing in ForceSendFields will be sent to the
  455. // server regardless of whether the field is empty or not. This may be
  456. // used to include empty fields in Patch requests.
  457. ForceSendFields []string `json:"-"`
  458. // NullFields is a list of field names (e.g. "Key") to include in API
  459. // requests with the JSON null value. By default, fields with empty
  460. // values are omitted from API requests. However, any field with an
  461. // empty value appearing in NullFields will be sent to the server as
  462. // null. It is an error if a field in this list has a non-empty value.
  463. // This may be used to include null fields in Patch requests.
  464. NullFields []string `json:"-"`
  465. }
  466. func (s *CompositeTypeLabelEntry) MarshalJSON() ([]byte, error) {
  467. type NoMethod CompositeTypeLabelEntry
  468. raw := NoMethod(*s)
  469. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  470. }
  471. // CompositeTypesListResponse: A response that returns all Composite
  472. // Types supported by Deployment Manager
  473. type CompositeTypesListResponse struct {
  474. // CompositeTypes: Output only. A list of resource composite types
  475. // supported by Deployment Manager.
  476. CompositeTypes []*CompositeType `json:"compositeTypes,omitempty"`
  477. // NextPageToken: A token used to continue a truncated list request.
  478. NextPageToken string `json:"nextPageToken,omitempty"`
  479. // ServerResponse contains the HTTP response code and headers from the
  480. // server.
  481. googleapi.ServerResponse `json:"-"`
  482. // ForceSendFields is a list of field names (e.g. "CompositeTypes") to
  483. // unconditionally include in API requests. By default, fields with
  484. // empty values are omitted from API requests. However, any non-pointer,
  485. // non-interface field appearing in ForceSendFields will be sent to the
  486. // server regardless of whether the field is empty or not. This may be
  487. // used to include empty fields in Patch requests.
  488. ForceSendFields []string `json:"-"`
  489. // NullFields is a list of field names (e.g. "CompositeTypes") to
  490. // include in API requests with the JSON null value. By default, fields
  491. // with empty values are omitted from API requests. However, any field
  492. // with an empty value appearing in NullFields will be sent to the
  493. // server as null. It is an error if a field in this list has a
  494. // non-empty value. This may be used to include null fields in Patch
  495. // requests.
  496. NullFields []string `json:"-"`
  497. }
  498. func (s *CompositeTypesListResponse) MarshalJSON() ([]byte, error) {
  499. type NoMethod CompositeTypesListResponse
  500. raw := NoMethod(*s)
  501. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  502. }
  503. // Condition: A condition to be met.
  504. type Condition struct {
  505. // Iam: Trusted attributes supplied by the IAM system.
  506. Iam string `json:"iam,omitempty"`
  507. // Op: An operator to apply the subject with.
  508. Op string `json:"op,omitempty"`
  509. // Svc: Trusted attributes discharged by the service.
  510. Svc string `json:"svc,omitempty"`
  511. // Sys: Trusted attributes supplied by any service that owns resources
  512. // and uses the IAM system for access control.
  513. Sys string `json:"sys,omitempty"`
  514. // Value: DEPRECATED. Use 'values' instead.
  515. Value string `json:"value,omitempty"`
  516. // Values: The objects of the condition. This is mutually exclusive with
  517. // 'value'.
  518. Values []string `json:"values,omitempty"`
  519. // ForceSendFields is a list of field names (e.g. "Iam") to
  520. // unconditionally include in API requests. By default, fields with
  521. // empty values are omitted from API requests. However, any non-pointer,
  522. // non-interface field appearing in ForceSendFields will be sent to the
  523. // server regardless of whether the field is empty or not. This may be
  524. // used to include empty fields in Patch requests.
  525. ForceSendFields []string `json:"-"`
  526. // NullFields is a list of field names (e.g. "Iam") to include in API
  527. // requests with the JSON null value. By default, fields with empty
  528. // values are omitted from API requests. However, any field with an
  529. // empty value appearing in NullFields will be sent to the server as
  530. // null. It is an error if a field in this list has a non-empty value.
  531. // This may be used to include null fields in Patch requests.
  532. NullFields []string `json:"-"`
  533. }
  534. func (s *Condition) MarshalJSON() ([]byte, error) {
  535. type NoMethod Condition
  536. raw := NoMethod(*s)
  537. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  538. }
  539. type ConfigFile struct {
  540. // Content: The contents of the file.
  541. Content string `json:"content,omitempty"`
  542. // ForceSendFields is a list of field names (e.g. "Content") to
  543. // unconditionally include in API requests. By default, fields with
  544. // empty values are omitted from API requests. However, any non-pointer,
  545. // non-interface field appearing in ForceSendFields will be sent to the
  546. // server regardless of whether the field is empty or not. This may be
  547. // used to include empty fields in Patch requests.
  548. ForceSendFields []string `json:"-"`
  549. // NullFields is a list of field names (e.g. "Content") to include in
  550. // API requests with the JSON null value. By default, fields with empty
  551. // values are omitted from API requests. However, any field with an
  552. // empty value appearing in NullFields will be sent to the server as
  553. // null. It is an error if a field in this list has a non-empty value.
  554. // This may be used to include null fields in Patch requests.
  555. NullFields []string `json:"-"`
  556. }
  557. func (s *ConfigFile) MarshalJSON() ([]byte, error) {
  558. type NoMethod ConfigFile
  559. raw := NoMethod(*s)
  560. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  561. }
  562. // ConfigurableService: BaseType that describes a service-backed Type.
  563. type ConfigurableService struct {
  564. // CollectionOverrides: Allows resource handling overrides for specific
  565. // collections
  566. CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"`
  567. // Credential: Credential used when interacting with this type.
  568. Credential *Credential `json:"credential,omitempty"`
  569. // DescriptorUrl: Descriptor Url for the this type.
  570. DescriptorUrl string `json:"descriptorUrl,omitempty"`
  571. // Options: Options to apply when handling any resources in this
  572. // service.
  573. Options *Options `json:"options,omitempty"`
  574. // ForceSendFields is a list of field names (e.g. "CollectionOverrides")
  575. // to unconditionally include in API requests. By default, fields with
  576. // empty values are omitted from API requests. However, any non-pointer,
  577. // non-interface field appearing in ForceSendFields will be sent to the
  578. // server regardless of whether the field is empty or not. This may be
  579. // used to include empty fields in Patch requests.
  580. ForceSendFields []string `json:"-"`
  581. // NullFields is a list of field names (e.g. "CollectionOverrides") to
  582. // include in API requests with the JSON null value. By default, fields
  583. // with empty values are omitted from API requests. However, any field
  584. // with an empty value appearing in NullFields will be sent to the
  585. // server as null. It is an error if a field in this list has a
  586. // non-empty value. This may be used to include null fields in Patch
  587. // requests.
  588. NullFields []string `json:"-"`
  589. }
  590. func (s *ConfigurableService) MarshalJSON() ([]byte, error) {
  591. type NoMethod ConfigurableService
  592. raw := NoMethod(*s)
  593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  594. }
  595. // Credential: The credential used by Deployment Manager and
  596. // TypeProvider. Only one of the options is permitted.
  597. type Credential struct {
  598. // BasicAuth: Basic Auth Credential, only used by TypeProvider.
  599. BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
  600. // ServiceAccount: Service Account Credential, only used by Deployment.
  601. ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
  602. // UseProjectDefault: Specify to use the project default credential,
  603. // only supported by Deployment.
  604. UseProjectDefault bool `json:"useProjectDefault,omitempty"`
  605. // ForceSendFields is a list of field names (e.g. "BasicAuth") to
  606. // unconditionally include in API requests. By default, fields with
  607. // empty values are omitted from API requests. However, any non-pointer,
  608. // non-interface field appearing in ForceSendFields will be sent to the
  609. // server regardless of whether the field is empty or not. This may be
  610. // used to include empty fields in Patch requests.
  611. ForceSendFields []string `json:"-"`
  612. // NullFields is a list of field names (e.g. "BasicAuth") to include in
  613. // API requests with the JSON null value. By default, fields with empty
  614. // values are omitted from API requests. However, any field with an
  615. // empty value appearing in NullFields will be sent to the server as
  616. // null. It is an error if a field in this list has a non-empty value.
  617. // This may be used to include null fields in Patch requests.
  618. NullFields []string `json:"-"`
  619. }
  620. func (s *Credential) MarshalJSON() ([]byte, error) {
  621. type NoMethod Credential
  622. raw := NoMethod(*s)
  623. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  624. }
  625. type Deployment struct {
  626. // Credential: User provided default credential for the deployment.
  627. Credential *Credential `json:"credential,omitempty"`
  628. // Description: An optional user-provided description of the deployment.
  629. Description string `json:"description,omitempty"`
  630. // Fingerprint: Provides a fingerprint to use in requests to modify a
  631. // deployment, such as update(), stop(), and cancelPreview() requests. A
  632. // fingerprint is a randomly generated value that must be provided with
  633. // update(), stop(), and cancelPreview() requests to perform optimistic
  634. // locking. This ensures optimistic concurrency so that only one request
  635. // happens at a time.
  636. //
  637. // The fingerprint is initially generated by Deployment Manager and
  638. // changes after every request to modify data. To get the latest
  639. // fingerprint value, perform a get() request to a deployment.
  640. Fingerprint string `json:"fingerprint,omitempty"`
  641. // Id: Output only. Unique identifier for the resource; defined by the
  642. // server.
  643. Id uint64 `json:"id,omitempty,string"`
  644. // InsertTime: Output only. Timestamp when the deployment was created,
  645. // in RFC3339 text format .
  646. InsertTime string `json:"insertTime,omitempty"`
  647. // Labels: Map of labels; provided by the client when the resource is
  648. // created or updated. Specifically: Label keys must be between 1 and 63
  649. // characters long and must conform to the following regular expression:
  650. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  651. // characters long and must conform to the regular expression
  652. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  653. Labels []*DeploymentLabelEntry `json:"labels,omitempty"`
  654. // Manifest: Output only. URL of the manifest representing the last
  655. // manifest that was successfully deployed.
  656. Manifest string `json:"manifest,omitempty"`
  657. // Name: Name of the resource; provided by the client when the resource
  658. // is created. The name must be 1-63 characters long, and comply with
  659. // RFC1035. Specifically, the name must be 1-63 characters long and
  660. // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
  661. // the first character must be a lowercase letter, and all following
  662. // characters must be a dash, lowercase letter, or digit, except the
  663. // last character, which cannot be a dash.
  664. Name string `json:"name,omitempty"`
  665. // Operation: Output only. The Operation that most recently ran, or is
  666. // currently running, on this deployment.
  667. Operation *Operation `json:"operation,omitempty"`
  668. // Outputs: Output only. Map of outputs from the last manifest that
  669. // deployed successfully.
  670. Outputs []*DeploymentOutputsEntry `json:"outputs,omitempty"`
  671. // SelfLink: Output only. Self link for the deployment.
  672. SelfLink string `json:"selfLink,omitempty"`
  673. // Target: [Input Only] The parameters that define your deployment,
  674. // including the deployment configuration and relevant templates.
  675. Target *TargetConfiguration `json:"target,omitempty"`
  676. // Update: Output only. If Deployment Manager is currently updating or
  677. // previewing an update to this deployment, the updated configuration
  678. // appears here.
  679. Update *DeploymentUpdate `json:"update,omitempty"`
  680. // ServerResponse contains the HTTP response code and headers from the
  681. // server.
  682. googleapi.ServerResponse `json:"-"`
  683. // ForceSendFields is a list of field names (e.g. "Credential") to
  684. // unconditionally include in API requests. By default, fields with
  685. // empty values are omitted from API requests. However, any non-pointer,
  686. // non-interface field appearing in ForceSendFields will be sent to the
  687. // server regardless of whether the field is empty or not. This may be
  688. // used to include empty fields in Patch requests.
  689. ForceSendFields []string `json:"-"`
  690. // NullFields is a list of field names (e.g. "Credential") to include in
  691. // API requests with the JSON null value. By default, fields with empty
  692. // values are omitted from API requests. However, any field with an
  693. // empty value appearing in NullFields will be sent to the server as
  694. // null. It is an error if a field in this list has a non-empty value.
  695. // This may be used to include null fields in Patch requests.
  696. NullFields []string `json:"-"`
  697. }
  698. func (s *Deployment) MarshalJSON() ([]byte, error) {
  699. type NoMethod Deployment
  700. raw := NoMethod(*s)
  701. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  702. }
  703. type DeploymentLabelEntry struct {
  704. Key string `json:"key,omitempty"`
  705. Value string `json:"value,omitempty"`
  706. // ForceSendFields is a list of field names (e.g. "Key") to
  707. // unconditionally include in API requests. By default, fields with
  708. // empty values are omitted from API requests. However, any non-pointer,
  709. // non-interface field appearing in ForceSendFields will be sent to the
  710. // server regardless of whether the field is empty or not. This may be
  711. // used to include empty fields in Patch requests.
  712. ForceSendFields []string `json:"-"`
  713. // NullFields is a list of field names (e.g. "Key") to include in API
  714. // requests with the JSON null value. By default, fields with empty
  715. // values are omitted from API requests. However, any field with an
  716. // empty value appearing in NullFields will be sent to the server as
  717. // null. It is an error if a field in this list has a non-empty value.
  718. // This may be used to include null fields in Patch requests.
  719. NullFields []string `json:"-"`
  720. }
  721. func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) {
  722. type NoMethod DeploymentLabelEntry
  723. raw := NoMethod(*s)
  724. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  725. }
  726. type DeploymentOutputsEntry struct {
  727. Key string `json:"key,omitempty"`
  728. Value string `json:"value,omitempty"`
  729. // ForceSendFields is a list of field names (e.g. "Key") to
  730. // unconditionally include in API requests. By default, fields with
  731. // empty values are omitted from API requests. However, any non-pointer,
  732. // non-interface field appearing in ForceSendFields will be sent to the
  733. // server regardless of whether the field is empty or not. This may be
  734. // used to include empty fields in Patch requests.
  735. ForceSendFields []string `json:"-"`
  736. // NullFields is a list of field names (e.g. "Key") to include in API
  737. // requests with the JSON null value. By default, fields with empty
  738. // values are omitted from API requests. However, any field with an
  739. // empty value appearing in NullFields will be sent to the server as
  740. // null. It is an error if a field in this list has a non-empty value.
  741. // This may be used to include null fields in Patch requests.
  742. NullFields []string `json:"-"`
  743. }
  744. func (s *DeploymentOutputsEntry) MarshalJSON() ([]byte, error) {
  745. type NoMethod DeploymentOutputsEntry
  746. raw := NoMethod(*s)
  747. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  748. }
  749. type DeploymentUpdate struct {
  750. // Credential: Output only. The user-provided default credential to use
  751. // when deploying this preview.
  752. Credential *Credential `json:"credential,omitempty"`
  753. // Description: Output only. An optional user-provided description of
  754. // the deployment after the current update has been applied.
  755. Description string `json:"description,omitempty"`
  756. // Labels: Output only. Map of labels; provided by the client when the
  757. // resource is created or updated. Specifically: Label keys must be
  758. // between 1 and 63 characters long and must conform to the following
  759. // regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be
  760. // between 0 and 63 characters long and must conform to the regular
  761. // expression ([a-z]([-a-z0-9]*[a-z0-9])?)?
  762. Labels []*DeploymentUpdateLabelEntry `json:"labels,omitempty"`
  763. // Manifest: Output only. URL of the manifest representing the update
  764. // configuration of this deployment.
  765. Manifest string `json:"manifest,omitempty"`
  766. // ForceSendFields is a list of field names (e.g. "Credential") to
  767. // unconditionally include in API requests. By default, fields with
  768. // empty values are omitted from API requests. However, any non-pointer,
  769. // non-interface field appearing in ForceSendFields will be sent to the
  770. // server regardless of whether the field is empty or not. This may be
  771. // used to include empty fields in Patch requests.
  772. ForceSendFields []string `json:"-"`
  773. // NullFields is a list of field names (e.g. "Credential") to include in
  774. // API requests with the JSON null value. By default, fields with empty
  775. // values are omitted from API requests. However, any field with an
  776. // empty value appearing in NullFields will be sent to the server as
  777. // null. It is an error if a field in this list has a non-empty value.
  778. // This may be used to include null fields in Patch requests.
  779. NullFields []string `json:"-"`
  780. }
  781. func (s *DeploymentUpdate) MarshalJSON() ([]byte, error) {
  782. type NoMethod DeploymentUpdate
  783. raw := NoMethod(*s)
  784. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  785. }
  786. type DeploymentUpdateLabelEntry struct {
  787. Key string `json:"key,omitempty"`
  788. Value string `json:"value,omitempty"`
  789. // ForceSendFields is a list of field names (e.g. "Key") to
  790. // unconditionally include in API requests. By default, fields with
  791. // empty values are omitted from API requests. However, any non-pointer,
  792. // non-interface field appearing in ForceSendFields will be sent to the
  793. // server regardless of whether the field is empty or not. This may be
  794. // used to include empty fields in Patch requests.
  795. ForceSendFields []string `json:"-"`
  796. // NullFields is a list of field names (e.g. "Key") to include in API
  797. // requests with the JSON null value. By default, fields with empty
  798. // values are omitted from API requests. However, any field with an
  799. // empty value appearing in NullFields will be sent to the server as
  800. // null. It is an error if a field in this list has a non-empty value.
  801. // This may be used to include null fields in Patch requests.
  802. NullFields []string `json:"-"`
  803. }
  804. func (s *DeploymentUpdateLabelEntry) MarshalJSON() ([]byte, error) {
  805. type NoMethod DeploymentUpdateLabelEntry
  806. raw := NoMethod(*s)
  807. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  808. }
  809. type DeploymentsCancelPreviewRequest struct {
  810. // Fingerprint: Specifies a fingerprint for cancelPreview() requests. A
  811. // fingerprint is a randomly generated value that must be provided in
  812. // cancelPreview() requests to perform optimistic locking. This ensures
  813. // optimistic concurrency so that the deployment does not have
  814. // conflicting requests (e.g. if someone attempts to make a new update
  815. // request while another user attempts to cancel a preview, this would
  816. // prevent one of the requests).
  817. //
  818. // The fingerprint is initially generated by Deployment Manager and
  819. // changes after every request to modify a deployment. To get the latest
  820. // fingerprint value, perform a get() request on the deployment.
  821. Fingerprint string `json:"fingerprint,omitempty"`
  822. // ForceSendFields is a list of field names (e.g. "Fingerprint") to
  823. // unconditionally include in API requests. By default, fields with
  824. // empty values are omitted from API requests. However, any non-pointer,
  825. // non-interface field appearing in ForceSendFields will be sent to the
  826. // server regardless of whether the field is empty or not. This may be
  827. // used to include empty fields in Patch requests.
  828. ForceSendFields []string `json:"-"`
  829. // NullFields is a list of field names (e.g. "Fingerprint") to include
  830. // in API requests with the JSON null value. By default, fields with
  831. // empty values are omitted from API requests. However, any field with
  832. // an empty value appearing in NullFields will be sent to the server as
  833. // null. It is an error if a field in this list has a non-empty value.
  834. // This may be used to include null fields in Patch requests.
  835. NullFields []string `json:"-"`
  836. }
  837. func (s *DeploymentsCancelPreviewRequest) MarshalJSON() ([]byte, error) {
  838. type NoMethod DeploymentsCancelPreviewRequest
  839. raw := NoMethod(*s)
  840. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  841. }
  842. // DeploymentsListResponse: A response containing a partial list of
  843. // deployments and a page token used to build the next request if the
  844. // request has been truncated.
  845. type DeploymentsListResponse struct {
  846. // Deployments: Output only. The deployments contained in this response.
  847. Deployments []*Deployment `json:"deployments,omitempty"`
  848. // NextPageToken: Output only. A token used to continue a truncated list
  849. // request.
  850. NextPageToken string `json:"nextPageToken,omitempty"`
  851. // ServerResponse contains the HTTP response code and headers from the
  852. // server.
  853. googleapi.ServerResponse `json:"-"`
  854. // ForceSendFields is a list of field names (e.g. "Deployments") to
  855. // unconditionally include in API requests. By default, fields with
  856. // empty values are omitted from API requests. However, any non-pointer,
  857. // non-interface field appearing in ForceSendFields will be sent to the
  858. // server regardless of whether the field is empty or not. This may be
  859. // used to include empty fields in Patch requests.
  860. ForceSendFields []string `json:"-"`
  861. // NullFields is a list of field names (e.g. "Deployments") to include
  862. // in API requests with the JSON null value. By default, fields with
  863. // empty values are omitted from API requests. However, any field with
  864. // an empty value appearing in NullFields will be sent to the server as
  865. // null. It is an error if a field in this list has a non-empty value.
  866. // This may be used to include null fields in Patch requests.
  867. NullFields []string `json:"-"`
  868. }
  869. func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) {
  870. type NoMethod DeploymentsListResponse
  871. raw := NoMethod(*s)
  872. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  873. }
  874. type DeploymentsStopRequest struct {
  875. // Fingerprint: Specifies a fingerprint for stop() requests. A
  876. // fingerprint is a randomly generated value that must be provided in
  877. // stop() requests to perform optimistic locking. This ensures
  878. // optimistic concurrency so that the deployment does not have
  879. // conflicting requests (e.g. if someone attempts to make a new update
  880. // request while another user attempts to stop an ongoing update
  881. // request, this would prevent a collision).
  882. //
  883. // The fingerprint is initially generated by Deployment Manager and
  884. // changes after every request to modify a deployment. To get the latest
  885. // fingerprint value, perform a get() request on the deployment.
  886. Fingerprint string `json:"fingerprint,omitempty"`
  887. // ForceSendFields is a list of field names (e.g. "Fingerprint") to
  888. // unconditionally include in API requests. By default, fields with
  889. // empty values are omitted from API requests. However, any non-pointer,
  890. // non-interface field appearing in ForceSendFields will be sent to the
  891. // server regardless of whether the field is empty or not. This may be
  892. // used to include empty fields in Patch requests.
  893. ForceSendFields []string `json:"-"`
  894. // NullFields is a list of field names (e.g. "Fingerprint") to include
  895. // in API requests with the JSON null value. By default, fields with
  896. // empty values are omitted from API requests. However, any field with
  897. // an empty value appearing in NullFields will be sent to the server as
  898. // null. It is an error if a field in this list has a non-empty value.
  899. // This may be used to include null fields in Patch requests.
  900. NullFields []string `json:"-"`
  901. }
  902. func (s *DeploymentsStopRequest) MarshalJSON() ([]byte, error) {
  903. type NoMethod DeploymentsStopRequest
  904. raw := NoMethod(*s)
  905. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  906. }
  907. type Diagnostic struct {
  908. // Field: JsonPath expression on the resource that if non empty,
  909. // indicates that this field needs to be extracted as a diagnostic.
  910. Field string `json:"field,omitempty"`
  911. // Level: Level to record this diagnostic.
  912. Level string `json:"level,omitempty"`
  913. // ForceSendFields is a list of field names (e.g. "Field") to
  914. // unconditionally include in API requests. By default, fields with
  915. // empty values are omitted from API requests. However, any non-pointer,
  916. // non-interface field appearing in ForceSendFields will be sent to the
  917. // server regardless of whether the field is empty or not. This may be
  918. // used to include empty fields in Patch requests.
  919. ForceSendFields []string `json:"-"`
  920. // NullFields is a list of field names (e.g. "Field") to include in API
  921. // requests with the JSON null value. By default, fields with empty
  922. // values are omitted from API requests. However, any field with an
  923. // empty value appearing in NullFields will be sent to the server as
  924. // null. It is an error if a field in this list has a non-empty value.
  925. // This may be used to include null fields in Patch requests.
  926. NullFields []string `json:"-"`
  927. }
  928. func (s *Diagnostic) MarshalJSON() ([]byte, error) {
  929. type NoMethod Diagnostic
  930. raw := NoMethod(*s)
  931. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  932. }
  933. // Expr: Represents an expression text. Example:
  934. //
  935. // title: "User account presence" description: "Determines whether the
  936. // request has a user account" expression: "size(request.user) > 0"
  937. type Expr struct {
  938. // Description: An optional description of the expression. This is a
  939. // longer text which describes the expression, e.g. when hovered over it
  940. // in a UI.
  941. Description string `json:"description,omitempty"`
  942. // Expression: Textual representation of an expression in Common
  943. // Expression Language syntax.
  944. //
  945. // The application context of the containing message determines which
  946. // well-known feature set of CEL is supported.
  947. Expression string `json:"expression,omitempty"`
  948. // Location: An optional string indicating the location of the
  949. // expression for error reporting, e.g. a file name and a position in
  950. // the file.
  951. Location string `json:"location,omitempty"`
  952. // Title: An optional title for the expression, i.e. a short string
  953. // describing its purpose. This can be used e.g. in UIs which allow to
  954. // enter the expression.
  955. Title string `json:"title,omitempty"`
  956. // ForceSendFields is a list of field names (e.g. "Description") to
  957. // unconditionally include in API requests. By default, fields with
  958. // empty values are omitted from API requests. However, any non-pointer,
  959. // non-interface field appearing in ForceSendFields will be sent to the
  960. // server regardless of whether the field is empty or not. This may be
  961. // used to include empty fields in Patch requests.
  962. ForceSendFields []string `json:"-"`
  963. // NullFields is a list of field names (e.g. "Description") to include
  964. // in API requests with the JSON null value. By default, fields with
  965. // empty values are omitted from API requests. However, any field with
  966. // an empty value appearing in NullFields will be sent to the server as
  967. // null. It is an error if a field in this list has a non-empty value.
  968. // This may be used to include null fields in Patch requests.
  969. NullFields []string `json:"-"`
  970. }
  971. func (s *Expr) MarshalJSON() ([]byte, error) {
  972. type NoMethod Expr
  973. raw := NoMethod(*s)
  974. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  975. }
  976. type GlobalSetPolicyRequest struct {
  977. // Bindings: Flatten Policy to create a backwacd compatible wire-format.
  978. // Deprecated. Use 'policy' to specify bindings.
  979. Bindings []*Binding `json:"bindings,omitempty"`
  980. // Etag: Flatten Policy to create a backward compatible wire-format.
  981. // Deprecated. Use 'policy' to specify the etag.
  982. Etag string `json:"etag,omitempty"`
  983. // Policy: REQUIRED: The complete policy to be applied to the
  984. // 'resource'. The size of the policy is limited to a few 10s of KB. An
  985. // empty policy is in general a valid policy but certain services (like
  986. // Projects) might reject them.
  987. Policy *Policy `json:"policy,omitempty"`
  988. // ForceSendFields is a list of field names (e.g. "Bindings") to
  989. // unconditionally include in API requests. By default, fields with
  990. // empty values are omitted from API requests. However, any non-pointer,
  991. // non-interface field appearing in ForceSendFields will be sent to the
  992. // server regardless of whether the field is empty or not. This may be
  993. // used to include empty fields in Patch requests.
  994. ForceSendFields []string `json:"-"`
  995. // NullFields is a list of field names (e.g. "Bindings") to include in
  996. // API requests with the JSON null value. By default, fields with empty
  997. // values are omitted from API requests. However, any field with an
  998. // empty value appearing in NullFields will be sent to the server as
  999. // null. It is an error if a field in this list has a non-empty value.
  1000. // This may be used to include null fields in Patch requests.
  1001. NullFields []string `json:"-"`
  1002. }
  1003. func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) {
  1004. type NoMethod GlobalSetPolicyRequest
  1005. raw := NoMethod(*s)
  1006. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1007. }
  1008. type ImportFile struct {
  1009. // Content: The contents of the file.
  1010. Content string `json:"content,omitempty"`
  1011. // Name: The name of the file.
  1012. Name string `json:"name,omitempty"`
  1013. // ForceSendFields is a list of field names (e.g. "Content") to
  1014. // unconditionally include in API requests. By default, fields with
  1015. // empty values are omitted from API requests. However, any non-pointer,
  1016. // non-interface field appearing in ForceSendFields will be sent to the
  1017. // server regardless of whether the field is empty or not. This may be
  1018. // used to include empty fields in Patch requests.
  1019. ForceSendFields []string `json:"-"`
  1020. // NullFields is a list of field names (e.g. "Content") to include in
  1021. // API requests with the JSON null value. By default, fields with empty
  1022. // values are omitted from API requests. However, any field with an
  1023. // empty value appearing in NullFields will be sent to the server as
  1024. // null. It is an error if a field in this list has a non-empty value.
  1025. // This may be used to include null fields in Patch requests.
  1026. NullFields []string `json:"-"`
  1027. }
  1028. func (s *ImportFile) MarshalJSON() ([]byte, error) {
  1029. type NoMethod ImportFile
  1030. raw := NoMethod(*s)
  1031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1032. }
  1033. // InputMapping: InputMapping creates a 'virtual' property that will be
  1034. // injected into the properties before sending the request to the
  1035. // underlying API.
  1036. type InputMapping struct {
  1037. // FieldName: The name of the field that is going to be injected.
  1038. FieldName string `json:"fieldName,omitempty"`
  1039. // Location: The location where this mapping applies.
  1040. Location string `json:"location,omitempty"`
  1041. // MethodMatch: Regex to evaluate on method to decide if input applies.
  1042. MethodMatch string `json:"methodMatch,omitempty"`
  1043. // Value: A jsonPath expression to select an element.
  1044. Value string `json:"value,omitempty"`
  1045. // ForceSendFields is a list of field names (e.g. "FieldName") to
  1046. // unconditionally include in API requests. By default, fields with
  1047. // empty values are omitted from API requests. However, any non-pointer,
  1048. // non-interface field appearing in ForceSendFields will be sent to the
  1049. // server regardless of whether the field is empty or not. This may be
  1050. // used to include empty fields in Patch requests.
  1051. ForceSendFields []string `json:"-"`
  1052. // NullFields is a list of field names (e.g. "FieldName") to include in
  1053. // API requests with the JSON null value. By default, fields with empty
  1054. // values are omitted from API requests. However, any field with an
  1055. // empty value appearing in NullFields will be sent to the server as
  1056. // null. It is an error if a field in this list has a non-empty value.
  1057. // This may be used to include null fields in Patch requests.
  1058. NullFields []string `json:"-"`
  1059. }
  1060. func (s *InputMapping) MarshalJSON() ([]byte, error) {
  1061. type NoMethod InputMapping
  1062. raw := NoMethod(*s)
  1063. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1064. }
  1065. // LogConfig: Specifies what kind of log the caller must write
  1066. type LogConfig struct {
  1067. // CloudAudit: Cloud audit options.
  1068. CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"`
  1069. // Counter: Counter options.
  1070. Counter *LogConfigCounterOptions `json:"counter,omitempty"`
  1071. // DataAccess: Data access options.
  1072. DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"`
  1073. // ForceSendFields is a list of field names (e.g. "CloudAudit") to
  1074. // unconditionally include in API requests. By default, fields with
  1075. // empty values are omitted from API requests. However, any non-pointer,
  1076. // non-interface field appearing in ForceSendFields will be sent to the
  1077. // server regardless of whether the field is empty or not. This may be
  1078. // used to include empty fields in Patch requests.
  1079. ForceSendFields []string `json:"-"`
  1080. // NullFields is a list of field names (e.g. "CloudAudit") to include in
  1081. // API requests with the JSON null value. By default, fields with empty
  1082. // values are omitted from API requests. However, any field with an
  1083. // empty value appearing in NullFields will be sent to the server as
  1084. // null. It is an error if a field in this list has a non-empty value.
  1085. // This may be used to include null fields in Patch requests.
  1086. NullFields []string `json:"-"`
  1087. }
  1088. func (s *LogConfig) MarshalJSON() ([]byte, error) {
  1089. type NoMethod LogConfig
  1090. raw := NoMethod(*s)
  1091. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1092. }
  1093. // LogConfigCloudAuditOptions: Write a Cloud Audit log
  1094. type LogConfigCloudAuditOptions struct {
  1095. // AuthorizationLoggingOptions: Information used by the Cloud Audit
  1096. // Logging pipeline.
  1097. AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"`
  1098. // LogName: The log_name to populate in the Cloud Audit Record.
  1099. LogName string `json:"logName,omitempty"`
  1100. // ForceSendFields is a list of field names (e.g.
  1101. // "AuthorizationLoggingOptions") to unconditionally include in API
  1102. // requests. By default, fields with empty values are omitted from API
  1103. // requests. However, any non-pointer, non-interface field appearing in
  1104. // ForceSendFields will be sent to the server regardless of whether the
  1105. // field is empty or not. This may be used to include empty fields in
  1106. // Patch requests.
  1107. ForceSendFields []string `json:"-"`
  1108. // NullFields is a list of field names (e.g.
  1109. // "AuthorizationLoggingOptions") to include in API requests with the
  1110. // JSON null value. By default, fields with empty values are omitted
  1111. // from API requests. However, any field with an empty value appearing
  1112. // in NullFields will be sent to the server as null. It is an error if a
  1113. // field in this list has a non-empty value. This may be used to include
  1114. // null fields in Patch requests.
  1115. NullFields []string `json:"-"`
  1116. }
  1117. func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) {
  1118. type NoMethod LogConfigCloudAuditOptions
  1119. raw := NoMethod(*s)
  1120. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1121. }
  1122. // LogConfigCounterOptions: Increment a streamz counter with the
  1123. // specified metric and field names.
  1124. //
  1125. // Metric names should start with a '/', generally be lowercase-only,
  1126. // and end in "_count". Field names should not contain an initial slash.
  1127. // The actual exported metric names will have "/iam/policy"
  1128. // prepended.
  1129. //
  1130. // Field names correspond to IAM request parameters and field values are
  1131. // their respective values.
  1132. //
  1133. // At present the only supported field names are - "iam_principal",
  1134. // corresponding to IAMContext.principal; - "" (empty string), resulting
  1135. // in one aggretated counter with no field.
  1136. //
  1137. // Examples: counter { metric: "/debug_access_count" field:
  1138. // "iam_principal" } ==> increment counter
  1139. // /iam/policy/backend_debug_access_count {iam_principal=[value of
  1140. // IAMContext.principal]}
  1141. //
  1142. // At this time we do not support: * multiple field names (though this
  1143. // may be supported in the future) * decrementing the counter *
  1144. // incrementing it by anything other than 1
  1145. type LogConfigCounterOptions struct {
  1146. // Field: The field value to attribute.
  1147. Field string `json:"field,omitempty"`
  1148. // Metric: The metric to update.
  1149. Metric string `json:"metric,omitempty"`
  1150. // ForceSendFields is a list of field names (e.g. "Field") to
  1151. // unconditionally include in API requests. By default, fields with
  1152. // empty values are omitted from API requests. However, any non-pointer,
  1153. // non-interface field appearing in ForceSendFields will be sent to the
  1154. // server regardless of whether the field is empty or not. This may be
  1155. // used to include empty fields in Patch requests.
  1156. ForceSendFields []string `json:"-"`
  1157. // NullFields is a list of field names (e.g. "Field") to include in API
  1158. // requests with the JSON null value. By default, fields with empty
  1159. // values are omitted from API requests. However, any field with an
  1160. // empty value appearing in NullFields will be sent to the server as
  1161. // null. It is an error if a field in this list has a non-empty value.
  1162. // This may be used to include null fields in Patch requests.
  1163. NullFields []string `json:"-"`
  1164. }
  1165. func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) {
  1166. type NoMethod LogConfigCounterOptions
  1167. raw := NoMethod(*s)
  1168. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1169. }
  1170. // LogConfigDataAccessOptions: Write a Data Access (Gin) log
  1171. type LogConfigDataAccessOptions struct {
  1172. // LogMode: Whether Gin logging should happen in a fail-closed manner at
  1173. // the caller. This is relevant only in the LocalIAM implementation, for
  1174. // now.
  1175. LogMode string `json:"logMode,omitempty"`
  1176. // ForceSendFields is a list of field names (e.g. "LogMode") to
  1177. // unconditionally include in API requests. By default, fields with
  1178. // empty values are omitted from API requests. However, any non-pointer,
  1179. // non-interface field appearing in ForceSendFields will be sent to the
  1180. // server regardless of whether the field is empty or not. This may be
  1181. // used to include empty fields in Patch requests.
  1182. ForceSendFields []string `json:"-"`
  1183. // NullFields is a list of field names (e.g. "LogMode") to include in
  1184. // API requests with the JSON null value. By default, fields with empty
  1185. // values are omitted from API requests. However, any field with an
  1186. // empty value appearing in NullFields will be sent to the server as
  1187. // null. It is an error if a field in this list has a non-empty value.
  1188. // This may be used to include null fields in Patch requests.
  1189. NullFields []string `json:"-"`
  1190. }
  1191. func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) {
  1192. type NoMethod LogConfigDataAccessOptions
  1193. raw := NoMethod(*s)
  1194. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1195. }
  1196. type Manifest struct {
  1197. // Config: Output only. The YAML configuration for this manifest.
  1198. Config *ConfigFile `json:"config,omitempty"`
  1199. // ExpandedConfig: Output only. The fully-expanded configuration file,
  1200. // including any templates and references.
  1201. ExpandedConfig string `json:"expandedConfig,omitempty"`
  1202. // Id: Output only. Unique identifier for the resource; defined by the
  1203. // server.
  1204. Id uint64 `json:"id,omitempty,string"`
  1205. // Imports: Output only. The imported files for this manifest.
  1206. Imports []*ImportFile `json:"imports,omitempty"`
  1207. // InsertTime: Output only. Timestamp when the manifest was created, in
  1208. // RFC3339 text format.
  1209. InsertTime string `json:"insertTime,omitempty"`
  1210. // Layout: Output only. The YAML layout for this manifest.
  1211. Layout string `json:"layout,omitempty"`
  1212. // Name: Output only.
  1213. //
  1214. // The name of the manifest.
  1215. Name string `json:"name,omitempty"`
  1216. // SelfLink: Output only. Self link for the manifest.
  1217. SelfLink string `json:"selfLink,omitempty"`
  1218. // ServerResponse contains the HTTP response code and headers from the
  1219. // server.
  1220. googleapi.ServerResponse `json:"-"`
  1221. // ForceSendFields is a list of field names (e.g. "Config") to
  1222. // unconditionally include in API requests. By default, fields with
  1223. // empty values are omitted from API requests. However, any non-pointer,
  1224. // non-interface field appearing in ForceSendFields will be sent to the
  1225. // server regardless of whether the field is empty or not. This may be
  1226. // used to include empty fields in Patch requests.
  1227. ForceSendFields []string `json:"-"`
  1228. // NullFields is a list of field names (e.g. "Config") to include in API
  1229. // requests with the JSON null value. By default, fields with empty
  1230. // values are omitted from API requests. However, any field with an
  1231. // empty value appearing in NullFields will be sent to the server as
  1232. // null. It is an error if a field in this list has a non-empty value.
  1233. // This may be used to include null fields in Patch requests.
  1234. NullFields []string `json:"-"`
  1235. }
  1236. func (s *Manifest) MarshalJSON() ([]byte, error) {
  1237. type NoMethod Manifest
  1238. raw := NoMethod(*s)
  1239. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1240. }
  1241. // ManifestsListResponse: A response containing a partial list of
  1242. // manifests and a page token used to build the next request if the
  1243. // request has been truncated.
  1244. type ManifestsListResponse struct {
  1245. // Manifests: Output only. Manifests contained in this list response.
  1246. Manifests []*Manifest `json:"manifests,omitempty"`
  1247. // NextPageToken: Output only. A token used to continue a truncated list
  1248. // request.
  1249. NextPageToken string `json:"nextPageToken,omitempty"`
  1250. // ServerResponse contains the HTTP response code and headers from the
  1251. // server.
  1252. googleapi.ServerResponse `json:"-"`
  1253. // ForceSendFields is a list of field names (e.g. "Manifests") to
  1254. // unconditionally include in API requests. By default, fields with
  1255. // empty values are omitted from API requests. However, any non-pointer,
  1256. // non-interface field appearing in ForceSendFields will be sent to the
  1257. // server regardless of whether the field is empty or not. This may be
  1258. // used to include empty fields in Patch requests.
  1259. ForceSendFields []string `json:"-"`
  1260. // NullFields is a list of field names (e.g. "Manifests") to include in
  1261. // API requests with the JSON null value. By default, fields with empty
  1262. // values are omitted from API requests. However, any field with an
  1263. // empty value appearing in NullFields will be sent to the server as
  1264. // null. It is an error if a field in this list has a non-empty value.
  1265. // This may be used to include null fields in Patch requests.
  1266. NullFields []string `json:"-"`
  1267. }
  1268. func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) {
  1269. type NoMethod ManifestsListResponse
  1270. raw := NoMethod(*s)
  1271. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1272. }
  1273. // MethodMap: Deployment Manager will call these methods during the
  1274. // events of creation/deletion/update/get/setIamPolicy
  1275. type MethodMap struct {
  1276. // Create: The action identifier for the create method to be used for
  1277. // this collection
  1278. Create string `json:"create,omitempty"`
  1279. // Delete: The action identifier for the delete method to be used for
  1280. // this collection
  1281. Delete string `json:"delete,omitempty"`
  1282. // Get: The action identifier for the get method to be used for this
  1283. // collection
  1284. Get string `json:"get,omitempty"`
  1285. // SetIamPolicy: The action identifier for the setIamPolicy method to be
  1286. // used for this collection
  1287. SetIamPolicy string `json:"setIamPolicy,omitempty"`
  1288. // Update: The action identifier for the update method to be used for
  1289. // this collection
  1290. Update string `json:"update,omitempty"`
  1291. // ForceSendFields is a list of field names (e.g. "Create") to
  1292. // unconditionally include in API requests. By default, fields with
  1293. // empty values are omitted from API requests. However, any non-pointer,
  1294. // non-interface field appearing in ForceSendFields will be sent to the
  1295. // server regardless of whether the field is empty or not. This may be
  1296. // used to include empty fields in Patch requests.
  1297. ForceSendFields []string `json:"-"`
  1298. // NullFields is a list of field names (e.g. "Create") to include in API
  1299. // requests with the JSON null value. By default, fields with empty
  1300. // values are omitted from API requests. However, any field with an
  1301. // empty value appearing in NullFields will be sent to the server as
  1302. // null. It is an error if a field in this list has a non-empty value.
  1303. // This may be used to include null fields in Patch requests.
  1304. NullFields []string `json:"-"`
  1305. }
  1306. func (s *MethodMap) MarshalJSON() ([]byte, error) {
  1307. type NoMethod MethodMap
  1308. raw := NoMethod(*s)
  1309. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1310. }
  1311. // Operation: An Operation resource, used to manage asynchronous API
  1312. // requests. (== resource_for v1.globalOperations ==) (== resource_for
  1313. // beta.globalOperations ==) (== resource_for v1.regionOperations ==)
  1314. // (== resource_for beta.regionOperations ==) (== resource_for
  1315. // v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
  1316. type Operation struct {
  1317. // ClientOperationId: [Output Only] The value of `requestId` if you
  1318. // provided it in the request. Not present otherwise.
  1319. ClientOperationId string `json:"clientOperationId,omitempty"`
  1320. // CreationTimestamp: [Deprecated] This field is deprecated.
  1321. CreationTimestamp string `json:"creationTimestamp,omitempty"`
  1322. // Description: [Output Only] A textual description of the operation,
  1323. // which is set when the operation is created.
  1324. Description string `json:"description,omitempty"`
  1325. // EndTime: [Output Only] The time that this operation was completed.
  1326. // This value is in RFC3339 text format.
  1327. EndTime string `json:"endTime,omitempty"`
  1328. // Error: [Output Only] If errors are generated during processing of the
  1329. // operation, this field will be populated.
  1330. Error *OperationError `json:"error,omitempty"`
  1331. // HttpErrorMessage: [Output Only] If the operation fails, this field
  1332. // contains the HTTP error message that was returned, such as NOT FOUND.
  1333. HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
  1334. // HttpErrorStatusCode: [Output Only] If the operation fails, this field
  1335. // contains the HTTP error status code that was returned. For example, a
  1336. // 404 means the resource was not found.
  1337. HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
  1338. // Id: [Output Only] The unique identifier for the resource. This
  1339. // identifier is defined by the server.
  1340. Id uint64 `json:"id,omitempty,string"`
  1341. // InsertTime: [Output Only] The time that this operation was requested.
  1342. // This value is in RFC3339 text format.
  1343. InsertTime string `json:"insertTime,omitempty"`
  1344. // Kind: [Output Only] Type of the resource. Always compute#operation
  1345. // for Operation resources.
  1346. Kind string `json:"kind,omitempty"`
  1347. // Name: [Output Only] Name of the resource.
  1348. Name string `json:"name,omitempty"`
  1349. // OperationType: [Output Only] The type of operation, such as insert,
  1350. // update, or delete, and so on.
  1351. OperationType string `json:"operationType,omitempty"`
  1352. // Progress: [Output Only] An optional progress indicator that ranges
  1353. // from 0 to 100. There is no requirement that this be linear or support
  1354. // any granularity of operations. This should not be used to guess when
  1355. // the operation will be complete. This number should monotonically
  1356. // increase as the operation progresses.
  1357. Progress int64 `json:"progress,omitempty"`
  1358. // Region: [Output Only] The URL of the region where the operation
  1359. // resides. Only available when performing regional operations. You must
  1360. // specify this field as part of the HTTP request URL. It is not
  1361. // settable as a field in the request body.
  1362. Region string `json:"region,omitempty"`
  1363. // SelfLink: [Output Only] Server-defined URL for the resource.
  1364. SelfLink string `json:"selfLink,omitempty"`
  1365. // StartTime: [Output Only] The time that this operation was started by
  1366. // the server. This value is in RFC3339 text format.
  1367. StartTime string `json:"startTime,omitempty"`
  1368. // Status: [Output Only] The status of the operation, which can be one
  1369. // of the following: PENDING, RUNNING, or DONE.
  1370. Status string `json:"status,omitempty"`
  1371. // StatusMessage: [Output Only] An optional textual description of the
  1372. // current status of the operation.
  1373. StatusMessage string `json:"statusMessage,omitempty"`
  1374. // TargetId: [Output Only] The unique target ID, which identifies a
  1375. // specific incarnation of the target resource.
  1376. TargetId uint64 `json:"targetId,omitempty,string"`
  1377. // TargetLink: [Output Only] The URL of the resource that the operation
  1378. // modifies. For operations related to creating a snapshot, this points
  1379. // to the persistent disk that the snapshot was created from.
  1380. TargetLink string `json:"targetLink,omitempty"`
  1381. // User: [Output Only] User who requested the operation, for example:
  1382. // user@example.com.
  1383. User string `json:"user,omitempty"`
  1384. // Warnings: [Output Only] If warning messages are generated during
  1385. // processing of the operation, this field will be populated.
  1386. Warnings []*OperationWarnings `json:"warnings,omitempty"`
  1387. // Zone: [Output Only] The URL of the zone where the operation resides.
  1388. // Only available when performing per-zone operations. You must specify
  1389. // this field as part of the HTTP request URL. It is not settable as a
  1390. // field in the request body.
  1391. Zone string `json:"zone,omitempty"`
  1392. // ServerResponse contains the HTTP response code and headers from the
  1393. // server.
  1394. googleapi.ServerResponse `json:"-"`
  1395. // ForceSendFields is a list of field names (e.g. "ClientOperationId")
  1396. // to unconditionally include in API requests. By default, fields with
  1397. // empty values are omitted from API requests. However, any non-pointer,
  1398. // non-interface field appearing in ForceSendFields will be sent to the
  1399. // server regardless of whether the field is empty or not. This may be
  1400. // used to include empty fields in Patch requests.
  1401. ForceSendFields []string `json:"-"`
  1402. // NullFields is a list of field names (e.g. "ClientOperationId") to
  1403. // include in API requests with the JSON null value. By default, fields
  1404. // with empty values are omitted from API requests. However, any field
  1405. // with an empty value appearing in NullFields will be sent to the
  1406. // server as null. It is an error if a field in this list has a
  1407. // non-empty value. This may be used to include null fields in Patch
  1408. // requests.
  1409. NullFields []string `json:"-"`
  1410. }
  1411. func (s *Operation) MarshalJSON() ([]byte, error) {
  1412. type NoMethod Operation
  1413. raw := NoMethod(*s)
  1414. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1415. }
  1416. // OperationError: [Output Only] If errors are generated during
  1417. // processing of the operation, this field will be populated.
  1418. type OperationError struct {
  1419. // Errors: [Output Only] The array of errors encountered while
  1420. // processing this operation.
  1421. Errors []*OperationErrorErrors `json:"errors,omitempty"`
  1422. // ForceSendFields is a list of field names (e.g. "Errors") to
  1423. // unconditionally include in API requests. By default, fields with
  1424. // empty values are omitted from API requests. However, any non-pointer,
  1425. // non-interface field appearing in ForceSendFields will be sent to the
  1426. // server regardless of whether the field is empty or not. This may be
  1427. // used to include empty fields in Patch requests.
  1428. ForceSendFields []string `json:"-"`
  1429. // NullFields is a list of field names (e.g. "Errors") to include in API
  1430. // requests with the JSON null value. By default, fields with empty
  1431. // values are omitted from API requests. However, any field with an
  1432. // empty value appearing in NullFields will be sent to the server as
  1433. // null. It is an error if a field in this list has a non-empty value.
  1434. // This may be used to include null fields in Patch requests.
  1435. NullFields []string `json:"-"`
  1436. }
  1437. func (s *OperationError) MarshalJSON() ([]byte, error) {
  1438. type NoMethod OperationError
  1439. raw := NoMethod(*s)
  1440. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1441. }
  1442. type OperationErrorErrors struct {
  1443. // Code: [Output Only] The error type identifier for this error.
  1444. Code string `json:"code,omitempty"`
  1445. // Location: [Output Only] Indicates the field in the request that
  1446. // caused the error. This property is optional.
  1447. Location string `json:"location,omitempty"`
  1448. // Message: [Output Only] An optional, human-readable error message.
  1449. Message string `json:"message,omitempty"`
  1450. // ForceSendFields is a list of field names (e.g. "Code") to
  1451. // unconditionally include in API requests. By default, fields with
  1452. // empty values are omitted from API requests. However, any non-pointer,
  1453. // non-interface field appearing in ForceSendFields will be sent to the
  1454. // server regardless of whether the field is empty or not. This may be
  1455. // used to include empty fields in Patch requests.
  1456. ForceSendFields []string `json:"-"`
  1457. // NullFields is a list of field names (e.g. "Code") to include in API
  1458. // requests with the JSON null value. By default, fields with empty
  1459. // values are omitted from API requests. However, any field with an
  1460. // empty value appearing in NullFields will be sent to the server as
  1461. // null. It is an error if a field in this list has a non-empty value.
  1462. // This may be used to include null fields in Patch requests.
  1463. NullFields []string `json:"-"`
  1464. }
  1465. func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
  1466. type NoMethod OperationErrorErrors
  1467. raw := NoMethod(*s)
  1468. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1469. }
  1470. type OperationWarnings struct {
  1471. // Code: [Output Only] A warning code, if applicable. For example,
  1472. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1473. // the response.
  1474. Code string `json:"code,omitempty"`
  1475. // Data: [Output Only] Metadata about this warning in key: value format.
  1476. // For example:
  1477. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1478. Data []*OperationWarningsData `json:"data,omitempty"`
  1479. // Message: [Output Only] A human-readable description of the warning
  1480. // code.
  1481. Message string `json:"message,omitempty"`
  1482. // ForceSendFields is a list of field names (e.g. "Code") to
  1483. // unconditionally include in API requests. By default, fields with
  1484. // empty values are omitted from API requests. However, any non-pointer,
  1485. // non-interface field appearing in ForceSendFields will be sent to the
  1486. // server regardless of whether the field is empty or not. This may be
  1487. // used to include empty fields in Patch requests.
  1488. ForceSendFields []string `json:"-"`
  1489. // NullFields is a list of field names (e.g. "Code") to include in API
  1490. // requests with the JSON null value. By default, fields with empty
  1491. // values are omitted from API requests. However, any field with an
  1492. // empty value appearing in NullFields will be sent to the server as
  1493. // null. It is an error if a field in this list has a non-empty value.
  1494. // This may be used to include null fields in Patch requests.
  1495. NullFields []string `json:"-"`
  1496. }
  1497. func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
  1498. type NoMethod OperationWarnings
  1499. raw := NoMethod(*s)
  1500. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1501. }
  1502. type OperationWarningsData struct {
  1503. // Key: [Output Only] A key that provides more detail on the warning
  1504. // being returned. For example, for warnings where there are no results
  1505. // in a list request for a particular zone, this key might be scope and
  1506. // the key value might be the zone name. Other examples might be a key
  1507. // indicating a deprecated resource and a suggested replacement, or a
  1508. // warning about invalid network settings (for example, if an instance
  1509. // attempts to perform IP forwarding but is not enabled for IP
  1510. // forwarding).
  1511. Key string `json:"key,omitempty"`
  1512. // Value: [Output Only] A warning data value corresponding to the key.
  1513. Value string `json:"value,omitempty"`
  1514. // ForceSendFields is a list of field names (e.g. "Key") to
  1515. // unconditionally include in API requests. By default, fields with
  1516. // empty values are omitted from API requests. However, any non-pointer,
  1517. // non-interface field appearing in ForceSendFields will be sent to the
  1518. // server regardless of whether the field is empty or not. This may be
  1519. // used to include empty fields in Patch requests.
  1520. ForceSendFields []string `json:"-"`
  1521. // NullFields is a list of field names (e.g. "Key") to include in API
  1522. // requests with the JSON null value. By default, fields with empty
  1523. // values are omitted from API requests. However, any field with an
  1524. // empty value appearing in NullFields will be sent to the server as
  1525. // null. It is an error if a field in this list has a non-empty value.
  1526. // This may be used to include null fields in Patch requests.
  1527. NullFields []string `json:"-"`
  1528. }
  1529. func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
  1530. type NoMethod OperationWarningsData
  1531. raw := NoMethod(*s)
  1532. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1533. }
  1534. // OperationsListResponse: A response containing a partial list of
  1535. // operations and a page token used to build the next request if the
  1536. // request has been truncated.
  1537. type OperationsListResponse struct {
  1538. // NextPageToken: Output only. A token used to continue a truncated list
  1539. // request.
  1540. NextPageToken string `json:"nextPageToken,omitempty"`
  1541. // Operations: Output only. Operations contained in this list response.
  1542. Operations []*Operation `json:"operations,omitempty"`
  1543. // ServerResponse contains the HTTP response code and headers from the
  1544. // server.
  1545. googleapi.ServerResponse `json:"-"`
  1546. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1547. // unconditionally include in API requests. By default, fields with
  1548. // empty values are omitted from API requests. However, any non-pointer,
  1549. // non-interface field appearing in ForceSendFields will be sent to the
  1550. // server regardless of whether the field is empty or not. This may be
  1551. // used to include empty fields in Patch requests.
  1552. ForceSendFields []string `json:"-"`
  1553. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1554. // in API requests with the JSON null value. By default, fields with
  1555. // empty values are omitted from API requests. However, any field with
  1556. // an empty value appearing in NullFields will be sent to the server as
  1557. // null. It is an error if a field in this list has a non-empty value.
  1558. // This may be used to include null fields in Patch requests.
  1559. NullFields []string `json:"-"`
  1560. }
  1561. func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
  1562. type NoMethod OperationsListResponse
  1563. raw := NoMethod(*s)
  1564. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1565. }
  1566. // Options: Options allows customized resource handling by Deployment
  1567. // Manager.
  1568. type Options struct {
  1569. // AsyncOptions: Options regarding how to thread async requests.
  1570. AsyncOptions []*AsyncOptions `json:"asyncOptions,omitempty"`
  1571. // InputMappings: The mappings that apply for requests.
  1572. InputMappings []*InputMapping `json:"inputMappings,omitempty"`
  1573. // NameProperty: The json path to the field in the resource JSON body
  1574. // into which the resource name should be mapped. Leaving this empty
  1575. // indicates that there should be no mapping performed.
  1576. NameProperty string `json:"nameProperty,omitempty"`
  1577. // ValidationOptions: Options for how to validate and process properties
  1578. // on a resource.
  1579. ValidationOptions *ValidationOptions `json:"validationOptions,omitempty"`
  1580. // ForceSendFields is a list of field names (e.g. "AsyncOptions") to
  1581. // unconditionally include in API requests. By default, fields with
  1582. // empty values are omitted from API requests. However, any non-pointer,
  1583. // non-interface field appearing in ForceSendFields will be sent to the
  1584. // server regardless of whether the field is empty or not. This may be
  1585. // used to include empty fields in Patch requests.
  1586. ForceSendFields []string `json:"-"`
  1587. // NullFields is a list of field names (e.g. "AsyncOptions") to include
  1588. // in API requests with the JSON null value. By default, fields with
  1589. // empty values are omitted from API requests. However, any field with
  1590. // an empty value appearing in NullFields will be sent to the server as
  1591. // null. It is an error if a field in this list has a non-empty value.
  1592. // This may be used to include null fields in Patch requests.
  1593. NullFields []string `json:"-"`
  1594. }
  1595. func (s *Options) MarshalJSON() ([]byte, error) {
  1596. type NoMethod Options
  1597. raw := NoMethod(*s)
  1598. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1599. }
  1600. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  1601. // used to specify access control policies for Cloud Platform
  1602. // resources.
  1603. //
  1604. //
  1605. //
  1606. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  1607. // of `members` to a `role`, where the members can be user accounts,
  1608. // Google groups, Google domains, and service accounts. A `role` is a
  1609. // named list of permissions defined by IAM.
  1610. //
  1611. // **JSON Example**
  1612. //
  1613. // { "bindings": [ { "role": "roles/owner", "members": [
  1614. // "user:mike@example.com", "group:admins@example.com",
  1615. // "domain:google.com",
  1616. // "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, {
  1617. // "role": "roles/viewer", "members": ["user:sean@example.com"] } ]
  1618. // }
  1619. //
  1620. // **YAML Example**
  1621. //
  1622. // bindings: - members: - user:mike@example.com -
  1623. // group:admins@example.com - domain:google.com -
  1624. // serviceAccount:my-other-app@appspot.gserviceaccount.com role:
  1625. // roles/owner - members: - user:sean@example.com role:
  1626. // roles/viewer
  1627. //
  1628. //
  1629. //
  1630. // For a description of IAM and its features, see the [IAM developer's
  1631. // guide](https://cloud.google.com/iam/docs).
  1632. type Policy struct {
  1633. // AuditConfigs: Specifies cloud audit logging configuration for this
  1634. // policy.
  1635. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1636. // Bindings: Associates a list of `members` to a `role`. `bindings` with
  1637. // no members will result in an error.
  1638. Bindings []*Binding `json:"bindings,omitempty"`
  1639. // Etag: `etag` is used for optimistic concurrency control as a way to
  1640. // help prevent simultaneous updates of a policy from overwriting each
  1641. // other. It is strongly suggested that systems make use of the `etag`
  1642. // in the read-modify-write cycle to perform policy updates in order to
  1643. // avoid race conditions: An `etag` is returned in the response to
  1644. // `getIamPolicy`, and systems are expected to put that etag in the
  1645. // request to `setIamPolicy` to ensure that their change will be applied
  1646. // to the same version of the policy.
  1647. //
  1648. // If no `etag` is provided in the call to `setIamPolicy`, then the
  1649. // existing policy is overwritten blindly.
  1650. Etag string `json:"etag,omitempty"`
  1651. IamOwned bool `json:"iamOwned,omitempty"`
  1652. // Rules: If more than one rule is specified, the rules are applied in
  1653. // the following manner: - All matching LOG rules are always applied. -
  1654. // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging
  1655. // will be applied if one or more matching rule requires logging. -
  1656. // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
  1657. // granted. Logging will be applied if one or more matching rule
  1658. // requires logging. - Otherwise, if no rule applies, permission is
  1659. // denied.
  1660. Rules []*Rule `json:"rules,omitempty"`
  1661. // Version: Deprecated.
  1662. Version int64 `json:"version,omitempty"`
  1663. // ServerResponse contains the HTTP response code and headers from the
  1664. // server.
  1665. googleapi.ServerResponse `json:"-"`
  1666. // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1667. // unconditionally include in API requests. By default, fields with
  1668. // empty values are omitted from API requests. However, any non-pointer,
  1669. // non-interface field appearing in ForceSendFields will be sent to the
  1670. // server regardless of whether the field is empty or not. This may be
  1671. // used to include empty fields in Patch requests.
  1672. ForceSendFields []string `json:"-"`
  1673. // NullFields is a list of field names (e.g. "AuditConfigs") to include
  1674. // in API requests with the JSON null value. By default, fields with
  1675. // empty values are omitted from API requests. However, any field with
  1676. // an empty value appearing in NullFields will be sent to the server as
  1677. // null. It is an error if a field in this list has a non-empty value.
  1678. // This may be used to include null fields in Patch requests.
  1679. NullFields []string `json:"-"`
  1680. }
  1681. func (s *Policy) MarshalJSON() ([]byte, error) {
  1682. type NoMethod Policy
  1683. raw := NoMethod(*s)
  1684. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1685. }
  1686. type PollingOptions struct {
  1687. // Diagnostics: An array of diagnostics to be collected by Deployment
  1688. // Manager, these diagnostics will be displayed to the user.
  1689. Diagnostics []*Diagnostic `json:"diagnostics,omitempty"`
  1690. // FailCondition: JsonPath expression that determines if the request
  1691. // failed.
  1692. FailCondition string `json:"failCondition,omitempty"`
  1693. // FinishCondition: JsonPath expression that determines if the request
  1694. // is completed.
  1695. FinishCondition string `json:"finishCondition,omitempty"`
  1696. // PollingLink: JsonPath expression that evaluates to string, it
  1697. // indicates where to poll.
  1698. PollingLink string `json:"pollingLink,omitempty"`
  1699. // TargetLink: JsonPath expression, after polling is completed,
  1700. // indicates where to fetch the resource.
  1701. TargetLink string `json:"targetLink,omitempty"`
  1702. // ForceSendFields is a list of field names (e.g. "Diagnostics") to
  1703. // unconditionally include in API requests. By default, fields with
  1704. // empty values are omitted from API requests. However, any non-pointer,
  1705. // non-interface field appearing in ForceSendFields will be sent to the
  1706. // server regardless of whether the field is empty or not. This may be
  1707. // used to include empty fields in Patch requests.
  1708. ForceSendFields []string `json:"-"`
  1709. // NullFields is a list of field names (e.g. "Diagnostics") to include
  1710. // in API requests with the JSON null value. By default, fields with
  1711. // empty values are omitted from API requests. However, any field with
  1712. // an empty value appearing in NullFields will be sent to the server as
  1713. // null. It is an error if a field in this list has a non-empty value.
  1714. // This may be used to include null fields in Patch requests.
  1715. NullFields []string `json:"-"`
  1716. }
  1717. func (s *PollingOptions) MarshalJSON() ([]byte, error) {
  1718. type NoMethod PollingOptions
  1719. raw := NoMethod(*s)
  1720. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1721. }
  1722. type Resource struct {
  1723. // AccessControl: The Access Control Policy set on this resource.
  1724. AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
  1725. // FinalProperties: Output only. The evaluated properties of the
  1726. // resource with references expanded. Returned as serialized YAML.
  1727. FinalProperties string `json:"finalProperties,omitempty"`
  1728. // Id: Output only. Unique identifier for the resource; defined by the
  1729. // server.
  1730. Id uint64 `json:"id,omitempty,string"`
  1731. // InsertTime: Output only. Timestamp when the resource was created or
  1732. // acquired, in RFC3339 text format .
  1733. InsertTime string `json:"insertTime,omitempty"`
  1734. // LastUsedCredential: Output only. The last used credential that
  1735. // successfully created/updated the resource.
  1736. LastUsedCredential *Credential `json:"lastUsedCredential,omitempty"`
  1737. // Manifest: Output only. URL of the manifest representing the current
  1738. // configuration of this resource.
  1739. Manifest string `json:"manifest,omitempty"`
  1740. // Name: Output only. The name of the resource as it appears in the YAML
  1741. // config.
  1742. Name string `json:"name,omitempty"`
  1743. // Properties: Output only. The current properties of the resource
  1744. // before any references have been filled in. Returned as serialized
  1745. // YAML.
  1746. Properties string `json:"properties,omitempty"`
  1747. // RuntimePolicies: Output only. In case this is an action, it will show
  1748. // the runtimePolicies on which this action will run in the deployment
  1749. RuntimePolicies []string `json:"runtimePolicies,omitempty"`
  1750. // Type: Output only. The type of the resource, for example
  1751. // compute.v1.instance, or cloudfunctions.v1beta1.function.
  1752. Type string `json:"type,omitempty"`
  1753. // Update: Output only. If Deployment Manager is currently updating or
  1754. // previewing an update to this resource, the updated configuration
  1755. // appears here.
  1756. Update *ResourceUpdate `json:"update,omitempty"`
  1757. // UpdateTime: Output only. Timestamp when the resource was updated, in
  1758. // RFC3339 text format .
  1759. UpdateTime string `json:"updateTime,omitempty"`
  1760. // Url: Output only. The URL of the actual resource.
  1761. Url string `json:"url,omitempty"`
  1762. // Warnings: Output only. If warning messages are generated during
  1763. // processing of this resource, this field will be populated.
  1764. Warnings []*ResourceWarnings `json:"warnings,omitempty"`
  1765. // ServerResponse contains the HTTP response code and headers from the
  1766. // server.
  1767. googleapi.ServerResponse `json:"-"`
  1768. // ForceSendFields is a list of field names (e.g. "AccessControl") to
  1769. // unconditionally include in API requests. By default, fields with
  1770. // empty values are omitted from API requests. However, any non-pointer,
  1771. // non-interface field appearing in ForceSendFields will be sent to the
  1772. // server regardless of whether the field is empty or not. This may be
  1773. // used to include empty fields in Patch requests.
  1774. ForceSendFields []string `json:"-"`
  1775. // NullFields is a list of field names (e.g. "AccessControl") to include
  1776. // in API requests with the JSON null value. By default, fields with
  1777. // empty values are omitted from API requests. However, any field with
  1778. // an empty value appearing in NullFields will be sent to the server as
  1779. // null. It is an error if a field in this list has a non-empty value.
  1780. // This may be used to include null fields in Patch requests.
  1781. NullFields []string `json:"-"`
  1782. }
  1783. func (s *Resource) MarshalJSON() ([]byte, error) {
  1784. type NoMethod Resource
  1785. raw := NoMethod(*s)
  1786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1787. }
  1788. type ResourceWarnings struct {
  1789. // Code: [Output Only] A warning code, if applicable. For example,
  1790. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1791. // the response.
  1792. Code string `json:"code,omitempty"`
  1793. // Data: [Output Only] Metadata about this warning in key: value format.
  1794. // For example:
  1795. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1796. Data []*ResourceWarningsData `json:"data,omitempty"`
  1797. // Message: [Output Only] A human-readable description of the warning
  1798. // code.
  1799. Message string `json:"message,omitempty"`
  1800. // ForceSendFields is a list of field names (e.g. "Code") to
  1801. // unconditionally include in API requests. By default, fields with
  1802. // empty values are omitted from API requests. However, any non-pointer,
  1803. // non-interface field appearing in ForceSendFields will be sent to the
  1804. // server regardless of whether the field is empty or not. This may be
  1805. // used to include empty fields in Patch requests.
  1806. ForceSendFields []string `json:"-"`
  1807. // NullFields is a list of field names (e.g. "Code") to include in API
  1808. // requests with the JSON null value. By default, fields with empty
  1809. // values are omitted from API requests. However, any field with an
  1810. // empty value appearing in NullFields will be sent to the server as
  1811. // null. It is an error if a field in this list has a non-empty value.
  1812. // This may be used to include null fields in Patch requests.
  1813. NullFields []string `json:"-"`
  1814. }
  1815. func (s *ResourceWarnings) MarshalJSON() ([]byte, error) {
  1816. type NoMethod ResourceWarnings
  1817. raw := NoMethod(*s)
  1818. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1819. }
  1820. type ResourceWarningsData struct {
  1821. // Key: [Output Only] A key that provides more detail on the warning
  1822. // being returned. For example, for warnings where there are no results
  1823. // in a list request for a particular zone, this key might be scope and
  1824. // the key value might be the zone name. Other examples might be a key
  1825. // indicating a deprecated resource and a suggested replacement, or a
  1826. // warning about invalid network settings (for example, if an instance
  1827. // attempts to perform IP forwarding but is not enabled for IP
  1828. // forwarding).
  1829. Key string `json:"key,omitempty"`
  1830. // Value: [Output Only] A warning data value corresponding to the key.
  1831. Value string `json:"value,omitempty"`
  1832. // ForceSendFields is a list of field names (e.g. "Key") to
  1833. // unconditionally include in API requests. By default, fields with
  1834. // empty values are omitted from API requests. However, any non-pointer,
  1835. // non-interface field appearing in ForceSendFields will be sent to the
  1836. // server regardless of whether the field is empty or not. This may be
  1837. // used to include empty fields in Patch requests.
  1838. ForceSendFields []string `json:"-"`
  1839. // NullFields is a list of field names (e.g. "Key") to include in API
  1840. // requests with the JSON null value. By default, fields with empty
  1841. // values are omitted from API requests. However, any field with an
  1842. // empty value appearing in NullFields will be sent to the server as
  1843. // null. It is an error if a field in this list has a non-empty value.
  1844. // This may be used to include null fields in Patch requests.
  1845. NullFields []string `json:"-"`
  1846. }
  1847. func (s *ResourceWarningsData) MarshalJSON() ([]byte, error) {
  1848. type NoMethod ResourceWarningsData
  1849. raw := NoMethod(*s)
  1850. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1851. }
  1852. // ResourceAccessControl: The access controls set on the resource.
  1853. type ResourceAccessControl struct {
  1854. // GcpIamPolicy: The GCP IAM Policy to set on the resource.
  1855. GcpIamPolicy string `json:"gcpIamPolicy,omitempty"`
  1856. // ForceSendFields is a list of field names (e.g. "GcpIamPolicy") to
  1857. // unconditionally include in API requests. By default, fields with
  1858. // empty values are omitted from API requests. However, any non-pointer,
  1859. // non-interface field appearing in ForceSendFields will be sent to the
  1860. // server regardless of whether the field is empty or not. This may be
  1861. // used to include empty fields in Patch requests.
  1862. ForceSendFields []string `json:"-"`
  1863. // NullFields is a list of field names (e.g. "GcpIamPolicy") to include
  1864. // in API requests with the JSON null value. By default, fields with
  1865. // empty values are omitted from API requests. However, any field with
  1866. // an empty value appearing in NullFields will be sent to the server as
  1867. // null. It is an error if a field in this list has a non-empty value.
  1868. // This may be used to include null fields in Patch requests.
  1869. NullFields []string `json:"-"`
  1870. }
  1871. func (s *ResourceAccessControl) MarshalJSON() ([]byte, error) {
  1872. type NoMethod ResourceAccessControl
  1873. raw := NoMethod(*s)
  1874. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1875. }
  1876. type ResourceUpdate struct {
  1877. // AccessControl: The Access Control Policy to set on this resource
  1878. // after updating the resource itself.
  1879. AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
  1880. // Credential: Output only. The credential that will be used
  1881. // creating/updating this resource.
  1882. Credential *Credential `json:"credential,omitempty"`
  1883. // Error: Output only. If errors are generated during update of the
  1884. // resource, this field will be populated.
  1885. Error *ResourceUpdateError `json:"error,omitempty"`
  1886. // FinalProperties: Output only. The expanded properties of the resource
  1887. // with reference values expanded. Returned as serialized YAML.
  1888. FinalProperties string `json:"finalProperties,omitempty"`
  1889. // Intent: Output only. The intent of the resource: PREVIEW, UPDATE, or
  1890. // CANCEL.
  1891. Intent string `json:"intent,omitempty"`
  1892. // Manifest: Output only. URL of the manifest representing the update
  1893. // configuration of this resource.
  1894. Manifest string `json:"manifest,omitempty"`
  1895. // Properties: Output only. The set of updated properties for this
  1896. // resource, before references are expanded. Returned as serialized
  1897. // YAML.
  1898. Properties string `json:"properties,omitempty"`
  1899. // RuntimePolicies: Output only. In case this is an action, it will show
  1900. // the runtimePolicies that this action will have after updating the
  1901. // deployment.
  1902. RuntimePolicies []string `json:"runtimePolicies,omitempty"`
  1903. // State: Output only. The state of the resource.
  1904. State string `json:"state,omitempty"`
  1905. // Warnings: Output only. If warning messages are generated during
  1906. // processing of this resource, this field will be populated.
  1907. Warnings []*ResourceUpdateWarnings `json:"warnings,omitempty"`
  1908. // ForceSendFields is a list of field names (e.g. "AccessControl") to
  1909. // unconditionally include in API requests. By default, fields with
  1910. // empty values are omitted from API requests. However, any non-pointer,
  1911. // non-interface field appearing in ForceSendFields will be sent to the
  1912. // server regardless of whether the field is empty or not. This may be
  1913. // used to include empty fields in Patch requests.
  1914. ForceSendFields []string `json:"-"`
  1915. // NullFields is a list of field names (e.g. "AccessControl") to include
  1916. // in API requests with the JSON null value. By default, fields with
  1917. // empty values are omitted from API requests. However, any field with
  1918. // an empty value appearing in NullFields will be sent to the server as
  1919. // null. It is an error if a field in this list has a non-empty value.
  1920. // This may be used to include null fields in Patch requests.
  1921. NullFields []string `json:"-"`
  1922. }
  1923. func (s *ResourceUpdate) MarshalJSON() ([]byte, error) {
  1924. type NoMethod ResourceUpdate
  1925. raw := NoMethod(*s)
  1926. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1927. }
  1928. // ResourceUpdateError: Output only. If errors are generated during
  1929. // update of the resource, this field will be populated.
  1930. type ResourceUpdateError struct {
  1931. // Errors: [Output Only] The array of errors encountered while
  1932. // processing this operation.
  1933. Errors []*ResourceUpdateErrorErrors `json:"errors,omitempty"`
  1934. // ForceSendFields is a list of field names (e.g. "Errors") to
  1935. // unconditionally include in API requests. By default, fields with
  1936. // empty values are omitted from API requests. However, any non-pointer,
  1937. // non-interface field appearing in ForceSendFields will be sent to the
  1938. // server regardless of whether the field is empty or not. This may be
  1939. // used to include empty fields in Patch requests.
  1940. ForceSendFields []string `json:"-"`
  1941. // NullFields is a list of field names (e.g. "Errors") to include in API
  1942. // requests with the JSON null value. By default, fields with empty
  1943. // values are omitted from API requests. However, any field with an
  1944. // empty value appearing in NullFields will be sent to the server as
  1945. // null. It is an error if a field in this list has a non-empty value.
  1946. // This may be used to include null fields in Patch requests.
  1947. NullFields []string `json:"-"`
  1948. }
  1949. func (s *ResourceUpdateError) MarshalJSON() ([]byte, error) {
  1950. type NoMethod ResourceUpdateError
  1951. raw := NoMethod(*s)
  1952. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1953. }
  1954. type ResourceUpdateErrorErrors struct {
  1955. // Code: [Output Only] The error type identifier for this error.
  1956. Code string `json:"code,omitempty"`
  1957. // Location: [Output Only] Indicates the field in the request that
  1958. // caused the error. This property is optional.
  1959. Location string `json:"location,omitempty"`
  1960. // Message: [Output Only] An optional, human-readable error message.
  1961. Message string `json:"message,omitempty"`
  1962. // ForceSendFields is a list of field names (e.g. "Code") to
  1963. // unconditionally include in API requests. By default, fields with
  1964. // empty values are omitted from API requests. However, any non-pointer,
  1965. // non-interface field appearing in ForceSendFields will be sent to the
  1966. // server regardless of whether the field is empty or not. This may be
  1967. // used to include empty fields in Patch requests.
  1968. ForceSendFields []string `json:"-"`
  1969. // NullFields is a list of field names (e.g. "Code") to include in API
  1970. // requests with the JSON null value. By default, fields with empty
  1971. // values are omitted from API requests. However, any field with an
  1972. // empty value appearing in NullFields will be sent to the server as
  1973. // null. It is an error if a field in this list has a non-empty value.
  1974. // This may be used to include null fields in Patch requests.
  1975. NullFields []string `json:"-"`
  1976. }
  1977. func (s *ResourceUpdateErrorErrors) MarshalJSON() ([]byte, error) {
  1978. type NoMethod ResourceUpdateErrorErrors
  1979. raw := NoMethod(*s)
  1980. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1981. }
  1982. type ResourceUpdateWarnings struct {
  1983. // Code: [Output Only] A warning code, if applicable. For example,
  1984. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1985. // the response.
  1986. Code string `json:"code,omitempty"`
  1987. // Data: [Output Only] Metadata about this warning in key: value format.
  1988. // For example:
  1989. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1990. Data []*ResourceUpdateWarningsData `json:"data,omitempty"`
  1991. // Message: [Output Only] A human-readable description of the warning
  1992. // code.
  1993. Message string `json:"message,omitempty"`
  1994. // ForceSendFields is a list of field names (e.g. "Code") to
  1995. // unconditionally include in API requests. By default, fields with
  1996. // empty values are omitted from API requests. However, any non-pointer,
  1997. // non-interface field appearing in ForceSendFields will be sent to the
  1998. // server regardless of whether the field is empty or not. This may be
  1999. // used to include empty fields in Patch requests.
  2000. ForceSendFields []string `json:"-"`
  2001. // NullFields is a list of field names (e.g. "Code") to include in API
  2002. // requests with the JSON null value. By default, fields with empty
  2003. // values are omitted from API requests. However, any field with an
  2004. // empty value appearing in NullFields will be sent to the server as
  2005. // null. It is an error if a field in this list has a non-empty value.
  2006. // This may be used to include null fields in Patch requests.
  2007. NullFields []string `json:"-"`
  2008. }
  2009. func (s *ResourceUpdateWarnings) MarshalJSON() ([]byte, error) {
  2010. type NoMethod ResourceUpdateWarnings
  2011. raw := NoMethod(*s)
  2012. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2013. }
  2014. type ResourceUpdateWarningsData struct {
  2015. // Key: [Output Only] A key that provides more detail on the warning
  2016. // being returned. For example, for warnings where there are no results
  2017. // in a list request for a particular zone, this key might be scope and
  2018. // the key value might be the zone name. Other examples might be a key
  2019. // indicating a deprecated resource and a suggested replacement, or a
  2020. // warning about invalid network settings (for example, if an instance
  2021. // attempts to perform IP forwarding but is not enabled for IP
  2022. // forwarding).
  2023. Key string `json:"key,omitempty"`
  2024. // Value: [Output Only] A warning data value corresponding to the key.
  2025. Value string `json:"value,omitempty"`
  2026. // ForceSendFields is a list of field names (e.g. "Key") to
  2027. // unconditionally include in API requests. By default, fields with
  2028. // empty values are omitted from API requests. However, any non-pointer,
  2029. // non-interface field appearing in ForceSendFields will be sent to the
  2030. // server regardless of whether the field is empty or not. This may be
  2031. // used to include empty fields in Patch requests.
  2032. ForceSendFields []string `json:"-"`
  2033. // NullFields is a list of field names (e.g. "Key") to include in API
  2034. // requests with the JSON null value. By default, fields with empty
  2035. // values are omitted from API requests. However, any field with an
  2036. // empty value appearing in NullFields will be sent to the server as
  2037. // null. It is an error if a field in this list has a non-empty value.
  2038. // This may be used to include null fields in Patch requests.
  2039. NullFields []string `json:"-"`
  2040. }
  2041. func (s *ResourceUpdateWarningsData) MarshalJSON() ([]byte, error) {
  2042. type NoMethod ResourceUpdateWarningsData
  2043. raw := NoMethod(*s)
  2044. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2045. }
  2046. // ResourcesListResponse: A response containing a partial list of
  2047. // resources and a page token used to build the next request if the
  2048. // request has been truncated.
  2049. type ResourcesListResponse struct {
  2050. // NextPageToken: A token used to continue a truncated list request.
  2051. NextPageToken string `json:"nextPageToken,omitempty"`
  2052. // Resources: Resources contained in this list response.
  2053. Resources []*Resource `json:"resources,omitempty"`
  2054. // ServerResponse contains the HTTP response code and headers from the
  2055. // server.
  2056. googleapi.ServerResponse `json:"-"`
  2057. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2058. // unconditionally include in API requests. By default, fields with
  2059. // empty values are omitted from API requests. However, any non-pointer,
  2060. // non-interface field appearing in ForceSendFields will be sent to the
  2061. // server regardless of whether the field is empty or not. This may be
  2062. // used to include empty fields in Patch requests.
  2063. ForceSendFields []string `json:"-"`
  2064. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2065. // in API requests with the JSON null value. By default, fields with
  2066. // empty values are omitted from API requests. However, any field with
  2067. // an empty value appearing in NullFields will be sent to the server as
  2068. // null. It is an error if a field in this list has a non-empty value.
  2069. // This may be used to include null fields in Patch requests.
  2070. NullFields []string `json:"-"`
  2071. }
  2072. func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) {
  2073. type NoMethod ResourcesListResponse
  2074. raw := NoMethod(*s)
  2075. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2076. }
  2077. // Rule: A rule to be applied in a Policy.
  2078. type Rule struct {
  2079. // Action: Required
  2080. Action string `json:"action,omitempty"`
  2081. // Conditions: Additional restrictions that must be met. All conditions
  2082. // must pass for the rule to match.
  2083. Conditions []*Condition `json:"conditions,omitempty"`
  2084. // Description: Human-readable description of the rule.
  2085. Description string `json:"description,omitempty"`
  2086. // Ins: If one or more 'in' clauses are specified, the rule matches if
  2087. // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
  2088. Ins []string `json:"ins,omitempty"`
  2089. // LogConfigs: The config returned to callers of
  2090. // tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
  2091. LogConfigs []*LogConfig `json:"logConfigs,omitempty"`
  2092. // NotIns: If one or more 'not_in' clauses are specified, the rule
  2093. // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the
  2094. // entries.
  2095. NotIns []string `json:"notIns,omitempty"`
  2096. // Permissions: A permission is a string of form '..' (e.g.,
  2097. // 'storage.buckets.list'). A value of '*' matches all permissions, and
  2098. // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
  2099. Permissions []string `json:"permissions,omitempty"`
  2100. // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") 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 *Rule) MarshalJSON() ([]byte, error) {
  2116. type NoMethod Rule
  2117. raw := NoMethod(*s)
  2118. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2119. }
  2120. // ServiceAccount: Service Account used as a credential.
  2121. type ServiceAccount struct {
  2122. // Email: The IAM service account email address like
  2123. // test@myproject.iam.gserviceaccount.com
  2124. Email string `json:"email,omitempty"`
  2125. // ForceSendFields is a list of field names (e.g. "Email") to
  2126. // unconditionally include in API requests. By default, fields with
  2127. // empty values are omitted from API requests. However, any non-pointer,
  2128. // non-interface field appearing in ForceSendFields will be sent to the
  2129. // server regardless of whether the field is empty or not. This may be
  2130. // used to include empty fields in Patch requests.
  2131. ForceSendFields []string `json:"-"`
  2132. // NullFields is a list of field names (e.g. "Email") to include in API
  2133. // requests with the JSON null value. By default, fields with empty
  2134. // values are omitted from API requests. However, any field with an
  2135. // empty value appearing in NullFields will be sent to the server as
  2136. // null. It is an error if a field in this list has a non-empty value.
  2137. // This may be used to include null fields in Patch requests.
  2138. NullFields []string `json:"-"`
  2139. }
  2140. func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  2141. type NoMethod ServiceAccount
  2142. raw := NoMethod(*s)
  2143. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2144. }
  2145. type TargetConfiguration struct {
  2146. // Config: The configuration to use for this deployment.
  2147. Config *ConfigFile `json:"config,omitempty"`
  2148. // Imports: Specifies any files to import for this configuration. This
  2149. // can be used to import templates or other files. For example, you
  2150. // might import a text file in order to use the file in a template.
  2151. Imports []*ImportFile `json:"imports,omitempty"`
  2152. // ForceSendFields is a list of field names (e.g. "Config") to
  2153. // unconditionally include in API requests. By default, fields with
  2154. // empty values are omitted from API requests. However, any non-pointer,
  2155. // non-interface field appearing in ForceSendFields will be sent to the
  2156. // server regardless of whether the field is empty or not. This may be
  2157. // used to include empty fields in Patch requests.
  2158. ForceSendFields []string `json:"-"`
  2159. // NullFields is a list of field names (e.g. "Config") to include in API
  2160. // requests with the JSON null value. By default, fields with empty
  2161. // values are omitted from API requests. However, any field with an
  2162. // empty value appearing in NullFields will be sent to the server as
  2163. // null. It is an error if a field in this list has a non-empty value.
  2164. // This may be used to include null fields in Patch requests.
  2165. NullFields []string `json:"-"`
  2166. }
  2167. func (s *TargetConfiguration) MarshalJSON() ([]byte, error) {
  2168. type NoMethod TargetConfiguration
  2169. raw := NoMethod(*s)
  2170. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2171. }
  2172. // TemplateContents: Files that make up the template contents of a
  2173. // template type.
  2174. type TemplateContents struct {
  2175. // Imports: Import files referenced by the main template.
  2176. Imports []*ImportFile `json:"imports,omitempty"`
  2177. // Interpreter: Which interpreter (python or jinja) should be used
  2178. // during expansion.
  2179. Interpreter string `json:"interpreter,omitempty"`
  2180. // MainTemplate: The filename of the mainTemplate
  2181. MainTemplate string `json:"mainTemplate,omitempty"`
  2182. // Schema: The contents of the template schema.
  2183. Schema string `json:"schema,omitempty"`
  2184. // Template: The contents of the main template file.
  2185. Template string `json:"template,omitempty"`
  2186. // ForceSendFields is a list of field names (e.g. "Imports") 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. "Imports") to include in
  2194. // API requests with the JSON null value. By default, fields with empty
  2195. // values are omitted from API requests. However, any field with an
  2196. // 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 *TemplateContents) MarshalJSON() ([]byte, error) {
  2202. type NoMethod TemplateContents
  2203. raw := NoMethod(*s)
  2204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2205. }
  2206. type TestPermissionsRequest struct {
  2207. // Permissions: The set of permissions to check for the 'resource'.
  2208. // Permissions with wildcards (such as '*' or 'storage.*') are not
  2209. // allowed.
  2210. Permissions []string `json:"permissions,omitempty"`
  2211. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2212. // unconditionally include in API requests. By default, fields with
  2213. // empty values are omitted from API requests. However, any non-pointer,
  2214. // non-interface field appearing in ForceSendFields will be sent to the
  2215. // server regardless of whether the field is empty or not. This may be
  2216. // used to include empty fields in Patch requests.
  2217. ForceSendFields []string `json:"-"`
  2218. // NullFields is a list of field names (e.g. "Permissions") to include
  2219. // in API requests with the JSON null value. By default, fields with
  2220. // empty values are omitted from API requests. However, any field with
  2221. // an empty value appearing in NullFields will be sent to the server as
  2222. // null. It is an error if a field in this list has a non-empty value.
  2223. // This may be used to include null fields in Patch requests.
  2224. NullFields []string `json:"-"`
  2225. }
  2226. func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) {
  2227. type NoMethod TestPermissionsRequest
  2228. raw := NoMethod(*s)
  2229. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2230. }
  2231. type TestPermissionsResponse struct {
  2232. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  2233. // the caller is allowed.
  2234. Permissions []string `json:"permissions,omitempty"`
  2235. // ServerResponse contains the HTTP response code and headers from the
  2236. // server.
  2237. googleapi.ServerResponse `json:"-"`
  2238. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2239. // unconditionally include in API requests. By default, fields with
  2240. // empty values are omitted from API requests. However, any non-pointer,
  2241. // non-interface field appearing in ForceSendFields will be sent to the
  2242. // server regardless of whether the field is empty or not. This may be
  2243. // used to include empty fields in Patch requests.
  2244. ForceSendFields []string `json:"-"`
  2245. // NullFields is a list of field names (e.g. "Permissions") to include
  2246. // in API requests with the JSON null value. By default, fields with
  2247. // empty values are omitted from API requests. However, any field with
  2248. // an empty value appearing in NullFields will be sent to the server as
  2249. // null. It is an error if a field in this list has a non-empty value.
  2250. // This may be used to include null fields in Patch requests.
  2251. NullFields []string `json:"-"`
  2252. }
  2253. func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) {
  2254. type NoMethod TestPermissionsResponse
  2255. raw := NoMethod(*s)
  2256. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2257. }
  2258. // Type: A resource type supported by Deployment Manager.
  2259. type Type struct {
  2260. // ConfigurableService: Base Type (configurable service) that backs this
  2261. // Type.
  2262. ConfigurableService *ConfigurableService `json:"configurableService,omitempty"`
  2263. // Description: An optional textual description of the resource;
  2264. // provided by the client when the resource is created.
  2265. Description string `json:"description,omitempty"`
  2266. // Id: Output only. Unique identifier for the resource; defined by the
  2267. // server.
  2268. Id uint64 `json:"id,omitempty,string"`
  2269. // InsertTime: Output only. Timestamp when the type was created, in
  2270. // RFC3339 text format.
  2271. InsertTime string `json:"insertTime,omitempty"`
  2272. // Labels: Map of labels; provided by the client when the resource is
  2273. // created or updated. Specifically: Label keys must be between 1 and 63
  2274. // characters long and must conform to the following regular expression:
  2275. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  2276. // characters long and must conform to the regular expression
  2277. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  2278. Labels []*TypeLabelEntry `json:"labels,omitempty"`
  2279. // Name: Name of the type.
  2280. Name string `json:"name,omitempty"`
  2281. // Operation: Output only. The Operation that most recently ran, or is
  2282. // currently running, on this type.
  2283. Operation *Operation `json:"operation,omitempty"`
  2284. // SelfLink: Output only. Self link for the type.
  2285. SelfLink string `json:"selfLink,omitempty"`
  2286. // ServerResponse contains the HTTP response code and headers from the
  2287. // server.
  2288. googleapi.ServerResponse `json:"-"`
  2289. // ForceSendFields is a list of field names (e.g. "ConfigurableService")
  2290. // to unconditionally include in API requests. By default, fields with
  2291. // empty values are omitted from API requests. However, any non-pointer,
  2292. // non-interface field appearing in ForceSendFields will be sent to the
  2293. // server regardless of whether the field is empty or not. This may be
  2294. // used to include empty fields in Patch requests.
  2295. ForceSendFields []string `json:"-"`
  2296. // NullFields is a list of field names (e.g. "ConfigurableService") to
  2297. // include in API requests with the JSON null value. By default, fields
  2298. // with empty values are omitted from API requests. However, any field
  2299. // with an empty value appearing in NullFields will be sent to the
  2300. // server as null. It is an error if a field in this list has a
  2301. // non-empty value. This may be used to include null fields in Patch
  2302. // requests.
  2303. NullFields []string `json:"-"`
  2304. }
  2305. func (s *Type) MarshalJSON() ([]byte, error) {
  2306. type NoMethod Type
  2307. raw := NoMethod(*s)
  2308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2309. }
  2310. // TypeInfo: Contains detailed information about a composite type, base
  2311. // type, or base type with specific collection.
  2312. type TypeInfo struct {
  2313. // Description: The description of the type.
  2314. Description string `json:"description,omitempty"`
  2315. // DocumentationLink: For swagger 2.0 externalDocs field will be used.
  2316. // For swagger 1.2 this field will be empty.
  2317. DocumentationLink string `json:"documentationLink,omitempty"`
  2318. // Kind: Output only. Type of the output. Always
  2319. // deploymentManager#TypeInfo for TypeInfo.
  2320. Kind string `json:"kind,omitempty"`
  2321. // Name: The base type or composite type name.
  2322. Name string `json:"name,omitempty"`
  2323. // Schema: For base types with a collection, we return a schema and
  2324. // documentation link For template types, we return only a schema
  2325. Schema *TypeInfoSchemaInfo `json:"schema,omitempty"`
  2326. // SelfLink: Output only. Server-defined URL for the resource.
  2327. SelfLink string `json:"selfLink,omitempty"`
  2328. // Title: The title on the API descriptor URL provided.
  2329. Title string `json:"title,omitempty"`
  2330. // ServerResponse contains the HTTP response code and headers from the
  2331. // server.
  2332. googleapi.ServerResponse `json:"-"`
  2333. // ForceSendFields is a list of field names (e.g. "Description") to
  2334. // unconditionally include in API requests. By default, fields with
  2335. // empty values are omitted from API requests. However, any non-pointer,
  2336. // non-interface field appearing in ForceSendFields will be sent to the
  2337. // server regardless of whether the field is empty or not. This may be
  2338. // used to include empty fields in Patch requests.
  2339. ForceSendFields []string `json:"-"`
  2340. // NullFields is a list of field names (e.g. "Description") to include
  2341. // in API requests with the JSON null value. By default, fields with
  2342. // empty values are omitted from API requests. However, any field with
  2343. // an empty value appearing in NullFields will be sent to the server as
  2344. // null. It is an error if a field in this list has a non-empty value.
  2345. // This may be used to include null fields in Patch requests.
  2346. NullFields []string `json:"-"`
  2347. }
  2348. func (s *TypeInfo) MarshalJSON() ([]byte, error) {
  2349. type NoMethod TypeInfo
  2350. raw := NoMethod(*s)
  2351. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2352. }
  2353. type TypeInfoSchemaInfo struct {
  2354. // Input: The properties that this composite type or base type
  2355. // collection accept as input, represented as a json blob, format is:
  2356. // JSON Schema Draft V4
  2357. Input string `json:"input,omitempty"`
  2358. // Output: The properties that this composite type or base type
  2359. // collection exposes as output, these properties can be used for
  2360. // references, represented as json blob, format is: JSON Schema Draft V4
  2361. Output string `json:"output,omitempty"`
  2362. // ForceSendFields is a list of field names (e.g. "Input") to
  2363. // unconditionally include in API requests. By default, fields with
  2364. // empty values are omitted from API requests. However, any non-pointer,
  2365. // non-interface field appearing in ForceSendFields will be sent to the
  2366. // server regardless of whether the field is empty or not. This may be
  2367. // used to include empty fields in Patch requests.
  2368. ForceSendFields []string `json:"-"`
  2369. // NullFields is a list of field names (e.g. "Input") to include in API
  2370. // requests with the JSON null value. By default, fields with empty
  2371. // values are omitted from API requests. However, any field with an
  2372. // empty value appearing in NullFields will be sent to the server as
  2373. // null. It is an error if a field in this list has a non-empty value.
  2374. // This may be used to include null fields in Patch requests.
  2375. NullFields []string `json:"-"`
  2376. }
  2377. func (s *TypeInfoSchemaInfo) MarshalJSON() ([]byte, error) {
  2378. type NoMethod TypeInfoSchemaInfo
  2379. raw := NoMethod(*s)
  2380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2381. }
  2382. type TypeLabelEntry struct {
  2383. Key string `json:"key,omitempty"`
  2384. Value string `json:"value,omitempty"`
  2385. // ForceSendFields is a list of field names (e.g. "Key") to
  2386. // unconditionally include in API requests. By default, fields with
  2387. // empty values are omitted from API requests. However, any non-pointer,
  2388. // non-interface field appearing in ForceSendFields will be sent to the
  2389. // server regardless of whether the field is empty or not. This may be
  2390. // used to include empty fields in Patch requests.
  2391. ForceSendFields []string `json:"-"`
  2392. // NullFields is a list of field names (e.g. "Key") to include in API
  2393. // requests with the JSON null value. By default, fields with empty
  2394. // values are omitted from API requests. However, any field with an
  2395. // empty value appearing in NullFields will be sent to the server as
  2396. // null. It is an error if a field in this list has a non-empty value.
  2397. // This may be used to include null fields in Patch requests.
  2398. NullFields []string `json:"-"`
  2399. }
  2400. func (s *TypeLabelEntry) MarshalJSON() ([]byte, error) {
  2401. type NoMethod TypeLabelEntry
  2402. raw := NoMethod(*s)
  2403. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2404. }
  2405. // TypeProvider: A type provider that describes a service-backed Type.
  2406. type TypeProvider struct {
  2407. // CollectionOverrides: Allows resource handling overrides for specific
  2408. // collections
  2409. CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"`
  2410. // Credential: Credential used when interacting with this type.
  2411. Credential *Credential `json:"credential,omitempty"`
  2412. // Description: An optional textual description of the resource;
  2413. // provided by the client when the resource is created.
  2414. Description string `json:"description,omitempty"`
  2415. // DescriptorUrl: Descriptor Url for the this type provider.
  2416. DescriptorUrl string `json:"descriptorUrl,omitempty"`
  2417. // Id: Output only. Unique identifier for the resource; defined by the
  2418. // server.
  2419. Id uint64 `json:"id,omitempty,string"`
  2420. // InsertTime: Output only. Timestamp when the type provider was
  2421. // created, in RFC3339 text format.
  2422. InsertTime string `json:"insertTime,omitempty"`
  2423. // Labels: Map of labels; provided by the client when the resource is
  2424. // created or updated. Specifically: Label keys must be between 1 and 63
  2425. // characters long and must conform to the following regular expression:
  2426. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  2427. // characters long and must conform to the regular expression
  2428. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  2429. Labels []*TypeProviderLabelEntry `json:"labels,omitempty"`
  2430. // Name: Name of the resource; provided by the client when the resource
  2431. // is created. The name must be 1-63 characters long, and comply with
  2432. // RFC1035. Specifically, the name must be 1-63 characters long and
  2433. // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
  2434. // the first character must be a lowercase letter, and all following
  2435. // characters must be a dash, lowercase letter, or digit, except the
  2436. // last character, which cannot be a dash.
  2437. Name string `json:"name,omitempty"`
  2438. // Operation: Output only. The Operation that most recently ran, or is
  2439. // currently running, on this type provider.
  2440. Operation *Operation `json:"operation,omitempty"`
  2441. // Options: Options to apply when handling any resources in this
  2442. // service.
  2443. Options *Options `json:"options,omitempty"`
  2444. // SelfLink: Output only. Self link for the type provider.
  2445. SelfLink string `json:"selfLink,omitempty"`
  2446. // ServerResponse contains the HTTP response code and headers from the
  2447. // server.
  2448. googleapi.ServerResponse `json:"-"`
  2449. // ForceSendFields is a list of field names (e.g. "CollectionOverrides")
  2450. // to unconditionally include in API requests. By default, fields with
  2451. // empty values are omitted from API requests. However, any non-pointer,
  2452. // non-interface field appearing in ForceSendFields will be sent to the
  2453. // server regardless of whether the field is empty or not. This may be
  2454. // used to include empty fields in Patch requests.
  2455. ForceSendFields []string `json:"-"`
  2456. // NullFields is a list of field names (e.g. "CollectionOverrides") to
  2457. // include in API requests with the JSON null value. By default, fields
  2458. // with empty values are omitted from API requests. However, any field
  2459. // with an empty value appearing in NullFields will be sent to the
  2460. // server as null. It is an error if a field in this list has a
  2461. // non-empty value. This may be used to include null fields in Patch
  2462. // requests.
  2463. NullFields []string `json:"-"`
  2464. }
  2465. func (s *TypeProvider) MarshalJSON() ([]byte, error) {
  2466. type NoMethod TypeProvider
  2467. raw := NoMethod(*s)
  2468. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2469. }
  2470. type TypeProviderLabelEntry struct {
  2471. Key string `json:"key,omitempty"`
  2472. Value string `json:"value,omitempty"`
  2473. // ForceSendFields is a list of field names (e.g. "Key") to
  2474. // unconditionally include in API requests. By default, fields with
  2475. // empty values are omitted from API requests. However, any non-pointer,
  2476. // non-interface field appearing in ForceSendFields will be sent to the
  2477. // server regardless of whether the field is empty or not. This may be
  2478. // used to include empty fields in Patch requests.
  2479. ForceSendFields []string `json:"-"`
  2480. // NullFields is a list of field names (e.g. "Key") to include in API
  2481. // requests with the JSON null value. By default, fields with empty
  2482. // values are omitted from API requests. However, any field with an
  2483. // empty value appearing in NullFields will be sent to the server as
  2484. // null. It is an error if a field in this list has a non-empty value.
  2485. // This may be used to include null fields in Patch requests.
  2486. NullFields []string `json:"-"`
  2487. }
  2488. func (s *TypeProviderLabelEntry) MarshalJSON() ([]byte, error) {
  2489. type NoMethod TypeProviderLabelEntry
  2490. raw := NoMethod(*s)
  2491. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2492. }
  2493. // TypeProvidersListResponse: A response that returns all Type Providers
  2494. // supported by Deployment Manager
  2495. type TypeProvidersListResponse struct {
  2496. // NextPageToken: A token used to continue a truncated list request.
  2497. NextPageToken string `json:"nextPageToken,omitempty"`
  2498. // TypeProviders: Output only. A list of resource type providers
  2499. // supported by Deployment Manager.
  2500. TypeProviders []*TypeProvider `json:"typeProviders,omitempty"`
  2501. // ServerResponse contains the HTTP response code and headers from the
  2502. // server.
  2503. googleapi.ServerResponse `json:"-"`
  2504. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2505. // unconditionally include in API requests. By default, fields with
  2506. // empty values are omitted from API requests. However, any non-pointer,
  2507. // non-interface field appearing in ForceSendFields will be sent to the
  2508. // server regardless of whether the field is empty or not. This may be
  2509. // used to include empty fields in Patch requests.
  2510. ForceSendFields []string `json:"-"`
  2511. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2512. // in API requests with the JSON null value. By default, fields with
  2513. // empty values are omitted from API requests. However, any field with
  2514. // an empty value appearing in NullFields will be sent to the server as
  2515. // null. It is an error if a field in this list has a non-empty value.
  2516. // This may be used to include null fields in Patch requests.
  2517. NullFields []string `json:"-"`
  2518. }
  2519. func (s *TypeProvidersListResponse) MarshalJSON() ([]byte, error) {
  2520. type NoMethod TypeProvidersListResponse
  2521. raw := NoMethod(*s)
  2522. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2523. }
  2524. type TypeProvidersListTypesResponse struct {
  2525. // NextPageToken: A token used to continue a truncated list request.
  2526. NextPageToken string `json:"nextPageToken,omitempty"`
  2527. // Types: Output only. A list of resource type info.
  2528. Types []*TypeInfo `json:"types,omitempty"`
  2529. // ServerResponse contains the HTTP response code and headers from the
  2530. // server.
  2531. googleapi.ServerResponse `json:"-"`
  2532. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2533. // unconditionally include in API requests. By default, fields with
  2534. // empty values are omitted from API requests. However, any non-pointer,
  2535. // non-interface field appearing in ForceSendFields will be sent to the
  2536. // server regardless of whether the field is empty or not. This may be
  2537. // used to include empty fields in Patch requests.
  2538. ForceSendFields []string `json:"-"`
  2539. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2540. // in API requests with the JSON null value. By default, fields with
  2541. // empty values are omitted from API requests. However, any field with
  2542. // an empty value appearing in NullFields will be sent to the server as
  2543. // null. It is an error if a field in this list has a non-empty value.
  2544. // This may be used to include null fields in Patch requests.
  2545. NullFields []string `json:"-"`
  2546. }
  2547. func (s *TypeProvidersListTypesResponse) MarshalJSON() ([]byte, error) {
  2548. type NoMethod TypeProvidersListTypesResponse
  2549. raw := NoMethod(*s)
  2550. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2551. }
  2552. // TypesListResponse: A response that returns all Types supported by
  2553. // Deployment Manager
  2554. type TypesListResponse struct {
  2555. // NextPageToken: A token used to continue a truncated list request.
  2556. NextPageToken string `json:"nextPageToken,omitempty"`
  2557. // Types: Output only. A list of resource types supported by Deployment
  2558. // Manager.
  2559. Types []*Type `json:"types,omitempty"`
  2560. // ServerResponse contains the HTTP response code and headers from the
  2561. // server.
  2562. googleapi.ServerResponse `json:"-"`
  2563. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2564. // unconditionally include in API requests. By default, fields with
  2565. // empty values are omitted from API requests. However, any non-pointer,
  2566. // non-interface field appearing in ForceSendFields will be sent to the
  2567. // server regardless of whether the field is empty or not. This may be
  2568. // used to include empty fields in Patch requests.
  2569. ForceSendFields []string `json:"-"`
  2570. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2571. // in API requests with the JSON null value. By default, fields with
  2572. // empty values are omitted from API requests. However, any field with
  2573. // an empty value appearing in NullFields will be sent to the server as
  2574. // null. It is an error if a field in this list has a non-empty value.
  2575. // This may be used to include null fields in Patch requests.
  2576. NullFields []string `json:"-"`
  2577. }
  2578. func (s *TypesListResponse) MarshalJSON() ([]byte, error) {
  2579. type NoMethod TypesListResponse
  2580. raw := NoMethod(*s)
  2581. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2582. }
  2583. // ValidationOptions: Options for how to validate and process properties
  2584. // on a resource.
  2585. type ValidationOptions struct {
  2586. // SchemaValidation: Customize how deployment manager will validate the
  2587. // resource against schema errors.
  2588. SchemaValidation string `json:"schemaValidation,omitempty"`
  2589. // UndeclaredProperties: Specify what to do with extra properties when
  2590. // executing a request.
  2591. UndeclaredProperties string `json:"undeclaredProperties,omitempty"`
  2592. // ForceSendFields is a list of field names (e.g. "SchemaValidation") to
  2593. // unconditionally include in API requests. By default, fields with
  2594. // empty values are omitted from API requests. However, any non-pointer,
  2595. // non-interface field appearing in ForceSendFields will be sent to the
  2596. // server regardless of whether the field is empty or not. This may be
  2597. // used to include empty fields in Patch requests.
  2598. ForceSendFields []string `json:"-"`
  2599. // NullFields is a list of field names (e.g. "SchemaValidation") to
  2600. // include in API requests with the JSON null value. By default, fields
  2601. // with empty values are omitted from API requests. However, any field
  2602. // with an empty value appearing in NullFields will be sent to the
  2603. // server as null. It is an error if a field in this list has a
  2604. // non-empty value. This may be used to include null fields in Patch
  2605. // requests.
  2606. NullFields []string `json:"-"`
  2607. }
  2608. func (s *ValidationOptions) MarshalJSON() ([]byte, error) {
  2609. type NoMethod ValidationOptions
  2610. raw := NoMethod(*s)
  2611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2612. }
  2613. // method id "deploymentmanager.compositeTypes.delete":
  2614. type CompositeTypesDeleteCall struct {
  2615. s *Service
  2616. project string
  2617. compositeType string
  2618. urlParams_ gensupport.URLParams
  2619. ctx_ context.Context
  2620. header_ http.Header
  2621. }
  2622. // Delete: Deletes a composite type.
  2623. func (r *CompositeTypesService) Delete(project string, compositeType string) *CompositeTypesDeleteCall {
  2624. c := &CompositeTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2625. c.project = project
  2626. c.compositeType = compositeType
  2627. return c
  2628. }
  2629. // Fields allows partial responses to be retrieved. See
  2630. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2631. // for more information.
  2632. func (c *CompositeTypesDeleteCall) Fields(s ...googleapi.Field) *CompositeTypesDeleteCall {
  2633. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2634. return c
  2635. }
  2636. // Context sets the context to be used in this call's Do method. Any
  2637. // pending HTTP request will be aborted if the provided context is
  2638. // canceled.
  2639. func (c *CompositeTypesDeleteCall) Context(ctx context.Context) *CompositeTypesDeleteCall {
  2640. c.ctx_ = ctx
  2641. return c
  2642. }
  2643. // Header returns an http.Header that can be modified by the caller to
  2644. // add HTTP headers to the request.
  2645. func (c *CompositeTypesDeleteCall) Header() http.Header {
  2646. if c.header_ == nil {
  2647. c.header_ = make(http.Header)
  2648. }
  2649. return c.header_
  2650. }
  2651. func (c *CompositeTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2652. reqHeaders := make(http.Header)
  2653. for k, v := range c.header_ {
  2654. reqHeaders[k] = v
  2655. }
  2656. reqHeaders.Set("User-Agent", c.s.userAgent())
  2657. var body io.Reader = nil
  2658. c.urlParams_.Set("alt", alt)
  2659. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  2660. urls += "?" + c.urlParams_.Encode()
  2661. req, _ := http.NewRequest("DELETE", urls, body)
  2662. req.Header = reqHeaders
  2663. googleapi.Expand(req.URL, map[string]string{
  2664. "project": c.project,
  2665. "compositeType": c.compositeType,
  2666. })
  2667. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2668. }
  2669. // Do executes the "deploymentmanager.compositeTypes.delete" call.
  2670. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2671. // status code is an error. Response headers are in either
  2672. // *Operation.ServerResponse.Header or (if a response was returned at
  2673. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2674. // to check whether the returned error was because
  2675. // http.StatusNotModified was returned.
  2676. func (c *CompositeTypesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2677. gensupport.SetOptions(c.urlParams_, opts...)
  2678. res, err := c.doRequest("json")
  2679. if res != nil && res.StatusCode == http.StatusNotModified {
  2680. if res.Body != nil {
  2681. res.Body.Close()
  2682. }
  2683. return nil, &googleapi.Error{
  2684. Code: res.StatusCode,
  2685. Header: res.Header,
  2686. }
  2687. }
  2688. if err != nil {
  2689. return nil, err
  2690. }
  2691. defer googleapi.CloseBody(res)
  2692. if err := googleapi.CheckResponse(res); err != nil {
  2693. return nil, err
  2694. }
  2695. ret := &Operation{
  2696. ServerResponse: googleapi.ServerResponse{
  2697. Header: res.Header,
  2698. HTTPStatusCode: res.StatusCode,
  2699. },
  2700. }
  2701. target := &ret
  2702. if err := gensupport.DecodeResponse(target, res); err != nil {
  2703. return nil, err
  2704. }
  2705. return ret, nil
  2706. // {
  2707. // "description": "Deletes a composite type.",
  2708. // "httpMethod": "DELETE",
  2709. // "id": "deploymentmanager.compositeTypes.delete",
  2710. // "parameterOrder": [
  2711. // "project",
  2712. // "compositeType"
  2713. // ],
  2714. // "parameters": {
  2715. // "compositeType": {
  2716. // "description": "The name of the type for this request.",
  2717. // "location": "path",
  2718. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  2719. // "required": true,
  2720. // "type": "string"
  2721. // },
  2722. // "project": {
  2723. // "description": "The project ID for this request.",
  2724. // "location": "path",
  2725. // "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])?))",
  2726. // "required": true,
  2727. // "type": "string"
  2728. // }
  2729. // },
  2730. // "path": "{project}/global/compositeTypes/{compositeType}",
  2731. // "response": {
  2732. // "$ref": "Operation"
  2733. // },
  2734. // "scopes": [
  2735. // "https://www.googleapis.com/auth/cloud-platform",
  2736. // "https://www.googleapis.com/auth/ndev.cloudman"
  2737. // ]
  2738. // }
  2739. }
  2740. // method id "deploymentmanager.compositeTypes.get":
  2741. type CompositeTypesGetCall struct {
  2742. s *Service
  2743. project string
  2744. compositeType string
  2745. urlParams_ gensupport.URLParams
  2746. ifNoneMatch_ string
  2747. ctx_ context.Context
  2748. header_ http.Header
  2749. }
  2750. // Get: Gets information about a specific composite type.
  2751. func (r *CompositeTypesService) Get(project string, compositeType string) *CompositeTypesGetCall {
  2752. c := &CompositeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2753. c.project = project
  2754. c.compositeType = compositeType
  2755. return c
  2756. }
  2757. // Fields allows partial responses to be retrieved. See
  2758. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2759. // for more information.
  2760. func (c *CompositeTypesGetCall) Fields(s ...googleapi.Field) *CompositeTypesGetCall {
  2761. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2762. return c
  2763. }
  2764. // IfNoneMatch sets the optional parameter which makes the operation
  2765. // fail if the object's ETag matches the given value. This is useful for
  2766. // getting updates only after the object has changed since the last
  2767. // request. Use googleapi.IsNotModified to check whether the response
  2768. // error from Do is the result of In-None-Match.
  2769. func (c *CompositeTypesGetCall) IfNoneMatch(entityTag string) *CompositeTypesGetCall {
  2770. c.ifNoneMatch_ = entityTag
  2771. return c
  2772. }
  2773. // Context sets the context to be used in this call's Do method. Any
  2774. // pending HTTP request will be aborted if the provided context is
  2775. // canceled.
  2776. func (c *CompositeTypesGetCall) Context(ctx context.Context) *CompositeTypesGetCall {
  2777. c.ctx_ = ctx
  2778. return c
  2779. }
  2780. // Header returns an http.Header that can be modified by the caller to
  2781. // add HTTP headers to the request.
  2782. func (c *CompositeTypesGetCall) Header() http.Header {
  2783. if c.header_ == nil {
  2784. c.header_ = make(http.Header)
  2785. }
  2786. return c.header_
  2787. }
  2788. func (c *CompositeTypesGetCall) doRequest(alt string) (*http.Response, error) {
  2789. reqHeaders := make(http.Header)
  2790. for k, v := range c.header_ {
  2791. reqHeaders[k] = v
  2792. }
  2793. reqHeaders.Set("User-Agent", c.s.userAgent())
  2794. if c.ifNoneMatch_ != "" {
  2795. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2796. }
  2797. var body io.Reader = nil
  2798. c.urlParams_.Set("alt", alt)
  2799. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  2800. urls += "?" + c.urlParams_.Encode()
  2801. req, _ := http.NewRequest("GET", urls, body)
  2802. req.Header = reqHeaders
  2803. googleapi.Expand(req.URL, map[string]string{
  2804. "project": c.project,
  2805. "compositeType": c.compositeType,
  2806. })
  2807. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2808. }
  2809. // Do executes the "deploymentmanager.compositeTypes.get" call.
  2810. // Exactly one of *CompositeType or error will be non-nil. Any non-2xx
  2811. // status code is an error. Response headers are in either
  2812. // *CompositeType.ServerResponse.Header or (if a response was returned
  2813. // at all) in error.(*googleapi.Error).Header. Use
  2814. // googleapi.IsNotModified to check whether the returned error was
  2815. // because http.StatusNotModified was returned.
  2816. func (c *CompositeTypesGetCall) Do(opts ...googleapi.CallOption) (*CompositeType, error) {
  2817. gensupport.SetOptions(c.urlParams_, opts...)
  2818. res, err := c.doRequest("json")
  2819. if res != nil && res.StatusCode == http.StatusNotModified {
  2820. if res.Body != nil {
  2821. res.Body.Close()
  2822. }
  2823. return nil, &googleapi.Error{
  2824. Code: res.StatusCode,
  2825. Header: res.Header,
  2826. }
  2827. }
  2828. if err != nil {
  2829. return nil, err
  2830. }
  2831. defer googleapi.CloseBody(res)
  2832. if err := googleapi.CheckResponse(res); err != nil {
  2833. return nil, err
  2834. }
  2835. ret := &CompositeType{
  2836. ServerResponse: googleapi.ServerResponse{
  2837. Header: res.Header,
  2838. HTTPStatusCode: res.StatusCode,
  2839. },
  2840. }
  2841. target := &ret
  2842. if err := gensupport.DecodeResponse(target, res); err != nil {
  2843. return nil, err
  2844. }
  2845. return ret, nil
  2846. // {
  2847. // "description": "Gets information about a specific composite type.",
  2848. // "httpMethod": "GET",
  2849. // "id": "deploymentmanager.compositeTypes.get",
  2850. // "parameterOrder": [
  2851. // "project",
  2852. // "compositeType"
  2853. // ],
  2854. // "parameters": {
  2855. // "compositeType": {
  2856. // "description": "The name of the composite type for this request.",
  2857. // "location": "path",
  2858. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  2859. // "required": true,
  2860. // "type": "string"
  2861. // },
  2862. // "project": {
  2863. // "description": "The project ID for this request.",
  2864. // "location": "path",
  2865. // "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])?))",
  2866. // "required": true,
  2867. // "type": "string"
  2868. // }
  2869. // },
  2870. // "path": "{project}/global/compositeTypes/{compositeType}",
  2871. // "response": {
  2872. // "$ref": "CompositeType"
  2873. // },
  2874. // "scopes": [
  2875. // "https://www.googleapis.com/auth/cloud-platform",
  2876. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  2877. // "https://www.googleapis.com/auth/ndev.cloudman",
  2878. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  2879. // ]
  2880. // }
  2881. }
  2882. // method id "deploymentmanager.compositeTypes.insert":
  2883. type CompositeTypesInsertCall struct {
  2884. s *Service
  2885. project string
  2886. compositetype *CompositeType
  2887. urlParams_ gensupport.URLParams
  2888. ctx_ context.Context
  2889. header_ http.Header
  2890. }
  2891. // Insert: Creates a composite type.
  2892. func (r *CompositeTypesService) Insert(project string, compositetype *CompositeType) *CompositeTypesInsertCall {
  2893. c := &CompositeTypesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2894. c.project = project
  2895. c.compositetype = compositetype
  2896. return c
  2897. }
  2898. // Fields allows partial responses to be retrieved. See
  2899. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2900. // for more information.
  2901. func (c *CompositeTypesInsertCall) Fields(s ...googleapi.Field) *CompositeTypesInsertCall {
  2902. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2903. return c
  2904. }
  2905. // Context sets the context to be used in this call's Do method. Any
  2906. // pending HTTP request will be aborted if the provided context is
  2907. // canceled.
  2908. func (c *CompositeTypesInsertCall) Context(ctx context.Context) *CompositeTypesInsertCall {
  2909. c.ctx_ = ctx
  2910. return c
  2911. }
  2912. // Header returns an http.Header that can be modified by the caller to
  2913. // add HTTP headers to the request.
  2914. func (c *CompositeTypesInsertCall) Header() http.Header {
  2915. if c.header_ == nil {
  2916. c.header_ = make(http.Header)
  2917. }
  2918. return c.header_
  2919. }
  2920. func (c *CompositeTypesInsertCall) doRequest(alt string) (*http.Response, error) {
  2921. reqHeaders := make(http.Header)
  2922. for k, v := range c.header_ {
  2923. reqHeaders[k] = v
  2924. }
  2925. reqHeaders.Set("User-Agent", c.s.userAgent())
  2926. var body io.Reader = nil
  2927. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  2928. if err != nil {
  2929. return nil, err
  2930. }
  2931. reqHeaders.Set("Content-Type", "application/json")
  2932. c.urlParams_.Set("alt", alt)
  2933. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes")
  2934. urls += "?" + c.urlParams_.Encode()
  2935. req, _ := http.NewRequest("POST", urls, body)
  2936. req.Header = reqHeaders
  2937. googleapi.Expand(req.URL, map[string]string{
  2938. "project": c.project,
  2939. })
  2940. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2941. }
  2942. // Do executes the "deploymentmanager.compositeTypes.insert" call.
  2943. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2944. // status code is an error. Response headers are in either
  2945. // *Operation.ServerResponse.Header or (if a response was returned at
  2946. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2947. // to check whether the returned error was because
  2948. // http.StatusNotModified was returned.
  2949. func (c *CompositeTypesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2950. gensupport.SetOptions(c.urlParams_, opts...)
  2951. res, err := c.doRequest("json")
  2952. if res != nil && res.StatusCode == http.StatusNotModified {
  2953. if res.Body != nil {
  2954. res.Body.Close()
  2955. }
  2956. return nil, &googleapi.Error{
  2957. Code: res.StatusCode,
  2958. Header: res.Header,
  2959. }
  2960. }
  2961. if err != nil {
  2962. return nil, err
  2963. }
  2964. defer googleapi.CloseBody(res)
  2965. if err := googleapi.CheckResponse(res); err != nil {
  2966. return nil, err
  2967. }
  2968. ret := &Operation{
  2969. ServerResponse: googleapi.ServerResponse{
  2970. Header: res.Header,
  2971. HTTPStatusCode: res.StatusCode,
  2972. },
  2973. }
  2974. target := &ret
  2975. if err := gensupport.DecodeResponse(target, res); err != nil {
  2976. return nil, err
  2977. }
  2978. return ret, nil
  2979. // {
  2980. // "description": "Creates a composite type.",
  2981. // "httpMethod": "POST",
  2982. // "id": "deploymentmanager.compositeTypes.insert",
  2983. // "parameterOrder": [
  2984. // "project"
  2985. // ],
  2986. // "parameters": {
  2987. // "project": {
  2988. // "description": "The project ID for this request.",
  2989. // "location": "path",
  2990. // "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])?))",
  2991. // "required": true,
  2992. // "type": "string"
  2993. // }
  2994. // },
  2995. // "path": "{project}/global/compositeTypes",
  2996. // "request": {
  2997. // "$ref": "CompositeType"
  2998. // },
  2999. // "response": {
  3000. // "$ref": "Operation"
  3001. // },
  3002. // "scopes": [
  3003. // "https://www.googleapis.com/auth/cloud-platform",
  3004. // "https://www.googleapis.com/auth/ndev.cloudman"
  3005. // ]
  3006. // }
  3007. }
  3008. // method id "deploymentmanager.compositeTypes.list":
  3009. type CompositeTypesListCall struct {
  3010. s *Service
  3011. project string
  3012. urlParams_ gensupport.URLParams
  3013. ifNoneMatch_ string
  3014. ctx_ context.Context
  3015. header_ http.Header
  3016. }
  3017. // List: Lists all composite types for Deployment Manager.
  3018. func (r *CompositeTypesService) List(project string) *CompositeTypesListCall {
  3019. c := &CompositeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3020. c.project = project
  3021. return c
  3022. }
  3023. // Filter sets the optional parameter "filter": A filter expression that
  3024. // filters resources listed in the response. The expression must specify
  3025. // the field name, a comparison operator, and the value that you want to
  3026. // use for filtering. The value must be a string, a number, or a
  3027. // boolean. The comparison operator must be either =, !=, >, or <.
  3028. //
  3029. // For example, if you are filtering Compute Engine instances, you can
  3030. // exclude instances named example-instance by specifying name !=
  3031. // example-instance.
  3032. //
  3033. // You can also filter nested fields. For example, you could specify
  3034. // scheduling.automaticRestart = false to include instances only if they
  3035. // are not scheduled for automatic restarts. You can use filtering on
  3036. // nested fields to filter based on resource labels.
  3037. //
  3038. // To filter on multiple expressions, provide each separate expression
  3039. // within parentheses. For example, (scheduling.automaticRestart = true)
  3040. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  3041. // AND expression. However, you can include AND and OR expressions
  3042. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  3043. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  3044. // true).
  3045. func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall {
  3046. c.urlParams_.Set("filter", filter)
  3047. return c
  3048. }
  3049. // MaxResults sets the optional parameter "maxResults": The maximum
  3050. // number of results per page that should be returned. If the number of
  3051. // available results is larger than maxResults, Compute Engine returns a
  3052. // nextPageToken that can be used to get the next page of results in
  3053. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  3054. // (Default: 500)
  3055. func (c *CompositeTypesListCall) MaxResults(maxResults int64) *CompositeTypesListCall {
  3056. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3057. return c
  3058. }
  3059. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  3060. // a certain order. By default, results are returned in alphanumerical
  3061. // order based on the resource name.
  3062. //
  3063. // You can also sort results in descending order based on the creation
  3064. // timestamp using orderBy="creationTimestamp desc". This sorts results
  3065. // based on the creationTimestamp field in reverse chronological order
  3066. // (newest result first). Use this to sort resources like operations so
  3067. // that the newest operation is returned first.
  3068. //
  3069. // Currently, only sorting by name or creationTimestamp desc is
  3070. // supported.
  3071. func (c *CompositeTypesListCall) OrderBy(orderBy string) *CompositeTypesListCall {
  3072. c.urlParams_.Set("orderBy", orderBy)
  3073. return c
  3074. }
  3075. // PageToken sets the optional parameter "pageToken": Specifies a page
  3076. // token to use. Set pageToken to the nextPageToken returned by a
  3077. // previous list request to get the next page of results.
  3078. func (c *CompositeTypesListCall) PageToken(pageToken string) *CompositeTypesListCall {
  3079. c.urlParams_.Set("pageToken", pageToken)
  3080. return c
  3081. }
  3082. // Fields allows partial responses to be retrieved. See
  3083. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3084. // for more information.
  3085. func (c *CompositeTypesListCall) Fields(s ...googleapi.Field) *CompositeTypesListCall {
  3086. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3087. return c
  3088. }
  3089. // IfNoneMatch sets the optional parameter which makes the operation
  3090. // fail if the object's ETag matches the given value. This is useful for
  3091. // getting updates only after the object has changed since the last
  3092. // request. Use googleapi.IsNotModified to check whether the response
  3093. // error from Do is the result of In-None-Match.
  3094. func (c *CompositeTypesListCall) IfNoneMatch(entityTag string) *CompositeTypesListCall {
  3095. c.ifNoneMatch_ = entityTag
  3096. return c
  3097. }
  3098. // Context sets the context to be used in this call's Do method. Any
  3099. // pending HTTP request will be aborted if the provided context is
  3100. // canceled.
  3101. func (c *CompositeTypesListCall) Context(ctx context.Context) *CompositeTypesListCall {
  3102. c.ctx_ = ctx
  3103. return c
  3104. }
  3105. // Header returns an http.Header that can be modified by the caller to
  3106. // add HTTP headers to the request.
  3107. func (c *CompositeTypesListCall) Header() http.Header {
  3108. if c.header_ == nil {
  3109. c.header_ = make(http.Header)
  3110. }
  3111. return c.header_
  3112. }
  3113. func (c *CompositeTypesListCall) doRequest(alt string) (*http.Response, error) {
  3114. reqHeaders := make(http.Header)
  3115. for k, v := range c.header_ {
  3116. reqHeaders[k] = v
  3117. }
  3118. reqHeaders.Set("User-Agent", c.s.userAgent())
  3119. if c.ifNoneMatch_ != "" {
  3120. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3121. }
  3122. var body io.Reader = nil
  3123. c.urlParams_.Set("alt", alt)
  3124. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes")
  3125. urls += "?" + c.urlParams_.Encode()
  3126. req, _ := http.NewRequest("GET", urls, body)
  3127. req.Header = reqHeaders
  3128. googleapi.Expand(req.URL, map[string]string{
  3129. "project": c.project,
  3130. })
  3131. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3132. }
  3133. // Do executes the "deploymentmanager.compositeTypes.list" call.
  3134. // Exactly one of *CompositeTypesListResponse or error will be non-nil.
  3135. // Any non-2xx status code is an error. Response headers are in either
  3136. // *CompositeTypesListResponse.ServerResponse.Header or (if a response
  3137. // was returned at all) in error.(*googleapi.Error).Header. Use
  3138. // googleapi.IsNotModified to check whether the returned error was
  3139. // because http.StatusNotModified was returned.
  3140. func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTypesListResponse, error) {
  3141. gensupport.SetOptions(c.urlParams_, opts...)
  3142. res, err := c.doRequest("json")
  3143. if res != nil && res.StatusCode == http.StatusNotModified {
  3144. if res.Body != nil {
  3145. res.Body.Close()
  3146. }
  3147. return nil, &googleapi.Error{
  3148. Code: res.StatusCode,
  3149. Header: res.Header,
  3150. }
  3151. }
  3152. if err != nil {
  3153. return nil, err
  3154. }
  3155. defer googleapi.CloseBody(res)
  3156. if err := googleapi.CheckResponse(res); err != nil {
  3157. return nil, err
  3158. }
  3159. ret := &CompositeTypesListResponse{
  3160. ServerResponse: googleapi.ServerResponse{
  3161. Header: res.Header,
  3162. HTTPStatusCode: res.StatusCode,
  3163. },
  3164. }
  3165. target := &ret
  3166. if err := gensupport.DecodeResponse(target, res); err != nil {
  3167. return nil, err
  3168. }
  3169. return ret, nil
  3170. // {
  3171. // "description": "Lists all composite types for Deployment Manager.",
  3172. // "httpMethod": "GET",
  3173. // "id": "deploymentmanager.compositeTypes.list",
  3174. // "parameterOrder": [
  3175. // "project"
  3176. // ],
  3177. // "parameters": {
  3178. // "filter": {
  3179. // "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).",
  3180. // "location": "query",
  3181. // "type": "string"
  3182. // },
  3183. // "maxResults": {
  3184. // "default": "500",
  3185. // "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)",
  3186. // "format": "uint32",
  3187. // "location": "query",
  3188. // "minimum": "0",
  3189. // "type": "integer"
  3190. // },
  3191. // "orderBy": {
  3192. // "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.",
  3193. // "location": "query",
  3194. // "type": "string"
  3195. // },
  3196. // "pageToken": {
  3197. // "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.",
  3198. // "location": "query",
  3199. // "type": "string"
  3200. // },
  3201. // "project": {
  3202. // "description": "The project ID for this request.",
  3203. // "location": "path",
  3204. // "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])?))",
  3205. // "required": true,
  3206. // "type": "string"
  3207. // }
  3208. // },
  3209. // "path": "{project}/global/compositeTypes",
  3210. // "response": {
  3211. // "$ref": "CompositeTypesListResponse"
  3212. // },
  3213. // "scopes": [
  3214. // "https://www.googleapis.com/auth/cloud-platform",
  3215. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  3216. // "https://www.googleapis.com/auth/ndev.cloudman",
  3217. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  3218. // ]
  3219. // }
  3220. }
  3221. // Pages invokes f for each page of results.
  3222. // A non-nil error returned from f will halt the iteration.
  3223. // The provided context supersedes any context provided to the Context method.
  3224. func (c *CompositeTypesListCall) Pages(ctx context.Context, f func(*CompositeTypesListResponse) error) error {
  3225. c.ctx_ = ctx
  3226. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3227. for {
  3228. x, err := c.Do()
  3229. if err != nil {
  3230. return err
  3231. }
  3232. if err := f(x); err != nil {
  3233. return err
  3234. }
  3235. if x.NextPageToken == "" {
  3236. return nil
  3237. }
  3238. c.PageToken(x.NextPageToken)
  3239. }
  3240. }
  3241. // method id "deploymentmanager.compositeTypes.patch":
  3242. type CompositeTypesPatchCall struct {
  3243. s *Service
  3244. project string
  3245. compositeType string
  3246. compositetype *CompositeType
  3247. urlParams_ gensupport.URLParams
  3248. ctx_ context.Context
  3249. header_ http.Header
  3250. }
  3251. // Patch: Updates a composite type. This method supports patch
  3252. // semantics.
  3253. func (r *CompositeTypesService) Patch(project string, compositeType string, compositetype *CompositeType) *CompositeTypesPatchCall {
  3254. c := &CompositeTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3255. c.project = project
  3256. c.compositeType = compositeType
  3257. c.compositetype = compositetype
  3258. return c
  3259. }
  3260. // Fields allows partial responses to be retrieved. See
  3261. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3262. // for more information.
  3263. func (c *CompositeTypesPatchCall) Fields(s ...googleapi.Field) *CompositeTypesPatchCall {
  3264. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3265. return c
  3266. }
  3267. // Context sets the context to be used in this call's Do method. Any
  3268. // pending HTTP request will be aborted if the provided context is
  3269. // canceled.
  3270. func (c *CompositeTypesPatchCall) Context(ctx context.Context) *CompositeTypesPatchCall {
  3271. c.ctx_ = ctx
  3272. return c
  3273. }
  3274. // Header returns an http.Header that can be modified by the caller to
  3275. // add HTTP headers to the request.
  3276. func (c *CompositeTypesPatchCall) Header() http.Header {
  3277. if c.header_ == nil {
  3278. c.header_ = make(http.Header)
  3279. }
  3280. return c.header_
  3281. }
  3282. func (c *CompositeTypesPatchCall) doRequest(alt string) (*http.Response, error) {
  3283. reqHeaders := make(http.Header)
  3284. for k, v := range c.header_ {
  3285. reqHeaders[k] = v
  3286. }
  3287. reqHeaders.Set("User-Agent", c.s.userAgent())
  3288. var body io.Reader = nil
  3289. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  3290. if err != nil {
  3291. return nil, err
  3292. }
  3293. reqHeaders.Set("Content-Type", "application/json")
  3294. c.urlParams_.Set("alt", alt)
  3295. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  3296. urls += "?" + c.urlParams_.Encode()
  3297. req, _ := http.NewRequest("PATCH", urls, body)
  3298. req.Header = reqHeaders
  3299. googleapi.Expand(req.URL, map[string]string{
  3300. "project": c.project,
  3301. "compositeType": c.compositeType,
  3302. })
  3303. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3304. }
  3305. // Do executes the "deploymentmanager.compositeTypes.patch" call.
  3306. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3307. // status code is an error. Response headers are in either
  3308. // *Operation.ServerResponse.Header or (if a response was returned at
  3309. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3310. // to check whether the returned error was because
  3311. // http.StatusNotModified was returned.
  3312. func (c *CompositeTypesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3313. gensupport.SetOptions(c.urlParams_, opts...)
  3314. res, err := c.doRequest("json")
  3315. if res != nil && res.StatusCode == http.StatusNotModified {
  3316. if res.Body != nil {
  3317. res.Body.Close()
  3318. }
  3319. return nil, &googleapi.Error{
  3320. Code: res.StatusCode,
  3321. Header: res.Header,
  3322. }
  3323. }
  3324. if err != nil {
  3325. return nil, err
  3326. }
  3327. defer googleapi.CloseBody(res)
  3328. if err := googleapi.CheckResponse(res); err != nil {
  3329. return nil, err
  3330. }
  3331. ret := &Operation{
  3332. ServerResponse: googleapi.ServerResponse{
  3333. Header: res.Header,
  3334. HTTPStatusCode: res.StatusCode,
  3335. },
  3336. }
  3337. target := &ret
  3338. if err := gensupport.DecodeResponse(target, res); err != nil {
  3339. return nil, err
  3340. }
  3341. return ret, nil
  3342. // {
  3343. // "description": "Updates a composite type. This method supports patch semantics.",
  3344. // "httpMethod": "PATCH",
  3345. // "id": "deploymentmanager.compositeTypes.patch",
  3346. // "parameterOrder": [
  3347. // "project",
  3348. // "compositeType"
  3349. // ],
  3350. // "parameters": {
  3351. // "compositeType": {
  3352. // "description": "The name of the composite type for this request.",
  3353. // "location": "path",
  3354. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  3355. // "required": true,
  3356. // "type": "string"
  3357. // },
  3358. // "project": {
  3359. // "description": "The project ID for this request.",
  3360. // "location": "path",
  3361. // "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])?))",
  3362. // "required": true,
  3363. // "type": "string"
  3364. // }
  3365. // },
  3366. // "path": "{project}/global/compositeTypes/{compositeType}",
  3367. // "request": {
  3368. // "$ref": "CompositeType"
  3369. // },
  3370. // "response": {
  3371. // "$ref": "Operation"
  3372. // },
  3373. // "scopes": [
  3374. // "https://www.googleapis.com/auth/cloud-platform",
  3375. // "https://www.googleapis.com/auth/ndev.cloudman"
  3376. // ]
  3377. // }
  3378. }
  3379. // method id "deploymentmanager.compositeTypes.update":
  3380. type CompositeTypesUpdateCall struct {
  3381. s *Service
  3382. project string
  3383. compositeType string
  3384. compositetype *CompositeType
  3385. urlParams_ gensupport.URLParams
  3386. ctx_ context.Context
  3387. header_ http.Header
  3388. }
  3389. // Update: Updates a composite type.
  3390. func (r *CompositeTypesService) Update(project string, compositeType string, compositetype *CompositeType) *CompositeTypesUpdateCall {
  3391. c := &CompositeTypesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3392. c.project = project
  3393. c.compositeType = compositeType
  3394. c.compositetype = compositetype
  3395. return c
  3396. }
  3397. // Fields allows partial responses to be retrieved. See
  3398. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3399. // for more information.
  3400. func (c *CompositeTypesUpdateCall) Fields(s ...googleapi.Field) *CompositeTypesUpdateCall {
  3401. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3402. return c
  3403. }
  3404. // Context sets the context to be used in this call's Do method. Any
  3405. // pending HTTP request will be aborted if the provided context is
  3406. // canceled.
  3407. func (c *CompositeTypesUpdateCall) Context(ctx context.Context) *CompositeTypesUpdateCall {
  3408. c.ctx_ = ctx
  3409. return c
  3410. }
  3411. // Header returns an http.Header that can be modified by the caller to
  3412. // add HTTP headers to the request.
  3413. func (c *CompositeTypesUpdateCall) Header() http.Header {
  3414. if c.header_ == nil {
  3415. c.header_ = make(http.Header)
  3416. }
  3417. return c.header_
  3418. }
  3419. func (c *CompositeTypesUpdateCall) doRequest(alt string) (*http.Response, error) {
  3420. reqHeaders := make(http.Header)
  3421. for k, v := range c.header_ {
  3422. reqHeaders[k] = v
  3423. }
  3424. reqHeaders.Set("User-Agent", c.s.userAgent())
  3425. var body io.Reader = nil
  3426. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  3427. if err != nil {
  3428. return nil, err
  3429. }
  3430. reqHeaders.Set("Content-Type", "application/json")
  3431. c.urlParams_.Set("alt", alt)
  3432. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  3433. urls += "?" + c.urlParams_.Encode()
  3434. req, _ := http.NewRequest("PUT", urls, body)
  3435. req.Header = reqHeaders
  3436. googleapi.Expand(req.URL, map[string]string{
  3437. "project": c.project,
  3438. "compositeType": c.compositeType,
  3439. })
  3440. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3441. }
  3442. // Do executes the "deploymentmanager.compositeTypes.update" call.
  3443. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3444. // status code is an error. Response headers are in either
  3445. // *Operation.ServerResponse.Header or (if a response was returned at
  3446. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3447. // to check whether the returned error was because
  3448. // http.StatusNotModified was returned.
  3449. func (c *CompositeTypesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3450. gensupport.SetOptions(c.urlParams_, opts...)
  3451. res, err := c.doRequest("json")
  3452. if res != nil && res.StatusCode == http.StatusNotModified {
  3453. if res.Body != nil {
  3454. res.Body.Close()
  3455. }
  3456. return nil, &googleapi.Error{
  3457. Code: res.StatusCode,
  3458. Header: res.Header,
  3459. }
  3460. }
  3461. if err != nil {
  3462. return nil, err
  3463. }
  3464. defer googleapi.CloseBody(res)
  3465. if err := googleapi.CheckResponse(res); err != nil {
  3466. return nil, err
  3467. }
  3468. ret := &Operation{
  3469. ServerResponse: googleapi.ServerResponse{
  3470. Header: res.Header,
  3471. HTTPStatusCode: res.StatusCode,
  3472. },
  3473. }
  3474. target := &ret
  3475. if err := gensupport.DecodeResponse(target, res); err != nil {
  3476. return nil, err
  3477. }
  3478. return ret, nil
  3479. // {
  3480. // "description": "Updates a composite type.",
  3481. // "httpMethod": "PUT",
  3482. // "id": "deploymentmanager.compositeTypes.update",
  3483. // "parameterOrder": [
  3484. // "project",
  3485. // "compositeType"
  3486. // ],
  3487. // "parameters": {
  3488. // "compositeType": {
  3489. // "description": "The name of the composite type for this request.",
  3490. // "location": "path",
  3491. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  3492. // "required": true,
  3493. // "type": "string"
  3494. // },
  3495. // "project": {
  3496. // "description": "The project ID for this request.",
  3497. // "location": "path",
  3498. // "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])?))",
  3499. // "required": true,
  3500. // "type": "string"
  3501. // }
  3502. // },
  3503. // "path": "{project}/global/compositeTypes/{compositeType}",
  3504. // "request": {
  3505. // "$ref": "CompositeType"
  3506. // },
  3507. // "response": {
  3508. // "$ref": "Operation"
  3509. // },
  3510. // "scopes": [
  3511. // "https://www.googleapis.com/auth/cloud-platform",
  3512. // "https://www.googleapis.com/auth/ndev.cloudman"
  3513. // ]
  3514. // }
  3515. }
  3516. // method id "deploymentmanager.deployments.cancelPreview":
  3517. type DeploymentsCancelPreviewCall struct {
  3518. s *Service
  3519. project string
  3520. deployment string
  3521. deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest
  3522. urlParams_ gensupport.URLParams
  3523. ctx_ context.Context
  3524. header_ http.Header
  3525. }
  3526. // CancelPreview: Cancels and removes the preview currently associated
  3527. // with the deployment.
  3528. func (r *DeploymentsService) CancelPreview(project string, deployment string, deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest) *DeploymentsCancelPreviewCall {
  3529. c := &DeploymentsCancelPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3530. c.project = project
  3531. c.deployment = deployment
  3532. c.deploymentscancelpreviewrequest = deploymentscancelpreviewrequest
  3533. return c
  3534. }
  3535. // Fields allows partial responses to be retrieved. See
  3536. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3537. // for more information.
  3538. func (c *DeploymentsCancelPreviewCall) Fields(s ...googleapi.Field) *DeploymentsCancelPreviewCall {
  3539. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3540. return c
  3541. }
  3542. // Context sets the context to be used in this call's Do method. Any
  3543. // pending HTTP request will be aborted if the provided context is
  3544. // canceled.
  3545. func (c *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall {
  3546. c.ctx_ = ctx
  3547. return c
  3548. }
  3549. // Header returns an http.Header that can be modified by the caller to
  3550. // add HTTP headers to the request.
  3551. func (c *DeploymentsCancelPreviewCall) Header() http.Header {
  3552. if c.header_ == nil {
  3553. c.header_ = make(http.Header)
  3554. }
  3555. return c.header_
  3556. }
  3557. func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) {
  3558. reqHeaders := make(http.Header)
  3559. for k, v := range c.header_ {
  3560. reqHeaders[k] = v
  3561. }
  3562. reqHeaders.Set("User-Agent", c.s.userAgent())
  3563. var body io.Reader = nil
  3564. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest)
  3565. if err != nil {
  3566. return nil, err
  3567. }
  3568. reqHeaders.Set("Content-Type", "application/json")
  3569. c.urlParams_.Set("alt", alt)
  3570. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/cancelPreview")
  3571. urls += "?" + c.urlParams_.Encode()
  3572. req, _ := http.NewRequest("POST", urls, body)
  3573. req.Header = reqHeaders
  3574. googleapi.Expand(req.URL, map[string]string{
  3575. "project": c.project,
  3576. "deployment": c.deployment,
  3577. })
  3578. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3579. }
  3580. // Do executes the "deploymentmanager.deployments.cancelPreview" call.
  3581. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3582. // status code is an error. Response headers are in either
  3583. // *Operation.ServerResponse.Header or (if a response was returned at
  3584. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3585. // to check whether the returned error was because
  3586. // http.StatusNotModified was returned.
  3587. func (c *DeploymentsCancelPreviewCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3588. gensupport.SetOptions(c.urlParams_, opts...)
  3589. res, err := c.doRequest("json")
  3590. if res != nil && res.StatusCode == http.StatusNotModified {
  3591. if res.Body != nil {
  3592. res.Body.Close()
  3593. }
  3594. return nil, &googleapi.Error{
  3595. Code: res.StatusCode,
  3596. Header: res.Header,
  3597. }
  3598. }
  3599. if err != nil {
  3600. return nil, err
  3601. }
  3602. defer googleapi.CloseBody(res)
  3603. if err := googleapi.CheckResponse(res); err != nil {
  3604. return nil, err
  3605. }
  3606. ret := &Operation{
  3607. ServerResponse: googleapi.ServerResponse{
  3608. Header: res.Header,
  3609. HTTPStatusCode: res.StatusCode,
  3610. },
  3611. }
  3612. target := &ret
  3613. if err := gensupport.DecodeResponse(target, res); err != nil {
  3614. return nil, err
  3615. }
  3616. return ret, nil
  3617. // {
  3618. // "description": "Cancels and removes the preview currently associated with the deployment.",
  3619. // "httpMethod": "POST",
  3620. // "id": "deploymentmanager.deployments.cancelPreview",
  3621. // "parameterOrder": [
  3622. // "project",
  3623. // "deployment"
  3624. // ],
  3625. // "parameters": {
  3626. // "deployment": {
  3627. // "description": "The name of the deployment for this request.",
  3628. // "location": "path",
  3629. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  3630. // "required": true,
  3631. // "type": "string"
  3632. // },
  3633. // "project": {
  3634. // "description": "The project ID for this request.",
  3635. // "location": "path",
  3636. // "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])?))",
  3637. // "required": true,
  3638. // "type": "string"
  3639. // }
  3640. // },
  3641. // "path": "{project}/global/deployments/{deployment}/cancelPreview",
  3642. // "request": {
  3643. // "$ref": "DeploymentsCancelPreviewRequest"
  3644. // },
  3645. // "response": {
  3646. // "$ref": "Operation"
  3647. // },
  3648. // "scopes": [
  3649. // "https://www.googleapis.com/auth/cloud-platform",
  3650. // "https://www.googleapis.com/auth/ndev.cloudman"
  3651. // ]
  3652. // }
  3653. }
  3654. // method id "deploymentmanager.deployments.delete":
  3655. type DeploymentsDeleteCall struct {
  3656. s *Service
  3657. project string
  3658. deployment string
  3659. urlParams_ gensupport.URLParams
  3660. ctx_ context.Context
  3661. header_ http.Header
  3662. }
  3663. // Delete: Deletes a deployment and all of the resources in the
  3664. // deployment.
  3665. func (r *DeploymentsService) Delete(project string, deployment string) *DeploymentsDeleteCall {
  3666. c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3667. c.project = project
  3668. c.deployment = deployment
  3669. return c
  3670. }
  3671. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  3672. // policy to use for deleting resources.
  3673. //
  3674. // Possible values:
  3675. // "ABANDON"
  3676. // "DELETE" (default)
  3677. func (c *DeploymentsDeleteCall) DeletePolicy(deletePolicy string) *DeploymentsDeleteCall {
  3678. c.urlParams_.Set("deletePolicy", deletePolicy)
  3679. return c
  3680. }
  3681. // Fields allows partial responses to be retrieved. See
  3682. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3683. // for more information.
  3684. func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall {
  3685. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3686. return c
  3687. }
  3688. // Context sets the context to be used in this call's Do method. Any
  3689. // pending HTTP request will be aborted if the provided context is
  3690. // canceled.
  3691. func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
  3692. c.ctx_ = ctx
  3693. return c
  3694. }
  3695. // Header returns an http.Header that can be modified by the caller to
  3696. // add HTTP headers to the request.
  3697. func (c *DeploymentsDeleteCall) Header() http.Header {
  3698. if c.header_ == nil {
  3699. c.header_ = make(http.Header)
  3700. }
  3701. return c.header_
  3702. }
  3703. func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3704. reqHeaders := make(http.Header)
  3705. for k, v := range c.header_ {
  3706. reqHeaders[k] = v
  3707. }
  3708. reqHeaders.Set("User-Agent", c.s.userAgent())
  3709. var body io.Reader = nil
  3710. c.urlParams_.Set("alt", alt)
  3711. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  3712. urls += "?" + c.urlParams_.Encode()
  3713. req, _ := http.NewRequest("DELETE", urls, body)
  3714. req.Header = reqHeaders
  3715. googleapi.Expand(req.URL, map[string]string{
  3716. "project": c.project,
  3717. "deployment": c.deployment,
  3718. })
  3719. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3720. }
  3721. // Do executes the "deploymentmanager.deployments.delete" call.
  3722. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3723. // status code is an error. Response headers are in either
  3724. // *Operation.ServerResponse.Header or (if a response was returned at
  3725. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3726. // to check whether the returned error was because
  3727. // http.StatusNotModified was returned.
  3728. func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3729. gensupport.SetOptions(c.urlParams_, opts...)
  3730. res, err := c.doRequest("json")
  3731. if res != nil && res.StatusCode == http.StatusNotModified {
  3732. if res.Body != nil {
  3733. res.Body.Close()
  3734. }
  3735. return nil, &googleapi.Error{
  3736. Code: res.StatusCode,
  3737. Header: res.Header,
  3738. }
  3739. }
  3740. if err != nil {
  3741. return nil, err
  3742. }
  3743. defer googleapi.CloseBody(res)
  3744. if err := googleapi.CheckResponse(res); err != nil {
  3745. return nil, err
  3746. }
  3747. ret := &Operation{
  3748. ServerResponse: googleapi.ServerResponse{
  3749. Header: res.Header,
  3750. HTTPStatusCode: res.StatusCode,
  3751. },
  3752. }
  3753. target := &ret
  3754. if err := gensupport.DecodeResponse(target, res); err != nil {
  3755. return nil, err
  3756. }
  3757. return ret, nil
  3758. // {
  3759. // "description": "Deletes a deployment and all of the resources in the deployment.",
  3760. // "httpMethod": "DELETE",
  3761. // "id": "deploymentmanager.deployments.delete",
  3762. // "parameterOrder": [
  3763. // "project",
  3764. // "deployment"
  3765. // ],
  3766. // "parameters": {
  3767. // "deletePolicy": {
  3768. // "default": "DELETE",
  3769. // "description": "Sets the policy to use for deleting resources.",
  3770. // "enum": [
  3771. // "ABANDON",
  3772. // "DELETE"
  3773. // ],
  3774. // "enumDescriptions": [
  3775. // "",
  3776. // ""
  3777. // ],
  3778. // "location": "query",
  3779. // "type": "string"
  3780. // },
  3781. // "deployment": {
  3782. // "description": "The name of the deployment for this request.",
  3783. // "location": "path",
  3784. // "required": true,
  3785. // "type": "string"
  3786. // },
  3787. // "project": {
  3788. // "description": "The project ID for this request.",
  3789. // "location": "path",
  3790. // "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])?))",
  3791. // "required": true,
  3792. // "type": "string"
  3793. // }
  3794. // },
  3795. // "path": "{project}/global/deployments/{deployment}",
  3796. // "response": {
  3797. // "$ref": "Operation"
  3798. // },
  3799. // "scopes": [
  3800. // "https://www.googleapis.com/auth/cloud-platform",
  3801. // "https://www.googleapis.com/auth/ndev.cloudman"
  3802. // ]
  3803. // }
  3804. }
  3805. // method id "deploymentmanager.deployments.get":
  3806. type DeploymentsGetCall struct {
  3807. s *Service
  3808. project string
  3809. deployment string
  3810. urlParams_ gensupport.URLParams
  3811. ifNoneMatch_ string
  3812. ctx_ context.Context
  3813. header_ http.Header
  3814. }
  3815. // Get: Gets information about a specific deployment.
  3816. func (r *DeploymentsService) Get(project string, deployment string) *DeploymentsGetCall {
  3817. c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3818. c.project = project
  3819. c.deployment = deployment
  3820. return c
  3821. }
  3822. // Fields allows partial responses to be retrieved. See
  3823. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3824. // for more information.
  3825. func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall {
  3826. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3827. return c
  3828. }
  3829. // IfNoneMatch sets the optional parameter which makes the operation
  3830. // fail if the object's ETag matches the given value. This is useful for
  3831. // getting updates only after the object has changed since the last
  3832. // request. Use googleapi.IsNotModified to check whether the response
  3833. // error from Do is the result of In-None-Match.
  3834. func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall {
  3835. c.ifNoneMatch_ = entityTag
  3836. return c
  3837. }
  3838. // Context sets the context to be used in this call's Do method. Any
  3839. // pending HTTP request will be aborted if the provided context is
  3840. // canceled.
  3841. func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
  3842. c.ctx_ = ctx
  3843. return c
  3844. }
  3845. // Header returns an http.Header that can be modified by the caller to
  3846. // add HTTP headers to the request.
  3847. func (c *DeploymentsGetCall) Header() http.Header {
  3848. if c.header_ == nil {
  3849. c.header_ = make(http.Header)
  3850. }
  3851. return c.header_
  3852. }
  3853. func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  3854. reqHeaders := make(http.Header)
  3855. for k, v := range c.header_ {
  3856. reqHeaders[k] = v
  3857. }
  3858. reqHeaders.Set("User-Agent", c.s.userAgent())
  3859. if c.ifNoneMatch_ != "" {
  3860. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3861. }
  3862. var body io.Reader = nil
  3863. c.urlParams_.Set("alt", alt)
  3864. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  3865. urls += "?" + c.urlParams_.Encode()
  3866. req, _ := http.NewRequest("GET", urls, body)
  3867. req.Header = reqHeaders
  3868. googleapi.Expand(req.URL, map[string]string{
  3869. "project": c.project,
  3870. "deployment": c.deployment,
  3871. })
  3872. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3873. }
  3874. // Do executes the "deploymentmanager.deployments.get" call.
  3875. // Exactly one of *Deployment or error will be non-nil. Any non-2xx
  3876. // status code is an error. Response headers are in either
  3877. // *Deployment.ServerResponse.Header or (if a response was returned at
  3878. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3879. // to check whether the returned error was because
  3880. // http.StatusNotModified was returned.
  3881. func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
  3882. gensupport.SetOptions(c.urlParams_, opts...)
  3883. res, err := c.doRequest("json")
  3884. if res != nil && res.StatusCode == http.StatusNotModified {
  3885. if res.Body != nil {
  3886. res.Body.Close()
  3887. }
  3888. return nil, &googleapi.Error{
  3889. Code: res.StatusCode,
  3890. Header: res.Header,
  3891. }
  3892. }
  3893. if err != nil {
  3894. return nil, err
  3895. }
  3896. defer googleapi.CloseBody(res)
  3897. if err := googleapi.CheckResponse(res); err != nil {
  3898. return nil, err
  3899. }
  3900. ret := &Deployment{
  3901. ServerResponse: googleapi.ServerResponse{
  3902. Header: res.Header,
  3903. HTTPStatusCode: res.StatusCode,
  3904. },
  3905. }
  3906. target := &ret
  3907. if err := gensupport.DecodeResponse(target, res); err != nil {
  3908. return nil, err
  3909. }
  3910. return ret, nil
  3911. // {
  3912. // "description": "Gets information about a specific deployment.",
  3913. // "httpMethod": "GET",
  3914. // "id": "deploymentmanager.deployments.get",
  3915. // "parameterOrder": [
  3916. // "project",
  3917. // "deployment"
  3918. // ],
  3919. // "parameters": {
  3920. // "deployment": {
  3921. // "description": "The name of the deployment for this request.",
  3922. // "location": "path",
  3923. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  3924. // "required": true,
  3925. // "type": "string"
  3926. // },
  3927. // "project": {
  3928. // "description": "The project ID for this request.",
  3929. // "location": "path",
  3930. // "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])?))",
  3931. // "required": true,
  3932. // "type": "string"
  3933. // }
  3934. // },
  3935. // "path": "{project}/global/deployments/{deployment}",
  3936. // "response": {
  3937. // "$ref": "Deployment"
  3938. // },
  3939. // "scopes": [
  3940. // "https://www.googleapis.com/auth/cloud-platform",
  3941. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  3942. // "https://www.googleapis.com/auth/ndev.cloudman",
  3943. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  3944. // ]
  3945. // }
  3946. }
  3947. // method id "deploymentmanager.deployments.getIamPolicy":
  3948. type DeploymentsGetIamPolicyCall struct {
  3949. s *Service
  3950. project string
  3951. resource string
  3952. urlParams_ gensupport.URLParams
  3953. ifNoneMatch_ string
  3954. ctx_ context.Context
  3955. header_ http.Header
  3956. }
  3957. // GetIamPolicy: Gets the access control policy for a resource. May be
  3958. // empty if no such policy or resource exists.
  3959. func (r *DeploymentsService) GetIamPolicy(project string, resource string) *DeploymentsGetIamPolicyCall {
  3960. c := &DeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3961. c.project = project
  3962. c.resource = resource
  3963. return c
  3964. }
  3965. // Fields allows partial responses to be retrieved. See
  3966. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3967. // for more information.
  3968. func (c *DeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsGetIamPolicyCall {
  3969. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3970. return c
  3971. }
  3972. // IfNoneMatch sets the optional parameter which makes the operation
  3973. // fail if the object's ETag matches the given value. This is useful for
  3974. // getting updates only after the object has changed since the last
  3975. // request. Use googleapi.IsNotModified to check whether the response
  3976. // error from Do is the result of In-None-Match.
  3977. func (c *DeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *DeploymentsGetIamPolicyCall {
  3978. c.ifNoneMatch_ = entityTag
  3979. return c
  3980. }
  3981. // Context sets the context to be used in this call's Do method. Any
  3982. // pending HTTP request will be aborted if the provided context is
  3983. // canceled.
  3984. func (c *DeploymentsGetIamPolicyCall) Context(ctx context.Context) *DeploymentsGetIamPolicyCall {
  3985. c.ctx_ = ctx
  3986. return c
  3987. }
  3988. // Header returns an http.Header that can be modified by the caller to
  3989. // add HTTP headers to the request.
  3990. func (c *DeploymentsGetIamPolicyCall) Header() http.Header {
  3991. if c.header_ == nil {
  3992. c.header_ = make(http.Header)
  3993. }
  3994. return c.header_
  3995. }
  3996. func (c *DeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3997. reqHeaders := make(http.Header)
  3998. for k, v := range c.header_ {
  3999. reqHeaders[k] = v
  4000. }
  4001. reqHeaders.Set("User-Agent", c.s.userAgent())
  4002. if c.ifNoneMatch_ != "" {
  4003. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4004. }
  4005. var body io.Reader = nil
  4006. c.urlParams_.Set("alt", alt)
  4007. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/getIamPolicy")
  4008. urls += "?" + c.urlParams_.Encode()
  4009. req, _ := http.NewRequest("GET", urls, body)
  4010. req.Header = reqHeaders
  4011. googleapi.Expand(req.URL, map[string]string{
  4012. "project": c.project,
  4013. "resource": c.resource,
  4014. })
  4015. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4016. }
  4017. // Do executes the "deploymentmanager.deployments.getIamPolicy" call.
  4018. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4019. // code is an error. Response headers are in either
  4020. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4021. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4022. // check whether the returned error was because http.StatusNotModified
  4023. // was returned.
  4024. func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4025. gensupport.SetOptions(c.urlParams_, opts...)
  4026. res, err := c.doRequest("json")
  4027. if res != nil && res.StatusCode == http.StatusNotModified {
  4028. if res.Body != nil {
  4029. res.Body.Close()
  4030. }
  4031. return nil, &googleapi.Error{
  4032. Code: res.StatusCode,
  4033. Header: res.Header,
  4034. }
  4035. }
  4036. if err != nil {
  4037. return nil, err
  4038. }
  4039. defer googleapi.CloseBody(res)
  4040. if err := googleapi.CheckResponse(res); err != nil {
  4041. return nil, err
  4042. }
  4043. ret := &Policy{
  4044. ServerResponse: googleapi.ServerResponse{
  4045. Header: res.Header,
  4046. HTTPStatusCode: res.StatusCode,
  4047. },
  4048. }
  4049. target := &ret
  4050. if err := gensupport.DecodeResponse(target, res); err != nil {
  4051. return nil, err
  4052. }
  4053. return ret, nil
  4054. // {
  4055. // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
  4056. // "httpMethod": "GET",
  4057. // "id": "deploymentmanager.deployments.getIamPolicy",
  4058. // "parameterOrder": [
  4059. // "project",
  4060. // "resource"
  4061. // ],
  4062. // "parameters": {
  4063. // "project": {
  4064. // "description": "Project ID for this request.",
  4065. // "location": "path",
  4066. // "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])?))",
  4067. // "required": true,
  4068. // "type": "string"
  4069. // },
  4070. // "resource": {
  4071. // "description": "Name of the resource for this request.",
  4072. // "location": "path",
  4073. // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
  4074. // "required": true,
  4075. // "type": "string"
  4076. // }
  4077. // },
  4078. // "path": "{project}/global/deployments/{resource}/getIamPolicy",
  4079. // "response": {
  4080. // "$ref": "Policy"
  4081. // },
  4082. // "scopes": [
  4083. // "https://www.googleapis.com/auth/cloud-platform",
  4084. // "https://www.googleapis.com/auth/ndev.cloudman"
  4085. // ]
  4086. // }
  4087. }
  4088. // method id "deploymentmanager.deployments.insert":
  4089. type DeploymentsInsertCall struct {
  4090. s *Service
  4091. project string
  4092. deployment *Deployment
  4093. urlParams_ gensupport.URLParams
  4094. ctx_ context.Context
  4095. header_ http.Header
  4096. }
  4097. // Insert: Creates a deployment and all of the resources described by
  4098. // the deployment manifest.
  4099. func (r *DeploymentsService) Insert(project string, deployment *Deployment) *DeploymentsInsertCall {
  4100. c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4101. c.project = project
  4102. c.deployment = deployment
  4103. return c
  4104. }
  4105. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  4106. // policy to use for creating new resources.
  4107. //
  4108. // Possible values:
  4109. // "ACQUIRE"
  4110. // "CREATE"
  4111. // "CREATE_OR_ACQUIRE" (default)
  4112. func (c *DeploymentsInsertCall) CreatePolicy(createPolicy string) *DeploymentsInsertCall {
  4113. c.urlParams_.Set("createPolicy", createPolicy)
  4114. return c
  4115. }
  4116. // Preview sets the optional parameter "preview": If set to true,
  4117. // creates a deployment and creates "shell" resources but does not
  4118. // actually instantiate these resources. This allows you to preview what
  4119. // your deployment looks like. After previewing a deployment, you can
  4120. // deploy your resources by making a request with the update() method or
  4121. // you can use the cancelPreview() method to cancel the preview
  4122. // altogether. Note that the deployment will still exist after you
  4123. // cancel the preview and you must separately delete this deployment if
  4124. // you want to remove it.
  4125. func (c *DeploymentsInsertCall) Preview(preview bool) *DeploymentsInsertCall {
  4126. c.urlParams_.Set("preview", fmt.Sprint(preview))
  4127. return c
  4128. }
  4129. // Fields allows partial responses to be retrieved. See
  4130. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4131. // for more information.
  4132. func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall {
  4133. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4134. return c
  4135. }
  4136. // Context sets the context to be used in this call's Do method. Any
  4137. // pending HTTP request will be aborted if the provided context is
  4138. // canceled.
  4139. func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
  4140. c.ctx_ = ctx
  4141. return c
  4142. }
  4143. // Header returns an http.Header that can be modified by the caller to
  4144. // add HTTP headers to the request.
  4145. func (c *DeploymentsInsertCall) Header() http.Header {
  4146. if c.header_ == nil {
  4147. c.header_ = make(http.Header)
  4148. }
  4149. return c.header_
  4150. }
  4151. func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
  4152. reqHeaders := make(http.Header)
  4153. for k, v := range c.header_ {
  4154. reqHeaders[k] = v
  4155. }
  4156. reqHeaders.Set("User-Agent", c.s.userAgent())
  4157. var body io.Reader = nil
  4158. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
  4159. if err != nil {
  4160. return nil, err
  4161. }
  4162. reqHeaders.Set("Content-Type", "application/json")
  4163. c.urlParams_.Set("alt", alt)
  4164. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
  4165. urls += "?" + c.urlParams_.Encode()
  4166. req, _ := http.NewRequest("POST", urls, body)
  4167. req.Header = reqHeaders
  4168. googleapi.Expand(req.URL, map[string]string{
  4169. "project": c.project,
  4170. })
  4171. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4172. }
  4173. // Do executes the "deploymentmanager.deployments.insert" call.
  4174. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4175. // status code is an error. Response headers are in either
  4176. // *Operation.ServerResponse.Header or (if a response was returned at
  4177. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4178. // to check whether the returned error was because
  4179. // http.StatusNotModified was returned.
  4180. func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4181. gensupport.SetOptions(c.urlParams_, opts...)
  4182. res, err := c.doRequest("json")
  4183. if res != nil && res.StatusCode == http.StatusNotModified {
  4184. if res.Body != nil {
  4185. res.Body.Close()
  4186. }
  4187. return nil, &googleapi.Error{
  4188. Code: res.StatusCode,
  4189. Header: res.Header,
  4190. }
  4191. }
  4192. if err != nil {
  4193. return nil, err
  4194. }
  4195. defer googleapi.CloseBody(res)
  4196. if err := googleapi.CheckResponse(res); err != nil {
  4197. return nil, err
  4198. }
  4199. ret := &Operation{
  4200. ServerResponse: googleapi.ServerResponse{
  4201. Header: res.Header,
  4202. HTTPStatusCode: res.StatusCode,
  4203. },
  4204. }
  4205. target := &ret
  4206. if err := gensupport.DecodeResponse(target, res); err != nil {
  4207. return nil, err
  4208. }
  4209. return ret, nil
  4210. // {
  4211. // "description": "Creates a deployment and all of the resources described by the deployment manifest.",
  4212. // "httpMethod": "POST",
  4213. // "id": "deploymentmanager.deployments.insert",
  4214. // "parameterOrder": [
  4215. // "project"
  4216. // ],
  4217. // "parameters": {
  4218. // "createPolicy": {
  4219. // "default": "CREATE_OR_ACQUIRE",
  4220. // "description": "Sets the policy to use for creating new resources.",
  4221. // "enum": [
  4222. // "ACQUIRE",
  4223. // "CREATE",
  4224. // "CREATE_OR_ACQUIRE"
  4225. // ],
  4226. // "enumDescriptions": [
  4227. // "",
  4228. // "",
  4229. // ""
  4230. // ],
  4231. // "location": "query",
  4232. // "type": "string"
  4233. // },
  4234. // "preview": {
  4235. // "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.",
  4236. // "location": "query",
  4237. // "type": "boolean"
  4238. // },
  4239. // "project": {
  4240. // "description": "The project ID for this request.",
  4241. // "location": "path",
  4242. // "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])?))",
  4243. // "required": true,
  4244. // "type": "string"
  4245. // }
  4246. // },
  4247. // "path": "{project}/global/deployments",
  4248. // "request": {
  4249. // "$ref": "Deployment"
  4250. // },
  4251. // "response": {
  4252. // "$ref": "Operation"
  4253. // },
  4254. // "scopes": [
  4255. // "https://www.googleapis.com/auth/cloud-platform",
  4256. // "https://www.googleapis.com/auth/ndev.cloudman"
  4257. // ]
  4258. // }
  4259. }
  4260. // method id "deploymentmanager.deployments.list":
  4261. type DeploymentsListCall struct {
  4262. s *Service
  4263. project string
  4264. urlParams_ gensupport.URLParams
  4265. ifNoneMatch_ string
  4266. ctx_ context.Context
  4267. header_ http.Header
  4268. }
  4269. // List: Lists all deployments for a given project.
  4270. func (r *DeploymentsService) List(project string) *DeploymentsListCall {
  4271. c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4272. c.project = project
  4273. return c
  4274. }
  4275. // Filter sets the optional parameter "filter": A filter expression that
  4276. // filters resources listed in the response. The expression must specify
  4277. // the field name, a comparison operator, and the value that you want to
  4278. // use for filtering. The value must be a string, a number, or a
  4279. // boolean. The comparison operator must be either =, !=, >, or <.
  4280. //
  4281. // For example, if you are filtering Compute Engine instances, you can
  4282. // exclude instances named example-instance by specifying name !=
  4283. // example-instance.
  4284. //
  4285. // You can also filter nested fields. For example, you could specify
  4286. // scheduling.automaticRestart = false to include instances only if they
  4287. // are not scheduled for automatic restarts. You can use filtering on
  4288. // nested fields to filter based on resource labels.
  4289. //
  4290. // To filter on multiple expressions, provide each separate expression
  4291. // within parentheses. For example, (scheduling.automaticRestart = true)
  4292. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  4293. // AND expression. However, you can include AND and OR expressions
  4294. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  4295. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  4296. // true).
  4297. func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall {
  4298. c.urlParams_.Set("filter", filter)
  4299. return c
  4300. }
  4301. // MaxResults sets the optional parameter "maxResults": The maximum
  4302. // number of results per page that should be returned. If the number of
  4303. // available results is larger than maxResults, Compute Engine returns a
  4304. // nextPageToken that can be used to get the next page of results in
  4305. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  4306. // (Default: 500)
  4307. func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall {
  4308. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4309. return c
  4310. }
  4311. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  4312. // a certain order. By default, results are returned in alphanumerical
  4313. // order based on the resource name.
  4314. //
  4315. // You can also sort results in descending order based on the creation
  4316. // timestamp using orderBy="creationTimestamp desc". This sorts results
  4317. // based on the creationTimestamp field in reverse chronological order
  4318. // (newest result first). Use this to sort resources like operations so
  4319. // that the newest operation is returned first.
  4320. //
  4321. // Currently, only sorting by name or creationTimestamp desc is
  4322. // supported.
  4323. func (c *DeploymentsListCall) OrderBy(orderBy string) *DeploymentsListCall {
  4324. c.urlParams_.Set("orderBy", orderBy)
  4325. return c
  4326. }
  4327. // PageToken sets the optional parameter "pageToken": Specifies a page
  4328. // token to use. Set pageToken to the nextPageToken returned by a
  4329. // previous list request to get the next page of results.
  4330. func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall {
  4331. c.urlParams_.Set("pageToken", pageToken)
  4332. return c
  4333. }
  4334. // Fields allows partial responses to be retrieved. See
  4335. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4336. // for more information.
  4337. func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall {
  4338. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4339. return c
  4340. }
  4341. // IfNoneMatch sets the optional parameter which makes the operation
  4342. // fail if the object's ETag matches the given value. This is useful for
  4343. // getting updates only after the object has changed since the last
  4344. // request. Use googleapi.IsNotModified to check whether the response
  4345. // error from Do is the result of In-None-Match.
  4346. func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall {
  4347. c.ifNoneMatch_ = entityTag
  4348. return c
  4349. }
  4350. // Context sets the context to be used in this call's Do method. Any
  4351. // pending HTTP request will be aborted if the provided context is
  4352. // canceled.
  4353. func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
  4354. c.ctx_ = ctx
  4355. return c
  4356. }
  4357. // Header returns an http.Header that can be modified by the caller to
  4358. // add HTTP headers to the request.
  4359. func (c *DeploymentsListCall) Header() http.Header {
  4360. if c.header_ == nil {
  4361. c.header_ = make(http.Header)
  4362. }
  4363. return c.header_
  4364. }
  4365. func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  4366. reqHeaders := make(http.Header)
  4367. for k, v := range c.header_ {
  4368. reqHeaders[k] = v
  4369. }
  4370. reqHeaders.Set("User-Agent", c.s.userAgent())
  4371. if c.ifNoneMatch_ != "" {
  4372. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4373. }
  4374. var body io.Reader = nil
  4375. c.urlParams_.Set("alt", alt)
  4376. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
  4377. urls += "?" + c.urlParams_.Encode()
  4378. req, _ := http.NewRequest("GET", urls, body)
  4379. req.Header = reqHeaders
  4380. googleapi.Expand(req.URL, map[string]string{
  4381. "project": c.project,
  4382. })
  4383. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4384. }
  4385. // Do executes the "deploymentmanager.deployments.list" call.
  4386. // Exactly one of *DeploymentsListResponse or error will be non-nil. Any
  4387. // non-2xx status code is an error. Response headers are in either
  4388. // *DeploymentsListResponse.ServerResponse.Header or (if a response was
  4389. // returned at all) in error.(*googleapi.Error).Header. Use
  4390. // googleapi.IsNotModified to check whether the returned error was
  4391. // because http.StatusNotModified was returned.
  4392. func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) {
  4393. gensupport.SetOptions(c.urlParams_, opts...)
  4394. res, err := c.doRequest("json")
  4395. if res != nil && res.StatusCode == http.StatusNotModified {
  4396. if res.Body != nil {
  4397. res.Body.Close()
  4398. }
  4399. return nil, &googleapi.Error{
  4400. Code: res.StatusCode,
  4401. Header: res.Header,
  4402. }
  4403. }
  4404. if err != nil {
  4405. return nil, err
  4406. }
  4407. defer googleapi.CloseBody(res)
  4408. if err := googleapi.CheckResponse(res); err != nil {
  4409. return nil, err
  4410. }
  4411. ret := &DeploymentsListResponse{
  4412. ServerResponse: googleapi.ServerResponse{
  4413. Header: res.Header,
  4414. HTTPStatusCode: res.StatusCode,
  4415. },
  4416. }
  4417. target := &ret
  4418. if err := gensupport.DecodeResponse(target, res); err != nil {
  4419. return nil, err
  4420. }
  4421. return ret, nil
  4422. // {
  4423. // "description": "Lists all deployments for a given project.",
  4424. // "httpMethod": "GET",
  4425. // "id": "deploymentmanager.deployments.list",
  4426. // "parameterOrder": [
  4427. // "project"
  4428. // ],
  4429. // "parameters": {
  4430. // "filter": {
  4431. // "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).",
  4432. // "location": "query",
  4433. // "type": "string"
  4434. // },
  4435. // "maxResults": {
  4436. // "default": "500",
  4437. // "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)",
  4438. // "format": "uint32",
  4439. // "location": "query",
  4440. // "minimum": "0",
  4441. // "type": "integer"
  4442. // },
  4443. // "orderBy": {
  4444. // "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.",
  4445. // "location": "query",
  4446. // "type": "string"
  4447. // },
  4448. // "pageToken": {
  4449. // "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.",
  4450. // "location": "query",
  4451. // "type": "string"
  4452. // },
  4453. // "project": {
  4454. // "description": "The project ID for this request.",
  4455. // "location": "path",
  4456. // "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])?))",
  4457. // "required": true,
  4458. // "type": "string"
  4459. // }
  4460. // },
  4461. // "path": "{project}/global/deployments",
  4462. // "response": {
  4463. // "$ref": "DeploymentsListResponse"
  4464. // },
  4465. // "scopes": [
  4466. // "https://www.googleapis.com/auth/cloud-platform",
  4467. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  4468. // "https://www.googleapis.com/auth/ndev.cloudman",
  4469. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  4470. // ]
  4471. // }
  4472. }
  4473. // Pages invokes f for each page of results.
  4474. // A non-nil error returned from f will halt the iteration.
  4475. // The provided context supersedes any context provided to the Context method.
  4476. func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error {
  4477. c.ctx_ = ctx
  4478. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4479. for {
  4480. x, err := c.Do()
  4481. if err != nil {
  4482. return err
  4483. }
  4484. if err := f(x); err != nil {
  4485. return err
  4486. }
  4487. if x.NextPageToken == "" {
  4488. return nil
  4489. }
  4490. c.PageToken(x.NextPageToken)
  4491. }
  4492. }
  4493. // method id "deploymentmanager.deployments.patch":
  4494. type DeploymentsPatchCall struct {
  4495. s *Service
  4496. project string
  4497. deployment string
  4498. deployment2 *Deployment
  4499. urlParams_ gensupport.URLParams
  4500. ctx_ context.Context
  4501. header_ http.Header
  4502. }
  4503. // Patch: Updates a deployment and all of the resources described by the
  4504. // deployment manifest. This method supports patch semantics.
  4505. func (r *DeploymentsService) Patch(project string, deployment string, deployment2 *Deployment) *DeploymentsPatchCall {
  4506. c := &DeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4507. c.project = project
  4508. c.deployment = deployment
  4509. c.deployment2 = deployment2
  4510. return c
  4511. }
  4512. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  4513. // policy to use for creating new resources.
  4514. //
  4515. // Possible values:
  4516. // "ACQUIRE"
  4517. // "CREATE"
  4518. // "CREATE_OR_ACQUIRE" (default)
  4519. func (c *DeploymentsPatchCall) CreatePolicy(createPolicy string) *DeploymentsPatchCall {
  4520. c.urlParams_.Set("createPolicy", createPolicy)
  4521. return c
  4522. }
  4523. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  4524. // policy to use for deleting resources.
  4525. //
  4526. // Possible values:
  4527. // "ABANDON"
  4528. // "DELETE" (default)
  4529. func (c *DeploymentsPatchCall) DeletePolicy(deletePolicy string) *DeploymentsPatchCall {
  4530. c.urlParams_.Set("deletePolicy", deletePolicy)
  4531. return c
  4532. }
  4533. // Preview sets the optional parameter "preview": If set to true,
  4534. // updates the deployment and creates and updates the "shell" resources
  4535. // but does not actually alter or instantiate these resources. This
  4536. // allows you to preview what your deployment will look like. You can
  4537. // use this intent to preview how an update would affect your
  4538. // deployment. You must provide a target.config with a configuration if
  4539. // this is set to true. After previewing a deployment, you can deploy
  4540. // your resources by making a request with the update() or you can
  4541. // cancelPreview() to remove the preview altogether. Note that the
  4542. // deployment will still exist after you cancel the preview and you must
  4543. // separately delete this deployment if you want to remove it.
  4544. func (c *DeploymentsPatchCall) Preview(preview bool) *DeploymentsPatchCall {
  4545. c.urlParams_.Set("preview", fmt.Sprint(preview))
  4546. return c
  4547. }
  4548. // Fields allows partial responses to be retrieved. See
  4549. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4550. // for more information.
  4551. func (c *DeploymentsPatchCall) Fields(s ...googleapi.Field) *DeploymentsPatchCall {
  4552. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4553. return c
  4554. }
  4555. // Context sets the context to be used in this call's Do method. Any
  4556. // pending HTTP request will be aborted if the provided context is
  4557. // canceled.
  4558. func (c *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall {
  4559. c.ctx_ = ctx
  4560. return c
  4561. }
  4562. // Header returns an http.Header that can be modified by the caller to
  4563. // add HTTP headers to the request.
  4564. func (c *DeploymentsPatchCall) Header() http.Header {
  4565. if c.header_ == nil {
  4566. c.header_ = make(http.Header)
  4567. }
  4568. return c.header_
  4569. }
  4570. func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
  4571. reqHeaders := make(http.Header)
  4572. for k, v := range c.header_ {
  4573. reqHeaders[k] = v
  4574. }
  4575. reqHeaders.Set("User-Agent", c.s.userAgent())
  4576. var body io.Reader = nil
  4577. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
  4578. if err != nil {
  4579. return nil, err
  4580. }
  4581. reqHeaders.Set("Content-Type", "application/json")
  4582. c.urlParams_.Set("alt", alt)
  4583. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  4584. urls += "?" + c.urlParams_.Encode()
  4585. req, _ := http.NewRequest("PATCH", urls, body)
  4586. req.Header = reqHeaders
  4587. googleapi.Expand(req.URL, map[string]string{
  4588. "project": c.project,
  4589. "deployment": c.deployment,
  4590. })
  4591. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4592. }
  4593. // Do executes the "deploymentmanager.deployments.patch" call.
  4594. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4595. // status code is an error. Response headers are in either
  4596. // *Operation.ServerResponse.Header or (if a response was returned at
  4597. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4598. // to check whether the returned error was because
  4599. // http.StatusNotModified was returned.
  4600. func (c *DeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4601. gensupport.SetOptions(c.urlParams_, opts...)
  4602. res, err := c.doRequest("json")
  4603. if res != nil && res.StatusCode == http.StatusNotModified {
  4604. if res.Body != nil {
  4605. res.Body.Close()
  4606. }
  4607. return nil, &googleapi.Error{
  4608. Code: res.StatusCode,
  4609. Header: res.Header,
  4610. }
  4611. }
  4612. if err != nil {
  4613. return nil, err
  4614. }
  4615. defer googleapi.CloseBody(res)
  4616. if err := googleapi.CheckResponse(res); err != nil {
  4617. return nil, err
  4618. }
  4619. ret := &Operation{
  4620. ServerResponse: googleapi.ServerResponse{
  4621. Header: res.Header,
  4622. HTTPStatusCode: res.StatusCode,
  4623. },
  4624. }
  4625. target := &ret
  4626. if err := gensupport.DecodeResponse(target, res); err != nil {
  4627. return nil, err
  4628. }
  4629. return ret, nil
  4630. // {
  4631. // "description": "Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.",
  4632. // "httpMethod": "PATCH",
  4633. // "id": "deploymentmanager.deployments.patch",
  4634. // "parameterOrder": [
  4635. // "project",
  4636. // "deployment"
  4637. // ],
  4638. // "parameters": {
  4639. // "createPolicy": {
  4640. // "default": "CREATE_OR_ACQUIRE",
  4641. // "description": "Sets the policy to use for creating new resources.",
  4642. // "enum": [
  4643. // "ACQUIRE",
  4644. // "CREATE",
  4645. // "CREATE_OR_ACQUIRE"
  4646. // ],
  4647. // "enumDescriptions": [
  4648. // "",
  4649. // "",
  4650. // ""
  4651. // ],
  4652. // "location": "query",
  4653. // "type": "string"
  4654. // },
  4655. // "deletePolicy": {
  4656. // "default": "DELETE",
  4657. // "description": "Sets the policy to use for deleting resources.",
  4658. // "enum": [
  4659. // "ABANDON",
  4660. // "DELETE"
  4661. // ],
  4662. // "enumDescriptions": [
  4663. // "",
  4664. // ""
  4665. // ],
  4666. // "location": "query",
  4667. // "type": "string"
  4668. // },
  4669. // "deployment": {
  4670. // "description": "The name of the deployment for this request.",
  4671. // "location": "path",
  4672. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  4673. // "required": true,
  4674. // "type": "string"
  4675. // },
  4676. // "preview": {
  4677. // "default": "false",
  4678. // "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.",
  4679. // "location": "query",
  4680. // "type": "boolean"
  4681. // },
  4682. // "project": {
  4683. // "description": "The project ID for this request.",
  4684. // "location": "path",
  4685. // "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])?))",
  4686. // "required": true,
  4687. // "type": "string"
  4688. // }
  4689. // },
  4690. // "path": "{project}/global/deployments/{deployment}",
  4691. // "request": {
  4692. // "$ref": "Deployment"
  4693. // },
  4694. // "response": {
  4695. // "$ref": "Operation"
  4696. // },
  4697. // "scopes": [
  4698. // "https://www.googleapis.com/auth/cloud-platform",
  4699. // "https://www.googleapis.com/auth/ndev.cloudman"
  4700. // ]
  4701. // }
  4702. }
  4703. // method id "deploymentmanager.deployments.setIamPolicy":
  4704. type DeploymentsSetIamPolicyCall struct {
  4705. s *Service
  4706. project string
  4707. resource string
  4708. globalsetpolicyrequest *GlobalSetPolicyRequest
  4709. urlParams_ gensupport.URLParams
  4710. ctx_ context.Context
  4711. header_ http.Header
  4712. }
  4713. // SetIamPolicy: Sets the access control policy on the specified
  4714. // resource. Replaces any existing policy.
  4715. func (r *DeploymentsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *DeploymentsSetIamPolicyCall {
  4716. c := &DeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4717. c.project = project
  4718. c.resource = resource
  4719. c.globalsetpolicyrequest = globalsetpolicyrequest
  4720. return c
  4721. }
  4722. // Fields allows partial responses to be retrieved. See
  4723. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4724. // for more information.
  4725. func (c *DeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsSetIamPolicyCall {
  4726. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4727. return c
  4728. }
  4729. // Context sets the context to be used in this call's Do method. Any
  4730. // pending HTTP request will be aborted if the provided context is
  4731. // canceled.
  4732. func (c *DeploymentsSetIamPolicyCall) Context(ctx context.Context) *DeploymentsSetIamPolicyCall {
  4733. c.ctx_ = ctx
  4734. return c
  4735. }
  4736. // Header returns an http.Header that can be modified by the caller to
  4737. // add HTTP headers to the request.
  4738. func (c *DeploymentsSetIamPolicyCall) Header() http.Header {
  4739. if c.header_ == nil {
  4740. c.header_ = make(http.Header)
  4741. }
  4742. return c.header_
  4743. }
  4744. func (c *DeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4745. reqHeaders := make(http.Header)
  4746. for k, v := range c.header_ {
  4747. reqHeaders[k] = v
  4748. }
  4749. reqHeaders.Set("User-Agent", c.s.userAgent())
  4750. var body io.Reader = nil
  4751. body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
  4752. if err != nil {
  4753. return nil, err
  4754. }
  4755. reqHeaders.Set("Content-Type", "application/json")
  4756. c.urlParams_.Set("alt", alt)
  4757. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/setIamPolicy")
  4758. urls += "?" + c.urlParams_.Encode()
  4759. req, _ := http.NewRequest("POST", urls, body)
  4760. req.Header = reqHeaders
  4761. googleapi.Expand(req.URL, map[string]string{
  4762. "project": c.project,
  4763. "resource": c.resource,
  4764. })
  4765. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4766. }
  4767. // Do executes the "deploymentmanager.deployments.setIamPolicy" call.
  4768. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4769. // code is an error. Response headers are in either
  4770. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4771. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4772. // check whether the returned error was because http.StatusNotModified
  4773. // was returned.
  4774. func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4775. gensupport.SetOptions(c.urlParams_, opts...)
  4776. res, err := c.doRequest("json")
  4777. if res != nil && res.StatusCode == http.StatusNotModified {
  4778. if res.Body != nil {
  4779. res.Body.Close()
  4780. }
  4781. return nil, &googleapi.Error{
  4782. Code: res.StatusCode,
  4783. Header: res.Header,
  4784. }
  4785. }
  4786. if err != nil {
  4787. return nil, err
  4788. }
  4789. defer googleapi.CloseBody(res)
  4790. if err := googleapi.CheckResponse(res); err != nil {
  4791. return nil, err
  4792. }
  4793. ret := &Policy{
  4794. ServerResponse: googleapi.ServerResponse{
  4795. Header: res.Header,
  4796. HTTPStatusCode: res.StatusCode,
  4797. },
  4798. }
  4799. target := &ret
  4800. if err := gensupport.DecodeResponse(target, res); err != nil {
  4801. return nil, err
  4802. }
  4803. return ret, nil
  4804. // {
  4805. // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
  4806. // "httpMethod": "POST",
  4807. // "id": "deploymentmanager.deployments.setIamPolicy",
  4808. // "parameterOrder": [
  4809. // "project",
  4810. // "resource"
  4811. // ],
  4812. // "parameters": {
  4813. // "project": {
  4814. // "description": "Project ID for this request.",
  4815. // "location": "path",
  4816. // "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])?))",
  4817. // "required": true,
  4818. // "type": "string"
  4819. // },
  4820. // "resource": {
  4821. // "description": "Name of the resource for this request.",
  4822. // "location": "path",
  4823. // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
  4824. // "required": true,
  4825. // "type": "string"
  4826. // }
  4827. // },
  4828. // "path": "{project}/global/deployments/{resource}/setIamPolicy",
  4829. // "request": {
  4830. // "$ref": "GlobalSetPolicyRequest"
  4831. // },
  4832. // "response": {
  4833. // "$ref": "Policy"
  4834. // },
  4835. // "scopes": [
  4836. // "https://www.googleapis.com/auth/cloud-platform",
  4837. // "https://www.googleapis.com/auth/ndev.cloudman"
  4838. // ]
  4839. // }
  4840. }
  4841. // method id "deploymentmanager.deployments.stop":
  4842. type DeploymentsStopCall struct {
  4843. s *Service
  4844. project string
  4845. deployment string
  4846. deploymentsstoprequest *DeploymentsStopRequest
  4847. urlParams_ gensupport.URLParams
  4848. ctx_ context.Context
  4849. header_ http.Header
  4850. }
  4851. // Stop: Stops an ongoing operation. This does not roll back any work
  4852. // that has already been completed, but prevents any new work from being
  4853. // started.
  4854. func (r *DeploymentsService) Stop(project string, deployment string, deploymentsstoprequest *DeploymentsStopRequest) *DeploymentsStopCall {
  4855. c := &DeploymentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4856. c.project = project
  4857. c.deployment = deployment
  4858. c.deploymentsstoprequest = deploymentsstoprequest
  4859. return c
  4860. }
  4861. // Fields allows partial responses to be retrieved. See
  4862. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4863. // for more information.
  4864. func (c *DeploymentsStopCall) Fields(s ...googleapi.Field) *DeploymentsStopCall {
  4865. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4866. return c
  4867. }
  4868. // Context sets the context to be used in this call's Do method. Any
  4869. // pending HTTP request will be aborted if the provided context is
  4870. // canceled.
  4871. func (c *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall {
  4872. c.ctx_ = ctx
  4873. return c
  4874. }
  4875. // Header returns an http.Header that can be modified by the caller to
  4876. // add HTTP headers to the request.
  4877. func (c *DeploymentsStopCall) Header() http.Header {
  4878. if c.header_ == nil {
  4879. c.header_ = make(http.Header)
  4880. }
  4881. return c.header_
  4882. }
  4883. func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) {
  4884. reqHeaders := make(http.Header)
  4885. for k, v := range c.header_ {
  4886. reqHeaders[k] = v
  4887. }
  4888. reqHeaders.Set("User-Agent", c.s.userAgent())
  4889. var body io.Reader = nil
  4890. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest)
  4891. if err != nil {
  4892. return nil, err
  4893. }
  4894. reqHeaders.Set("Content-Type", "application/json")
  4895. c.urlParams_.Set("alt", alt)
  4896. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/stop")
  4897. urls += "?" + c.urlParams_.Encode()
  4898. req, _ := http.NewRequest("POST", urls, body)
  4899. req.Header = reqHeaders
  4900. googleapi.Expand(req.URL, map[string]string{
  4901. "project": c.project,
  4902. "deployment": c.deployment,
  4903. })
  4904. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4905. }
  4906. // Do executes the "deploymentmanager.deployments.stop" call.
  4907. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4908. // status code is an error. Response headers are in either
  4909. // *Operation.ServerResponse.Header or (if a response was returned at
  4910. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4911. // to check whether the returned error was because
  4912. // http.StatusNotModified was returned.
  4913. func (c *DeploymentsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4914. gensupport.SetOptions(c.urlParams_, opts...)
  4915. res, err := c.doRequest("json")
  4916. if res != nil && res.StatusCode == http.StatusNotModified {
  4917. if res.Body != nil {
  4918. res.Body.Close()
  4919. }
  4920. return nil, &googleapi.Error{
  4921. Code: res.StatusCode,
  4922. Header: res.Header,
  4923. }
  4924. }
  4925. if err != nil {
  4926. return nil, err
  4927. }
  4928. defer googleapi.CloseBody(res)
  4929. if err := googleapi.CheckResponse(res); err != nil {
  4930. return nil, err
  4931. }
  4932. ret := &Operation{
  4933. ServerResponse: googleapi.ServerResponse{
  4934. Header: res.Header,
  4935. HTTPStatusCode: res.StatusCode,
  4936. },
  4937. }
  4938. target := &ret
  4939. if err := gensupport.DecodeResponse(target, res); err != nil {
  4940. return nil, err
  4941. }
  4942. return ret, nil
  4943. // {
  4944. // "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.",
  4945. // "httpMethod": "POST",
  4946. // "id": "deploymentmanager.deployments.stop",
  4947. // "parameterOrder": [
  4948. // "project",
  4949. // "deployment"
  4950. // ],
  4951. // "parameters": {
  4952. // "deployment": {
  4953. // "description": "The name of the deployment for this request.",
  4954. // "location": "path",
  4955. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  4956. // "required": true,
  4957. // "type": "string"
  4958. // },
  4959. // "project": {
  4960. // "description": "The project ID for this request.",
  4961. // "location": "path",
  4962. // "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])?))",
  4963. // "required": true,
  4964. // "type": "string"
  4965. // }
  4966. // },
  4967. // "path": "{project}/global/deployments/{deployment}/stop",
  4968. // "request": {
  4969. // "$ref": "DeploymentsStopRequest"
  4970. // },
  4971. // "response": {
  4972. // "$ref": "Operation"
  4973. // },
  4974. // "scopes": [
  4975. // "https://www.googleapis.com/auth/cloud-platform",
  4976. // "https://www.googleapis.com/auth/ndev.cloudman"
  4977. // ]
  4978. // }
  4979. }
  4980. // method id "deploymentmanager.deployments.testIamPermissions":
  4981. type DeploymentsTestIamPermissionsCall struct {
  4982. s *Service
  4983. project string
  4984. resource string
  4985. testpermissionsrequest *TestPermissionsRequest
  4986. urlParams_ gensupport.URLParams
  4987. ctx_ context.Context
  4988. header_ http.Header
  4989. }
  4990. // TestIamPermissions: Returns permissions that a caller has on the
  4991. // specified resource.
  4992. func (r *DeploymentsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *DeploymentsTestIamPermissionsCall {
  4993. c := &DeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4994. c.project = project
  4995. c.resource = resource
  4996. c.testpermissionsrequest = testpermissionsrequest
  4997. return c
  4998. }
  4999. // Fields allows partial responses to be retrieved. See
  5000. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5001. // for more information.
  5002. func (c *DeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DeploymentsTestIamPermissionsCall {
  5003. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5004. return c
  5005. }
  5006. // Context sets the context to be used in this call's Do method. Any
  5007. // pending HTTP request will be aborted if the provided context is
  5008. // canceled.
  5009. func (c *DeploymentsTestIamPermissionsCall) Context(ctx context.Context) *DeploymentsTestIamPermissionsCall {
  5010. c.ctx_ = ctx
  5011. return c
  5012. }
  5013. // Header returns an http.Header that can be modified by the caller to
  5014. // add HTTP headers to the request.
  5015. func (c *DeploymentsTestIamPermissionsCall) Header() http.Header {
  5016. if c.header_ == nil {
  5017. c.header_ = make(http.Header)
  5018. }
  5019. return c.header_
  5020. }
  5021. func (c *DeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5022. reqHeaders := make(http.Header)
  5023. for k, v := range c.header_ {
  5024. reqHeaders[k] = v
  5025. }
  5026. reqHeaders.Set("User-Agent", c.s.userAgent())
  5027. var body io.Reader = nil
  5028. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
  5029. if err != nil {
  5030. return nil, err
  5031. }
  5032. reqHeaders.Set("Content-Type", "application/json")
  5033. c.urlParams_.Set("alt", alt)
  5034. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/testIamPermissions")
  5035. urls += "?" + c.urlParams_.Encode()
  5036. req, _ := http.NewRequest("POST", urls, body)
  5037. req.Header = reqHeaders
  5038. googleapi.Expand(req.URL, map[string]string{
  5039. "project": c.project,
  5040. "resource": c.resource,
  5041. })
  5042. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5043. }
  5044. // Do executes the "deploymentmanager.deployments.testIamPermissions" call.
  5045. // Exactly one of *TestPermissionsResponse or error will be non-nil. Any
  5046. // non-2xx status code is an error. Response headers are in either
  5047. // *TestPermissionsResponse.ServerResponse.Header or (if a response was
  5048. // returned at all) in error.(*googleapi.Error).Header. Use
  5049. // googleapi.IsNotModified to check whether the returned error was
  5050. // because http.StatusNotModified was returned.
  5051. func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
  5052. gensupport.SetOptions(c.urlParams_, opts...)
  5053. res, err := c.doRequest("json")
  5054. if res != nil && res.StatusCode == http.StatusNotModified {
  5055. if res.Body != nil {
  5056. res.Body.Close()
  5057. }
  5058. return nil, &googleapi.Error{
  5059. Code: res.StatusCode,
  5060. Header: res.Header,
  5061. }
  5062. }
  5063. if err != nil {
  5064. return nil, err
  5065. }
  5066. defer googleapi.CloseBody(res)
  5067. if err := googleapi.CheckResponse(res); err != nil {
  5068. return nil, err
  5069. }
  5070. ret := &TestPermissionsResponse{
  5071. ServerResponse: googleapi.ServerResponse{
  5072. Header: res.Header,
  5073. HTTPStatusCode: res.StatusCode,
  5074. },
  5075. }
  5076. target := &ret
  5077. if err := gensupport.DecodeResponse(target, res); err != nil {
  5078. return nil, err
  5079. }
  5080. return ret, nil
  5081. // {
  5082. // "description": "Returns permissions that a caller has on the specified resource.",
  5083. // "httpMethod": "POST",
  5084. // "id": "deploymentmanager.deployments.testIamPermissions",
  5085. // "parameterOrder": [
  5086. // "project",
  5087. // "resource"
  5088. // ],
  5089. // "parameters": {
  5090. // "project": {
  5091. // "description": "Project ID for this request.",
  5092. // "location": "path",
  5093. // "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])?))",
  5094. // "required": true,
  5095. // "type": "string"
  5096. // },
  5097. // "resource": {
  5098. // "description": "Name of the resource for this request.",
  5099. // "location": "path",
  5100. // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
  5101. // "required": true,
  5102. // "type": "string"
  5103. // }
  5104. // },
  5105. // "path": "{project}/global/deployments/{resource}/testIamPermissions",
  5106. // "request": {
  5107. // "$ref": "TestPermissionsRequest"
  5108. // },
  5109. // "response": {
  5110. // "$ref": "TestPermissionsResponse"
  5111. // },
  5112. // "scopes": [
  5113. // "https://www.googleapis.com/auth/cloud-platform",
  5114. // "https://www.googleapis.com/auth/ndev.cloudman"
  5115. // ]
  5116. // }
  5117. }
  5118. // method id "deploymentmanager.deployments.update":
  5119. type DeploymentsUpdateCall struct {
  5120. s *Service
  5121. project string
  5122. deployment string
  5123. deployment2 *Deployment
  5124. urlParams_ gensupport.URLParams
  5125. ctx_ context.Context
  5126. header_ http.Header
  5127. }
  5128. // Update: Updates a deployment and all of the resources described by
  5129. // the deployment manifest.
  5130. func (r *DeploymentsService) Update(project string, deployment string, deployment2 *Deployment) *DeploymentsUpdateCall {
  5131. c := &DeploymentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5132. c.project = project
  5133. c.deployment = deployment
  5134. c.deployment2 = deployment2
  5135. return c
  5136. }
  5137. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  5138. // policy to use for creating new resources.
  5139. //
  5140. // Possible values:
  5141. // "ACQUIRE"
  5142. // "CREATE"
  5143. // "CREATE_OR_ACQUIRE" (default)
  5144. func (c *DeploymentsUpdateCall) CreatePolicy(createPolicy string) *DeploymentsUpdateCall {
  5145. c.urlParams_.Set("createPolicy", createPolicy)
  5146. return c
  5147. }
  5148. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  5149. // policy to use for deleting resources.
  5150. //
  5151. // Possible values:
  5152. // "ABANDON"
  5153. // "DELETE" (default)
  5154. func (c *DeploymentsUpdateCall) DeletePolicy(deletePolicy string) *DeploymentsUpdateCall {
  5155. c.urlParams_.Set("deletePolicy", deletePolicy)
  5156. return c
  5157. }
  5158. // Preview sets the optional parameter "preview": If set to true,
  5159. // updates the deployment and creates and updates the "shell" resources
  5160. // but does not actually alter or instantiate these resources. This
  5161. // allows you to preview what your deployment will look like. You can
  5162. // use this intent to preview how an update would affect your
  5163. // deployment. You must provide a target.config with a configuration if
  5164. // this is set to true. After previewing a deployment, you can deploy
  5165. // your resources by making a request with the update() or you can
  5166. // cancelPreview() to remove the preview altogether. Note that the
  5167. // deployment will still exist after you cancel the preview and you must
  5168. // separately delete this deployment if you want to remove it.
  5169. func (c *DeploymentsUpdateCall) Preview(preview bool) *DeploymentsUpdateCall {
  5170. c.urlParams_.Set("preview", fmt.Sprint(preview))
  5171. return c
  5172. }
  5173. // Fields allows partial responses to be retrieved. See
  5174. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5175. // for more information.
  5176. func (c *DeploymentsUpdateCall) Fields(s ...googleapi.Field) *DeploymentsUpdateCall {
  5177. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5178. return c
  5179. }
  5180. // Context sets the context to be used in this call's Do method. Any
  5181. // pending HTTP request will be aborted if the provided context is
  5182. // canceled.
  5183. func (c *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall {
  5184. c.ctx_ = ctx
  5185. return c
  5186. }
  5187. // Header returns an http.Header that can be modified by the caller to
  5188. // add HTTP headers to the request.
  5189. func (c *DeploymentsUpdateCall) Header() http.Header {
  5190. if c.header_ == nil {
  5191. c.header_ = make(http.Header)
  5192. }
  5193. return c.header_
  5194. }
  5195. func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5196. reqHeaders := make(http.Header)
  5197. for k, v := range c.header_ {
  5198. reqHeaders[k] = v
  5199. }
  5200. reqHeaders.Set("User-Agent", c.s.userAgent())
  5201. var body io.Reader = nil
  5202. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
  5203. if err != nil {
  5204. return nil, err
  5205. }
  5206. reqHeaders.Set("Content-Type", "application/json")
  5207. c.urlParams_.Set("alt", alt)
  5208. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  5209. urls += "?" + c.urlParams_.Encode()
  5210. req, _ := http.NewRequest("PUT", urls, body)
  5211. req.Header = reqHeaders
  5212. googleapi.Expand(req.URL, map[string]string{
  5213. "project": c.project,
  5214. "deployment": c.deployment,
  5215. })
  5216. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5217. }
  5218. // Do executes the "deploymentmanager.deployments.update" call.
  5219. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5220. // status code is an error. Response headers are in either
  5221. // *Operation.ServerResponse.Header or (if a response was returned at
  5222. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5223. // to check whether the returned error was because
  5224. // http.StatusNotModified was returned.
  5225. func (c *DeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5226. gensupport.SetOptions(c.urlParams_, opts...)
  5227. res, err := c.doRequest("json")
  5228. if res != nil && res.StatusCode == http.StatusNotModified {
  5229. if res.Body != nil {
  5230. res.Body.Close()
  5231. }
  5232. return nil, &googleapi.Error{
  5233. Code: res.StatusCode,
  5234. Header: res.Header,
  5235. }
  5236. }
  5237. if err != nil {
  5238. return nil, err
  5239. }
  5240. defer googleapi.CloseBody(res)
  5241. if err := googleapi.CheckResponse(res); err != nil {
  5242. return nil, err
  5243. }
  5244. ret := &Operation{
  5245. ServerResponse: googleapi.ServerResponse{
  5246. Header: res.Header,
  5247. HTTPStatusCode: res.StatusCode,
  5248. },
  5249. }
  5250. target := &ret
  5251. if err := gensupport.DecodeResponse(target, res); err != nil {
  5252. return nil, err
  5253. }
  5254. return ret, nil
  5255. // {
  5256. // "description": "Updates a deployment and all of the resources described by the deployment manifest.",
  5257. // "httpMethod": "PUT",
  5258. // "id": "deploymentmanager.deployments.update",
  5259. // "parameterOrder": [
  5260. // "project",
  5261. // "deployment"
  5262. // ],
  5263. // "parameters": {
  5264. // "createPolicy": {
  5265. // "default": "CREATE_OR_ACQUIRE",
  5266. // "description": "Sets the policy to use for creating new resources.",
  5267. // "enum": [
  5268. // "ACQUIRE",
  5269. // "CREATE",
  5270. // "CREATE_OR_ACQUIRE"
  5271. // ],
  5272. // "enumDescriptions": [
  5273. // "",
  5274. // "",
  5275. // ""
  5276. // ],
  5277. // "location": "query",
  5278. // "type": "string"
  5279. // },
  5280. // "deletePolicy": {
  5281. // "default": "DELETE",
  5282. // "description": "Sets the policy to use for deleting resources.",
  5283. // "enum": [
  5284. // "ABANDON",
  5285. // "DELETE"
  5286. // ],
  5287. // "enumDescriptions": [
  5288. // "",
  5289. // ""
  5290. // ],
  5291. // "location": "query",
  5292. // "type": "string"
  5293. // },
  5294. // "deployment": {
  5295. // "description": "The name of the deployment for this request.",
  5296. // "location": "path",
  5297. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5298. // "required": true,
  5299. // "type": "string"
  5300. // },
  5301. // "preview": {
  5302. // "default": "false",
  5303. // "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.",
  5304. // "location": "query",
  5305. // "type": "boolean"
  5306. // },
  5307. // "project": {
  5308. // "description": "The project ID for this request.",
  5309. // "location": "path",
  5310. // "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])?))",
  5311. // "required": true,
  5312. // "type": "string"
  5313. // }
  5314. // },
  5315. // "path": "{project}/global/deployments/{deployment}",
  5316. // "request": {
  5317. // "$ref": "Deployment"
  5318. // },
  5319. // "response": {
  5320. // "$ref": "Operation"
  5321. // },
  5322. // "scopes": [
  5323. // "https://www.googleapis.com/auth/cloud-platform",
  5324. // "https://www.googleapis.com/auth/ndev.cloudman"
  5325. // ]
  5326. // }
  5327. }
  5328. // method id "deploymentmanager.manifests.get":
  5329. type ManifestsGetCall struct {
  5330. s *Service
  5331. project string
  5332. deployment string
  5333. manifest string
  5334. urlParams_ gensupport.URLParams
  5335. ifNoneMatch_ string
  5336. ctx_ context.Context
  5337. header_ http.Header
  5338. }
  5339. // Get: Gets information about a specific manifest.
  5340. func (r *ManifestsService) Get(project string, deployment string, manifest string) *ManifestsGetCall {
  5341. c := &ManifestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5342. c.project = project
  5343. c.deployment = deployment
  5344. c.manifest = manifest
  5345. return c
  5346. }
  5347. // Fields allows partial responses to be retrieved. See
  5348. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5349. // for more information.
  5350. func (c *ManifestsGetCall) Fields(s ...googleapi.Field) *ManifestsGetCall {
  5351. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5352. return c
  5353. }
  5354. // IfNoneMatch sets the optional parameter which makes the operation
  5355. // fail if the object's ETag matches the given value. This is useful for
  5356. // getting updates only after the object has changed since the last
  5357. // request. Use googleapi.IsNotModified to check whether the response
  5358. // error from Do is the result of In-None-Match.
  5359. func (c *ManifestsGetCall) IfNoneMatch(entityTag string) *ManifestsGetCall {
  5360. c.ifNoneMatch_ = entityTag
  5361. return c
  5362. }
  5363. // Context sets the context to be used in this call's Do method. Any
  5364. // pending HTTP request will be aborted if the provided context is
  5365. // canceled.
  5366. func (c *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
  5367. c.ctx_ = ctx
  5368. return c
  5369. }
  5370. // Header returns an http.Header that can be modified by the caller to
  5371. // add HTTP headers to the request.
  5372. func (c *ManifestsGetCall) Header() http.Header {
  5373. if c.header_ == nil {
  5374. c.header_ = make(http.Header)
  5375. }
  5376. return c.header_
  5377. }
  5378. func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
  5379. reqHeaders := make(http.Header)
  5380. for k, v := range c.header_ {
  5381. reqHeaders[k] = v
  5382. }
  5383. reqHeaders.Set("User-Agent", c.s.userAgent())
  5384. if c.ifNoneMatch_ != "" {
  5385. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5386. }
  5387. var body io.Reader = nil
  5388. c.urlParams_.Set("alt", alt)
  5389. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests/{manifest}")
  5390. urls += "?" + c.urlParams_.Encode()
  5391. req, _ := http.NewRequest("GET", urls, body)
  5392. req.Header = reqHeaders
  5393. googleapi.Expand(req.URL, map[string]string{
  5394. "project": c.project,
  5395. "deployment": c.deployment,
  5396. "manifest": c.manifest,
  5397. })
  5398. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5399. }
  5400. // Do executes the "deploymentmanager.manifests.get" call.
  5401. // Exactly one of *Manifest or error will be non-nil. Any non-2xx status
  5402. // code is an error. Response headers are in either
  5403. // *Manifest.ServerResponse.Header or (if a response was returned at
  5404. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5405. // to check whether the returned error was because
  5406. // http.StatusNotModified was returned.
  5407. func (c *ManifestsGetCall) Do(opts ...googleapi.CallOption) (*Manifest, error) {
  5408. gensupport.SetOptions(c.urlParams_, opts...)
  5409. res, err := c.doRequest("json")
  5410. if res != nil && res.StatusCode == http.StatusNotModified {
  5411. if res.Body != nil {
  5412. res.Body.Close()
  5413. }
  5414. return nil, &googleapi.Error{
  5415. Code: res.StatusCode,
  5416. Header: res.Header,
  5417. }
  5418. }
  5419. if err != nil {
  5420. return nil, err
  5421. }
  5422. defer googleapi.CloseBody(res)
  5423. if err := googleapi.CheckResponse(res); err != nil {
  5424. return nil, err
  5425. }
  5426. ret := &Manifest{
  5427. ServerResponse: googleapi.ServerResponse{
  5428. Header: res.Header,
  5429. HTTPStatusCode: res.StatusCode,
  5430. },
  5431. }
  5432. target := &ret
  5433. if err := gensupport.DecodeResponse(target, res); err != nil {
  5434. return nil, err
  5435. }
  5436. return ret, nil
  5437. // {
  5438. // "description": "Gets information about a specific manifest.",
  5439. // "httpMethod": "GET",
  5440. // "id": "deploymentmanager.manifests.get",
  5441. // "parameterOrder": [
  5442. // "project",
  5443. // "deployment",
  5444. // "manifest"
  5445. // ],
  5446. // "parameters": {
  5447. // "deployment": {
  5448. // "description": "The name of the deployment for this request.",
  5449. // "location": "path",
  5450. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5451. // "required": true,
  5452. // "type": "string"
  5453. // },
  5454. // "manifest": {
  5455. // "description": "The name of the manifest for this request.",
  5456. // "location": "path",
  5457. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5458. // "required": true,
  5459. // "type": "string"
  5460. // },
  5461. // "project": {
  5462. // "description": "The project ID for this request.",
  5463. // "location": "path",
  5464. // "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])?))",
  5465. // "required": true,
  5466. // "type": "string"
  5467. // }
  5468. // },
  5469. // "path": "{project}/global/deployments/{deployment}/manifests/{manifest}",
  5470. // "response": {
  5471. // "$ref": "Manifest"
  5472. // },
  5473. // "scopes": [
  5474. // "https://www.googleapis.com/auth/cloud-platform",
  5475. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5476. // "https://www.googleapis.com/auth/ndev.cloudman",
  5477. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5478. // ]
  5479. // }
  5480. }
  5481. // method id "deploymentmanager.manifests.list":
  5482. type ManifestsListCall struct {
  5483. s *Service
  5484. project string
  5485. deployment string
  5486. urlParams_ gensupport.URLParams
  5487. ifNoneMatch_ string
  5488. ctx_ context.Context
  5489. header_ http.Header
  5490. }
  5491. // List: Lists all manifests for a given deployment.
  5492. func (r *ManifestsService) List(project string, deployment string) *ManifestsListCall {
  5493. c := &ManifestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5494. c.project = project
  5495. c.deployment = deployment
  5496. return c
  5497. }
  5498. // Filter sets the optional parameter "filter": A filter expression that
  5499. // filters resources listed in the response. The expression must specify
  5500. // the field name, a comparison operator, and the value that you want to
  5501. // use for filtering. The value must be a string, a number, or a
  5502. // boolean. The comparison operator must be either =, !=, >, or <.
  5503. //
  5504. // For example, if you are filtering Compute Engine instances, you can
  5505. // exclude instances named example-instance by specifying name !=
  5506. // example-instance.
  5507. //
  5508. // You can also filter nested fields. For example, you could specify
  5509. // scheduling.automaticRestart = false to include instances only if they
  5510. // are not scheduled for automatic restarts. You can use filtering on
  5511. // nested fields to filter based on resource labels.
  5512. //
  5513. // To filter on multiple expressions, provide each separate expression
  5514. // within parentheses. For example, (scheduling.automaticRestart = true)
  5515. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  5516. // AND expression. However, you can include AND and OR expressions
  5517. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  5518. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  5519. // true).
  5520. func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall {
  5521. c.urlParams_.Set("filter", filter)
  5522. return c
  5523. }
  5524. // MaxResults sets the optional parameter "maxResults": The maximum
  5525. // number of results per page that should be returned. If the number of
  5526. // available results is larger than maxResults, Compute Engine returns a
  5527. // nextPageToken that can be used to get the next page of results in
  5528. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  5529. // (Default: 500)
  5530. func (c *ManifestsListCall) MaxResults(maxResults int64) *ManifestsListCall {
  5531. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5532. return c
  5533. }
  5534. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  5535. // a certain order. By default, results are returned in alphanumerical
  5536. // order based on the resource name.
  5537. //
  5538. // You can also sort results in descending order based on the creation
  5539. // timestamp using orderBy="creationTimestamp desc". This sorts results
  5540. // based on the creationTimestamp field in reverse chronological order
  5541. // (newest result first). Use this to sort resources like operations so
  5542. // that the newest operation is returned first.
  5543. //
  5544. // Currently, only sorting by name or creationTimestamp desc is
  5545. // supported.
  5546. func (c *ManifestsListCall) OrderBy(orderBy string) *ManifestsListCall {
  5547. c.urlParams_.Set("orderBy", orderBy)
  5548. return c
  5549. }
  5550. // PageToken sets the optional parameter "pageToken": Specifies a page
  5551. // token to use. Set pageToken to the nextPageToken returned by a
  5552. // previous list request to get the next page of results.
  5553. func (c *ManifestsListCall) PageToken(pageToken string) *ManifestsListCall {
  5554. c.urlParams_.Set("pageToken", pageToken)
  5555. return c
  5556. }
  5557. // Fields allows partial responses to be retrieved. See
  5558. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5559. // for more information.
  5560. func (c *ManifestsListCall) Fields(s ...googleapi.Field) *ManifestsListCall {
  5561. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5562. return c
  5563. }
  5564. // IfNoneMatch sets the optional parameter which makes the operation
  5565. // fail if the object's ETag matches the given value. This is useful for
  5566. // getting updates only after the object has changed since the last
  5567. // request. Use googleapi.IsNotModified to check whether the response
  5568. // error from Do is the result of In-None-Match.
  5569. func (c *ManifestsListCall) IfNoneMatch(entityTag string) *ManifestsListCall {
  5570. c.ifNoneMatch_ = entityTag
  5571. return c
  5572. }
  5573. // Context sets the context to be used in this call's Do method. Any
  5574. // pending HTTP request will be aborted if the provided context is
  5575. // canceled.
  5576. func (c *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
  5577. c.ctx_ = ctx
  5578. return c
  5579. }
  5580. // Header returns an http.Header that can be modified by the caller to
  5581. // add HTTP headers to the request.
  5582. func (c *ManifestsListCall) Header() http.Header {
  5583. if c.header_ == nil {
  5584. c.header_ = make(http.Header)
  5585. }
  5586. return c.header_
  5587. }
  5588. func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
  5589. reqHeaders := make(http.Header)
  5590. for k, v := range c.header_ {
  5591. reqHeaders[k] = v
  5592. }
  5593. reqHeaders.Set("User-Agent", c.s.userAgent())
  5594. if c.ifNoneMatch_ != "" {
  5595. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5596. }
  5597. var body io.Reader = nil
  5598. c.urlParams_.Set("alt", alt)
  5599. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests")
  5600. urls += "?" + c.urlParams_.Encode()
  5601. req, _ := http.NewRequest("GET", urls, body)
  5602. req.Header = reqHeaders
  5603. googleapi.Expand(req.URL, map[string]string{
  5604. "project": c.project,
  5605. "deployment": c.deployment,
  5606. })
  5607. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5608. }
  5609. // Do executes the "deploymentmanager.manifests.list" call.
  5610. // Exactly one of *ManifestsListResponse or error will be non-nil. Any
  5611. // non-2xx status code is an error. Response headers are in either
  5612. // *ManifestsListResponse.ServerResponse.Header or (if a response was
  5613. // returned at all) in error.(*googleapi.Error).Header. Use
  5614. // googleapi.IsNotModified to check whether the returned error was
  5615. // because http.StatusNotModified was returned.
  5616. func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResponse, error) {
  5617. gensupport.SetOptions(c.urlParams_, opts...)
  5618. res, err := c.doRequest("json")
  5619. if res != nil && res.StatusCode == http.StatusNotModified {
  5620. if res.Body != nil {
  5621. res.Body.Close()
  5622. }
  5623. return nil, &googleapi.Error{
  5624. Code: res.StatusCode,
  5625. Header: res.Header,
  5626. }
  5627. }
  5628. if err != nil {
  5629. return nil, err
  5630. }
  5631. defer googleapi.CloseBody(res)
  5632. if err := googleapi.CheckResponse(res); err != nil {
  5633. return nil, err
  5634. }
  5635. ret := &ManifestsListResponse{
  5636. ServerResponse: googleapi.ServerResponse{
  5637. Header: res.Header,
  5638. HTTPStatusCode: res.StatusCode,
  5639. },
  5640. }
  5641. target := &ret
  5642. if err := gensupport.DecodeResponse(target, res); err != nil {
  5643. return nil, err
  5644. }
  5645. return ret, nil
  5646. // {
  5647. // "description": "Lists all manifests for a given deployment.",
  5648. // "httpMethod": "GET",
  5649. // "id": "deploymentmanager.manifests.list",
  5650. // "parameterOrder": [
  5651. // "project",
  5652. // "deployment"
  5653. // ],
  5654. // "parameters": {
  5655. // "deployment": {
  5656. // "description": "The name of the deployment for this request.",
  5657. // "location": "path",
  5658. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5659. // "required": true,
  5660. // "type": "string"
  5661. // },
  5662. // "filter": {
  5663. // "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).",
  5664. // "location": "query",
  5665. // "type": "string"
  5666. // },
  5667. // "maxResults": {
  5668. // "default": "500",
  5669. // "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)",
  5670. // "format": "uint32",
  5671. // "location": "query",
  5672. // "minimum": "0",
  5673. // "type": "integer"
  5674. // },
  5675. // "orderBy": {
  5676. // "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.",
  5677. // "location": "query",
  5678. // "type": "string"
  5679. // },
  5680. // "pageToken": {
  5681. // "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.",
  5682. // "location": "query",
  5683. // "type": "string"
  5684. // },
  5685. // "project": {
  5686. // "description": "The project ID for this request.",
  5687. // "location": "path",
  5688. // "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])?))",
  5689. // "required": true,
  5690. // "type": "string"
  5691. // }
  5692. // },
  5693. // "path": "{project}/global/deployments/{deployment}/manifests",
  5694. // "response": {
  5695. // "$ref": "ManifestsListResponse"
  5696. // },
  5697. // "scopes": [
  5698. // "https://www.googleapis.com/auth/cloud-platform",
  5699. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5700. // "https://www.googleapis.com/auth/ndev.cloudman",
  5701. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5702. // ]
  5703. // }
  5704. }
  5705. // Pages invokes f for each page of results.
  5706. // A non-nil error returned from f will halt the iteration.
  5707. // The provided context supersedes any context provided to the Context method.
  5708. func (c *ManifestsListCall) Pages(ctx context.Context, f func(*ManifestsListResponse) error) error {
  5709. c.ctx_ = ctx
  5710. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5711. for {
  5712. x, err := c.Do()
  5713. if err != nil {
  5714. return err
  5715. }
  5716. if err := f(x); err != nil {
  5717. return err
  5718. }
  5719. if x.NextPageToken == "" {
  5720. return nil
  5721. }
  5722. c.PageToken(x.NextPageToken)
  5723. }
  5724. }
  5725. // method id "deploymentmanager.operations.get":
  5726. type OperationsGetCall struct {
  5727. s *Service
  5728. project string
  5729. operation string
  5730. urlParams_ gensupport.URLParams
  5731. ifNoneMatch_ string
  5732. ctx_ context.Context
  5733. header_ http.Header
  5734. }
  5735. // Get: Gets information about a specific operation.
  5736. func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
  5737. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5738. c.project = project
  5739. c.operation = operation
  5740. return c
  5741. }
  5742. // Fields allows partial responses to be retrieved. See
  5743. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5744. // for more information.
  5745. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  5746. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5747. return c
  5748. }
  5749. // IfNoneMatch sets the optional parameter which makes the operation
  5750. // fail if the object's ETag matches the given value. This is useful for
  5751. // getting updates only after the object has changed since the last
  5752. // request. Use googleapi.IsNotModified to check whether the response
  5753. // error from Do is the result of In-None-Match.
  5754. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  5755. c.ifNoneMatch_ = entityTag
  5756. return c
  5757. }
  5758. // Context sets the context to be used in this call's Do method. Any
  5759. // pending HTTP request will be aborted if the provided context is
  5760. // canceled.
  5761. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  5762. c.ctx_ = ctx
  5763. return c
  5764. }
  5765. // Header returns an http.Header that can be modified by the caller to
  5766. // add HTTP headers to the request.
  5767. func (c *OperationsGetCall) Header() http.Header {
  5768. if c.header_ == nil {
  5769. c.header_ = make(http.Header)
  5770. }
  5771. return c.header_
  5772. }
  5773. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5774. reqHeaders := make(http.Header)
  5775. for k, v := range c.header_ {
  5776. reqHeaders[k] = v
  5777. }
  5778. reqHeaders.Set("User-Agent", c.s.userAgent())
  5779. if c.ifNoneMatch_ != "" {
  5780. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5781. }
  5782. var body io.Reader = nil
  5783. c.urlParams_.Set("alt", alt)
  5784. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
  5785. urls += "?" + c.urlParams_.Encode()
  5786. req, _ := http.NewRequest("GET", urls, body)
  5787. req.Header = reqHeaders
  5788. googleapi.Expand(req.URL, map[string]string{
  5789. "project": c.project,
  5790. "operation": c.operation,
  5791. })
  5792. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5793. }
  5794. // Do executes the "deploymentmanager.operations.get" call.
  5795. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5796. // status code is an error. Response headers are in either
  5797. // *Operation.ServerResponse.Header or (if a response was returned at
  5798. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5799. // to check whether the returned error was because
  5800. // http.StatusNotModified was returned.
  5801. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5802. gensupport.SetOptions(c.urlParams_, opts...)
  5803. res, err := c.doRequest("json")
  5804. if res != nil && res.StatusCode == http.StatusNotModified {
  5805. if res.Body != nil {
  5806. res.Body.Close()
  5807. }
  5808. return nil, &googleapi.Error{
  5809. Code: res.StatusCode,
  5810. Header: res.Header,
  5811. }
  5812. }
  5813. if err != nil {
  5814. return nil, err
  5815. }
  5816. defer googleapi.CloseBody(res)
  5817. if err := googleapi.CheckResponse(res); err != nil {
  5818. return nil, err
  5819. }
  5820. ret := &Operation{
  5821. ServerResponse: googleapi.ServerResponse{
  5822. Header: res.Header,
  5823. HTTPStatusCode: res.StatusCode,
  5824. },
  5825. }
  5826. target := &ret
  5827. if err := gensupport.DecodeResponse(target, res); err != nil {
  5828. return nil, err
  5829. }
  5830. return ret, nil
  5831. // {
  5832. // "description": "Gets information about a specific operation.",
  5833. // "httpMethod": "GET",
  5834. // "id": "deploymentmanager.operations.get",
  5835. // "parameterOrder": [
  5836. // "project",
  5837. // "operation"
  5838. // ],
  5839. // "parameters": {
  5840. // "operation": {
  5841. // "description": "The name of the operation for this request.",
  5842. // "location": "path",
  5843. // "required": true,
  5844. // "type": "string"
  5845. // },
  5846. // "project": {
  5847. // "description": "The project ID for this request.",
  5848. // "location": "path",
  5849. // "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])?))",
  5850. // "required": true,
  5851. // "type": "string"
  5852. // }
  5853. // },
  5854. // "path": "{project}/global/operations/{operation}",
  5855. // "response": {
  5856. // "$ref": "Operation"
  5857. // },
  5858. // "scopes": [
  5859. // "https://www.googleapis.com/auth/cloud-platform",
  5860. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5861. // "https://www.googleapis.com/auth/ndev.cloudman",
  5862. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5863. // ]
  5864. // }
  5865. }
  5866. // method id "deploymentmanager.operations.list":
  5867. type OperationsListCall struct {
  5868. s *Service
  5869. project string
  5870. urlParams_ gensupport.URLParams
  5871. ifNoneMatch_ string
  5872. ctx_ context.Context
  5873. header_ http.Header
  5874. }
  5875. // List: Lists all operations for a project.
  5876. func (r *OperationsService) List(project string) *OperationsListCall {
  5877. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5878. c.project = project
  5879. return c
  5880. }
  5881. // Filter sets the optional parameter "filter": A filter expression that
  5882. // filters resources listed in the response. The expression must specify
  5883. // the field name, a comparison operator, and the value that you want to
  5884. // use for filtering. The value must be a string, a number, or a
  5885. // boolean. The comparison operator must be either =, !=, >, or <.
  5886. //
  5887. // For example, if you are filtering Compute Engine instances, you can
  5888. // exclude instances named example-instance by specifying name !=
  5889. // example-instance.
  5890. //
  5891. // You can also filter nested fields. For example, you could specify
  5892. // scheduling.automaticRestart = false to include instances only if they
  5893. // are not scheduled for automatic restarts. You can use filtering on
  5894. // nested fields to filter based on resource labels.
  5895. //
  5896. // To filter on multiple expressions, provide each separate expression
  5897. // within parentheses. For example, (scheduling.automaticRestart = true)
  5898. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  5899. // AND expression. However, you can include AND and OR expressions
  5900. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  5901. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  5902. // true).
  5903. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  5904. c.urlParams_.Set("filter", filter)
  5905. return c
  5906. }
  5907. // MaxResults sets the optional parameter "maxResults": The maximum
  5908. // number of results per page that should be returned. If the number of
  5909. // available results is larger than maxResults, Compute Engine returns a
  5910. // nextPageToken that can be used to get the next page of results in
  5911. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  5912. // (Default: 500)
  5913. func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
  5914. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5915. return c
  5916. }
  5917. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  5918. // a certain order. By default, results are returned in alphanumerical
  5919. // order based on the resource name.
  5920. //
  5921. // You can also sort results in descending order based on the creation
  5922. // timestamp using orderBy="creationTimestamp desc". This sorts results
  5923. // based on the creationTimestamp field in reverse chronological order
  5924. // (newest result first). Use this to sort resources like operations so
  5925. // that the newest operation is returned first.
  5926. //
  5927. // Currently, only sorting by name or creationTimestamp desc is
  5928. // supported.
  5929. func (c *OperationsListCall) OrderBy(orderBy string) *OperationsListCall {
  5930. c.urlParams_.Set("orderBy", orderBy)
  5931. return c
  5932. }
  5933. // PageToken sets the optional parameter "pageToken": Specifies a page
  5934. // token to use. Set pageToken to the nextPageToken returned by a
  5935. // previous list request to get the next page of results.
  5936. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  5937. c.urlParams_.Set("pageToken", pageToken)
  5938. return c
  5939. }
  5940. // Fields allows partial responses to be retrieved. See
  5941. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5942. // for more information.
  5943. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  5944. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5945. return c
  5946. }
  5947. // IfNoneMatch sets the optional parameter which makes the operation
  5948. // fail if the object's ETag matches the given value. This is useful for
  5949. // getting updates only after the object has changed since the last
  5950. // request. Use googleapi.IsNotModified to check whether the response
  5951. // error from Do is the result of In-None-Match.
  5952. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  5953. c.ifNoneMatch_ = entityTag
  5954. return c
  5955. }
  5956. // Context sets the context to be used in this call's Do method. Any
  5957. // pending HTTP request will be aborted if the provided context is
  5958. // canceled.
  5959. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  5960. c.ctx_ = ctx
  5961. return c
  5962. }
  5963. // Header returns an http.Header that can be modified by the caller to
  5964. // add HTTP headers to the request.
  5965. func (c *OperationsListCall) Header() http.Header {
  5966. if c.header_ == nil {
  5967. c.header_ = make(http.Header)
  5968. }
  5969. return c.header_
  5970. }
  5971. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  5972. reqHeaders := make(http.Header)
  5973. for k, v := range c.header_ {
  5974. reqHeaders[k] = v
  5975. }
  5976. reqHeaders.Set("User-Agent", c.s.userAgent())
  5977. if c.ifNoneMatch_ != "" {
  5978. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5979. }
  5980. var body io.Reader = nil
  5981. c.urlParams_.Set("alt", alt)
  5982. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
  5983. urls += "?" + c.urlParams_.Encode()
  5984. req, _ := http.NewRequest("GET", urls, body)
  5985. req.Header = reqHeaders
  5986. googleapi.Expand(req.URL, map[string]string{
  5987. "project": c.project,
  5988. })
  5989. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5990. }
  5991. // Do executes the "deploymentmanager.operations.list" call.
  5992. // Exactly one of *OperationsListResponse or error will be non-nil. Any
  5993. // non-2xx status code is an error. Response headers are in either
  5994. // *OperationsListResponse.ServerResponse.Header or (if a response was
  5995. // returned at all) in error.(*googleapi.Error).Header. Use
  5996. // googleapi.IsNotModified to check whether the returned error was
  5997. // because http.StatusNotModified was returned.
  5998. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
  5999. gensupport.SetOptions(c.urlParams_, opts...)
  6000. res, err := c.doRequest("json")
  6001. if res != nil && res.StatusCode == http.StatusNotModified {
  6002. if res.Body != nil {
  6003. res.Body.Close()
  6004. }
  6005. return nil, &googleapi.Error{
  6006. Code: res.StatusCode,
  6007. Header: res.Header,
  6008. }
  6009. }
  6010. if err != nil {
  6011. return nil, err
  6012. }
  6013. defer googleapi.CloseBody(res)
  6014. if err := googleapi.CheckResponse(res); err != nil {
  6015. return nil, err
  6016. }
  6017. ret := &OperationsListResponse{
  6018. ServerResponse: googleapi.ServerResponse{
  6019. Header: res.Header,
  6020. HTTPStatusCode: res.StatusCode,
  6021. },
  6022. }
  6023. target := &ret
  6024. if err := gensupport.DecodeResponse(target, res); err != nil {
  6025. return nil, err
  6026. }
  6027. return ret, nil
  6028. // {
  6029. // "description": "Lists all operations for a project.",
  6030. // "httpMethod": "GET",
  6031. // "id": "deploymentmanager.operations.list",
  6032. // "parameterOrder": [
  6033. // "project"
  6034. // ],
  6035. // "parameters": {
  6036. // "filter": {
  6037. // "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).",
  6038. // "location": "query",
  6039. // "type": "string"
  6040. // },
  6041. // "maxResults": {
  6042. // "default": "500",
  6043. // "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)",
  6044. // "format": "uint32",
  6045. // "location": "query",
  6046. // "minimum": "0",
  6047. // "type": "integer"
  6048. // },
  6049. // "orderBy": {
  6050. // "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.",
  6051. // "location": "query",
  6052. // "type": "string"
  6053. // },
  6054. // "pageToken": {
  6055. // "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.",
  6056. // "location": "query",
  6057. // "type": "string"
  6058. // },
  6059. // "project": {
  6060. // "description": "The project ID for this request.",
  6061. // "location": "path",
  6062. // "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])?))",
  6063. // "required": true,
  6064. // "type": "string"
  6065. // }
  6066. // },
  6067. // "path": "{project}/global/operations",
  6068. // "response": {
  6069. // "$ref": "OperationsListResponse"
  6070. // },
  6071. // "scopes": [
  6072. // "https://www.googleapis.com/auth/cloud-platform",
  6073. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6074. // "https://www.googleapis.com/auth/ndev.cloudman",
  6075. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6076. // ]
  6077. // }
  6078. }
  6079. // Pages invokes f for each page of results.
  6080. // A non-nil error returned from f will halt the iteration.
  6081. // The provided context supersedes any context provided to the Context method.
  6082. func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
  6083. c.ctx_ = ctx
  6084. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6085. for {
  6086. x, err := c.Do()
  6087. if err != nil {
  6088. return err
  6089. }
  6090. if err := f(x); err != nil {
  6091. return err
  6092. }
  6093. if x.NextPageToken == "" {
  6094. return nil
  6095. }
  6096. c.PageToken(x.NextPageToken)
  6097. }
  6098. }
  6099. // method id "deploymentmanager.resources.get":
  6100. type ResourcesGetCall struct {
  6101. s *Service
  6102. project string
  6103. deployment string
  6104. resource string
  6105. urlParams_ gensupport.URLParams
  6106. ifNoneMatch_ string
  6107. ctx_ context.Context
  6108. header_ http.Header
  6109. }
  6110. // Get: Gets information about a single resource.
  6111. func (r *ResourcesService) Get(project string, deployment string, resource string) *ResourcesGetCall {
  6112. c := &ResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6113. c.project = project
  6114. c.deployment = deployment
  6115. c.resource = resource
  6116. return c
  6117. }
  6118. // Fields allows partial responses to be retrieved. See
  6119. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6120. // for more information.
  6121. func (c *ResourcesGetCall) Fields(s ...googleapi.Field) *ResourcesGetCall {
  6122. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6123. return c
  6124. }
  6125. // IfNoneMatch sets the optional parameter which makes the operation
  6126. // fail if the object's ETag matches the given value. This is useful for
  6127. // getting updates only after the object has changed since the last
  6128. // request. Use googleapi.IsNotModified to check whether the response
  6129. // error from Do is the result of In-None-Match.
  6130. func (c *ResourcesGetCall) IfNoneMatch(entityTag string) *ResourcesGetCall {
  6131. c.ifNoneMatch_ = entityTag
  6132. return c
  6133. }
  6134. // Context sets the context to be used in this call's Do method. Any
  6135. // pending HTTP request will be aborted if the provided context is
  6136. // canceled.
  6137. func (c *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
  6138. c.ctx_ = ctx
  6139. return c
  6140. }
  6141. // Header returns an http.Header that can be modified by the caller to
  6142. // add HTTP headers to the request.
  6143. func (c *ResourcesGetCall) Header() http.Header {
  6144. if c.header_ == nil {
  6145. c.header_ = make(http.Header)
  6146. }
  6147. return c.header_
  6148. }
  6149. func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
  6150. reqHeaders := make(http.Header)
  6151. for k, v := range c.header_ {
  6152. reqHeaders[k] = v
  6153. }
  6154. reqHeaders.Set("User-Agent", c.s.userAgent())
  6155. if c.ifNoneMatch_ != "" {
  6156. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6157. }
  6158. var body io.Reader = nil
  6159. c.urlParams_.Set("alt", alt)
  6160. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources/{resource}")
  6161. urls += "?" + c.urlParams_.Encode()
  6162. req, _ := http.NewRequest("GET", urls, body)
  6163. req.Header = reqHeaders
  6164. googleapi.Expand(req.URL, map[string]string{
  6165. "project": c.project,
  6166. "deployment": c.deployment,
  6167. "resource": c.resource,
  6168. })
  6169. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6170. }
  6171. // Do executes the "deploymentmanager.resources.get" call.
  6172. // Exactly one of *Resource or error will be non-nil. Any non-2xx status
  6173. // code is an error. Response headers are in either
  6174. // *Resource.ServerResponse.Header or (if a response was returned at
  6175. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6176. // to check whether the returned error was because
  6177. // http.StatusNotModified was returned.
  6178. func (c *ResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) {
  6179. gensupport.SetOptions(c.urlParams_, opts...)
  6180. res, err := c.doRequest("json")
  6181. if res != nil && res.StatusCode == http.StatusNotModified {
  6182. if res.Body != nil {
  6183. res.Body.Close()
  6184. }
  6185. return nil, &googleapi.Error{
  6186. Code: res.StatusCode,
  6187. Header: res.Header,
  6188. }
  6189. }
  6190. if err != nil {
  6191. return nil, err
  6192. }
  6193. defer googleapi.CloseBody(res)
  6194. if err := googleapi.CheckResponse(res); err != nil {
  6195. return nil, err
  6196. }
  6197. ret := &Resource{
  6198. ServerResponse: googleapi.ServerResponse{
  6199. Header: res.Header,
  6200. HTTPStatusCode: res.StatusCode,
  6201. },
  6202. }
  6203. target := &ret
  6204. if err := gensupport.DecodeResponse(target, res); err != nil {
  6205. return nil, err
  6206. }
  6207. return ret, nil
  6208. // {
  6209. // "description": "Gets information about a single resource.",
  6210. // "httpMethod": "GET",
  6211. // "id": "deploymentmanager.resources.get",
  6212. // "parameterOrder": [
  6213. // "project",
  6214. // "deployment",
  6215. // "resource"
  6216. // ],
  6217. // "parameters": {
  6218. // "deployment": {
  6219. // "description": "The name of the deployment for this request.",
  6220. // "location": "path",
  6221. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6222. // "required": true,
  6223. // "type": "string"
  6224. // },
  6225. // "project": {
  6226. // "description": "The project ID for this request.",
  6227. // "location": "path",
  6228. // "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])?))",
  6229. // "required": true,
  6230. // "type": "string"
  6231. // },
  6232. // "resource": {
  6233. // "description": "The name of the resource for this request.",
  6234. // "location": "path",
  6235. // "required": true,
  6236. // "type": "string"
  6237. // }
  6238. // },
  6239. // "path": "{project}/global/deployments/{deployment}/resources/{resource}",
  6240. // "response": {
  6241. // "$ref": "Resource"
  6242. // },
  6243. // "scopes": [
  6244. // "https://www.googleapis.com/auth/cloud-platform",
  6245. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6246. // "https://www.googleapis.com/auth/ndev.cloudman",
  6247. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6248. // ]
  6249. // }
  6250. }
  6251. // method id "deploymentmanager.resources.list":
  6252. type ResourcesListCall struct {
  6253. s *Service
  6254. project string
  6255. deployment string
  6256. urlParams_ gensupport.URLParams
  6257. ifNoneMatch_ string
  6258. ctx_ context.Context
  6259. header_ http.Header
  6260. }
  6261. // List: Lists all resources in a given deployment.
  6262. func (r *ResourcesService) List(project string, deployment string) *ResourcesListCall {
  6263. c := &ResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6264. c.project = project
  6265. c.deployment = deployment
  6266. return c
  6267. }
  6268. // Filter sets the optional parameter "filter": A filter expression that
  6269. // filters resources listed in the response. The expression must specify
  6270. // the field name, a comparison operator, and the value that you want to
  6271. // use for filtering. The value must be a string, a number, or a
  6272. // boolean. The comparison operator must be either =, !=, >, or <.
  6273. //
  6274. // For example, if you are filtering Compute Engine instances, you can
  6275. // exclude instances named example-instance by specifying name !=
  6276. // example-instance.
  6277. //
  6278. // You can also filter nested fields. For example, you could specify
  6279. // scheduling.automaticRestart = false to include instances only if they
  6280. // are not scheduled for automatic restarts. You can use filtering on
  6281. // nested fields to filter based on resource labels.
  6282. //
  6283. // To filter on multiple expressions, provide each separate expression
  6284. // within parentheses. For example, (scheduling.automaticRestart = true)
  6285. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  6286. // AND expression. However, you can include AND and OR expressions
  6287. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  6288. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  6289. // true).
  6290. func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall {
  6291. c.urlParams_.Set("filter", filter)
  6292. return c
  6293. }
  6294. // MaxResults sets the optional parameter "maxResults": The maximum
  6295. // number of results per page that should be returned. If the number of
  6296. // available results is larger than maxResults, Compute Engine returns a
  6297. // nextPageToken that can be used to get the next page of results in
  6298. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  6299. // (Default: 500)
  6300. func (c *ResourcesListCall) MaxResults(maxResults int64) *ResourcesListCall {
  6301. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6302. return c
  6303. }
  6304. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  6305. // a certain order. By default, results are returned in alphanumerical
  6306. // order based on the resource name.
  6307. //
  6308. // You can also sort results in descending order based on the creation
  6309. // timestamp using orderBy="creationTimestamp desc". This sorts results
  6310. // based on the creationTimestamp field in reverse chronological order
  6311. // (newest result first). Use this to sort resources like operations so
  6312. // that the newest operation is returned first.
  6313. //
  6314. // Currently, only sorting by name or creationTimestamp desc is
  6315. // supported.
  6316. func (c *ResourcesListCall) OrderBy(orderBy string) *ResourcesListCall {
  6317. c.urlParams_.Set("orderBy", orderBy)
  6318. return c
  6319. }
  6320. // PageToken sets the optional parameter "pageToken": Specifies a page
  6321. // token to use. Set pageToken to the nextPageToken returned by a
  6322. // previous list request to get the next page of results.
  6323. func (c *ResourcesListCall) PageToken(pageToken string) *ResourcesListCall {
  6324. c.urlParams_.Set("pageToken", pageToken)
  6325. return c
  6326. }
  6327. // Fields allows partial responses to be retrieved. See
  6328. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6329. // for more information.
  6330. func (c *ResourcesListCall) Fields(s ...googleapi.Field) *ResourcesListCall {
  6331. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6332. return c
  6333. }
  6334. // IfNoneMatch sets the optional parameter which makes the operation
  6335. // fail if the object's ETag matches the given value. This is useful for
  6336. // getting updates only after the object has changed since the last
  6337. // request. Use googleapi.IsNotModified to check whether the response
  6338. // error from Do is the result of In-None-Match.
  6339. func (c *ResourcesListCall) IfNoneMatch(entityTag string) *ResourcesListCall {
  6340. c.ifNoneMatch_ = entityTag
  6341. return c
  6342. }
  6343. // Context sets the context to be used in this call's Do method. Any
  6344. // pending HTTP request will be aborted if the provided context is
  6345. // canceled.
  6346. func (c *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
  6347. c.ctx_ = ctx
  6348. return c
  6349. }
  6350. // Header returns an http.Header that can be modified by the caller to
  6351. // add HTTP headers to the request.
  6352. func (c *ResourcesListCall) Header() http.Header {
  6353. if c.header_ == nil {
  6354. c.header_ = make(http.Header)
  6355. }
  6356. return c.header_
  6357. }
  6358. func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
  6359. reqHeaders := make(http.Header)
  6360. for k, v := range c.header_ {
  6361. reqHeaders[k] = v
  6362. }
  6363. reqHeaders.Set("User-Agent", c.s.userAgent())
  6364. if c.ifNoneMatch_ != "" {
  6365. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6366. }
  6367. var body io.Reader = nil
  6368. c.urlParams_.Set("alt", alt)
  6369. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources")
  6370. urls += "?" + c.urlParams_.Encode()
  6371. req, _ := http.NewRequest("GET", urls, body)
  6372. req.Header = reqHeaders
  6373. googleapi.Expand(req.URL, map[string]string{
  6374. "project": c.project,
  6375. "deployment": c.deployment,
  6376. })
  6377. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6378. }
  6379. // Do executes the "deploymentmanager.resources.list" call.
  6380. // Exactly one of *ResourcesListResponse or error will be non-nil. Any
  6381. // non-2xx status code is an error. Response headers are in either
  6382. // *ResourcesListResponse.ServerResponse.Header or (if a response was
  6383. // returned at all) in error.(*googleapi.Error).Header. Use
  6384. // googleapi.IsNotModified to check whether the returned error was
  6385. // because http.StatusNotModified was returned.
  6386. func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResponse, error) {
  6387. gensupport.SetOptions(c.urlParams_, opts...)
  6388. res, err := c.doRequest("json")
  6389. if res != nil && res.StatusCode == http.StatusNotModified {
  6390. if res.Body != nil {
  6391. res.Body.Close()
  6392. }
  6393. return nil, &googleapi.Error{
  6394. Code: res.StatusCode,
  6395. Header: res.Header,
  6396. }
  6397. }
  6398. if err != nil {
  6399. return nil, err
  6400. }
  6401. defer googleapi.CloseBody(res)
  6402. if err := googleapi.CheckResponse(res); err != nil {
  6403. return nil, err
  6404. }
  6405. ret := &ResourcesListResponse{
  6406. ServerResponse: googleapi.ServerResponse{
  6407. Header: res.Header,
  6408. HTTPStatusCode: res.StatusCode,
  6409. },
  6410. }
  6411. target := &ret
  6412. if err := gensupport.DecodeResponse(target, res); err != nil {
  6413. return nil, err
  6414. }
  6415. return ret, nil
  6416. // {
  6417. // "description": "Lists all resources in a given deployment.",
  6418. // "httpMethod": "GET",
  6419. // "id": "deploymentmanager.resources.list",
  6420. // "parameterOrder": [
  6421. // "project",
  6422. // "deployment"
  6423. // ],
  6424. // "parameters": {
  6425. // "deployment": {
  6426. // "description": "The name of the deployment for this request.",
  6427. // "location": "path",
  6428. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6429. // "required": true,
  6430. // "type": "string"
  6431. // },
  6432. // "filter": {
  6433. // "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).",
  6434. // "location": "query",
  6435. // "type": "string"
  6436. // },
  6437. // "maxResults": {
  6438. // "default": "500",
  6439. // "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)",
  6440. // "format": "uint32",
  6441. // "location": "query",
  6442. // "minimum": "0",
  6443. // "type": "integer"
  6444. // },
  6445. // "orderBy": {
  6446. // "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.",
  6447. // "location": "query",
  6448. // "type": "string"
  6449. // },
  6450. // "pageToken": {
  6451. // "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.",
  6452. // "location": "query",
  6453. // "type": "string"
  6454. // },
  6455. // "project": {
  6456. // "description": "The project ID for this request.",
  6457. // "location": "path",
  6458. // "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])?))",
  6459. // "required": true,
  6460. // "type": "string"
  6461. // }
  6462. // },
  6463. // "path": "{project}/global/deployments/{deployment}/resources",
  6464. // "response": {
  6465. // "$ref": "ResourcesListResponse"
  6466. // },
  6467. // "scopes": [
  6468. // "https://www.googleapis.com/auth/cloud-platform",
  6469. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6470. // "https://www.googleapis.com/auth/ndev.cloudman",
  6471. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6472. // ]
  6473. // }
  6474. }
  6475. // Pages invokes f for each page of results.
  6476. // A non-nil error returned from f will halt the iteration.
  6477. // The provided context supersedes any context provided to the Context method.
  6478. func (c *ResourcesListCall) Pages(ctx context.Context, f func(*ResourcesListResponse) error) error {
  6479. c.ctx_ = ctx
  6480. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6481. for {
  6482. x, err := c.Do()
  6483. if err != nil {
  6484. return err
  6485. }
  6486. if err := f(x); err != nil {
  6487. return err
  6488. }
  6489. if x.NextPageToken == "" {
  6490. return nil
  6491. }
  6492. c.PageToken(x.NextPageToken)
  6493. }
  6494. }
  6495. // method id "deploymentmanager.typeProviders.delete":
  6496. type TypeProvidersDeleteCall struct {
  6497. s *Service
  6498. project string
  6499. typeProvider string
  6500. urlParams_ gensupport.URLParams
  6501. ctx_ context.Context
  6502. header_ http.Header
  6503. }
  6504. // Delete: Deletes a type provider.
  6505. func (r *TypeProvidersService) Delete(project string, typeProvider string) *TypeProvidersDeleteCall {
  6506. c := &TypeProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6507. c.project = project
  6508. c.typeProvider = typeProvider
  6509. return c
  6510. }
  6511. // Fields allows partial responses to be retrieved. See
  6512. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6513. // for more information.
  6514. func (c *TypeProvidersDeleteCall) Fields(s ...googleapi.Field) *TypeProvidersDeleteCall {
  6515. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6516. return c
  6517. }
  6518. // Context sets the context to be used in this call's Do method. Any
  6519. // pending HTTP request will be aborted if the provided context is
  6520. // canceled.
  6521. func (c *TypeProvidersDeleteCall) Context(ctx context.Context) *TypeProvidersDeleteCall {
  6522. c.ctx_ = ctx
  6523. return c
  6524. }
  6525. // Header returns an http.Header that can be modified by the caller to
  6526. // add HTTP headers to the request.
  6527. func (c *TypeProvidersDeleteCall) Header() http.Header {
  6528. if c.header_ == nil {
  6529. c.header_ = make(http.Header)
  6530. }
  6531. return c.header_
  6532. }
  6533. func (c *TypeProvidersDeleteCall) doRequest(alt string) (*http.Response, error) {
  6534. reqHeaders := make(http.Header)
  6535. for k, v := range c.header_ {
  6536. reqHeaders[k] = v
  6537. }
  6538. reqHeaders.Set("User-Agent", c.s.userAgent())
  6539. var body io.Reader = nil
  6540. c.urlParams_.Set("alt", alt)
  6541. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  6542. urls += "?" + c.urlParams_.Encode()
  6543. req, _ := http.NewRequest("DELETE", urls, body)
  6544. req.Header = reqHeaders
  6545. googleapi.Expand(req.URL, map[string]string{
  6546. "project": c.project,
  6547. "typeProvider": c.typeProvider,
  6548. })
  6549. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6550. }
  6551. // Do executes the "deploymentmanager.typeProviders.delete" call.
  6552. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6553. // status code is an error. Response headers are in either
  6554. // *Operation.ServerResponse.Header or (if a response was returned at
  6555. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6556. // to check whether the returned error was because
  6557. // http.StatusNotModified was returned.
  6558. func (c *TypeProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6559. gensupport.SetOptions(c.urlParams_, opts...)
  6560. res, err := c.doRequest("json")
  6561. if res != nil && res.StatusCode == http.StatusNotModified {
  6562. if res.Body != nil {
  6563. res.Body.Close()
  6564. }
  6565. return nil, &googleapi.Error{
  6566. Code: res.StatusCode,
  6567. Header: res.Header,
  6568. }
  6569. }
  6570. if err != nil {
  6571. return nil, err
  6572. }
  6573. defer googleapi.CloseBody(res)
  6574. if err := googleapi.CheckResponse(res); err != nil {
  6575. return nil, err
  6576. }
  6577. ret := &Operation{
  6578. ServerResponse: googleapi.ServerResponse{
  6579. Header: res.Header,
  6580. HTTPStatusCode: res.StatusCode,
  6581. },
  6582. }
  6583. target := &ret
  6584. if err := gensupport.DecodeResponse(target, res); err != nil {
  6585. return nil, err
  6586. }
  6587. return ret, nil
  6588. // {
  6589. // "description": "Deletes a type provider.",
  6590. // "httpMethod": "DELETE",
  6591. // "id": "deploymentmanager.typeProviders.delete",
  6592. // "parameterOrder": [
  6593. // "project",
  6594. // "typeProvider"
  6595. // ],
  6596. // "parameters": {
  6597. // "project": {
  6598. // "description": "The project ID for this request.",
  6599. // "location": "path",
  6600. // "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])?))",
  6601. // "required": true,
  6602. // "type": "string"
  6603. // },
  6604. // "typeProvider": {
  6605. // "description": "The name of the type provider for this request.",
  6606. // "location": "path",
  6607. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6608. // "required": true,
  6609. // "type": "string"
  6610. // }
  6611. // },
  6612. // "path": "{project}/global/typeProviders/{typeProvider}",
  6613. // "response": {
  6614. // "$ref": "Operation"
  6615. // },
  6616. // "scopes": [
  6617. // "https://www.googleapis.com/auth/cloud-platform",
  6618. // "https://www.googleapis.com/auth/ndev.cloudman"
  6619. // ]
  6620. // }
  6621. }
  6622. // method id "deploymentmanager.typeProviders.get":
  6623. type TypeProvidersGetCall struct {
  6624. s *Service
  6625. project string
  6626. typeProvider string
  6627. urlParams_ gensupport.URLParams
  6628. ifNoneMatch_ string
  6629. ctx_ context.Context
  6630. header_ http.Header
  6631. }
  6632. // Get: Gets information about a specific type provider.
  6633. func (r *TypeProvidersService) Get(project string, typeProvider string) *TypeProvidersGetCall {
  6634. c := &TypeProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6635. c.project = project
  6636. c.typeProvider = typeProvider
  6637. return c
  6638. }
  6639. // Fields allows partial responses to be retrieved. See
  6640. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6641. // for more information.
  6642. func (c *TypeProvidersGetCall) Fields(s ...googleapi.Field) *TypeProvidersGetCall {
  6643. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6644. return c
  6645. }
  6646. // IfNoneMatch sets the optional parameter which makes the operation
  6647. // fail if the object's ETag matches the given value. This is useful for
  6648. // getting updates only after the object has changed since the last
  6649. // request. Use googleapi.IsNotModified to check whether the response
  6650. // error from Do is the result of In-None-Match.
  6651. func (c *TypeProvidersGetCall) IfNoneMatch(entityTag string) *TypeProvidersGetCall {
  6652. c.ifNoneMatch_ = entityTag
  6653. return c
  6654. }
  6655. // Context sets the context to be used in this call's Do method. Any
  6656. // pending HTTP request will be aborted if the provided context is
  6657. // canceled.
  6658. func (c *TypeProvidersGetCall) Context(ctx context.Context) *TypeProvidersGetCall {
  6659. c.ctx_ = ctx
  6660. return c
  6661. }
  6662. // Header returns an http.Header that can be modified by the caller to
  6663. // add HTTP headers to the request.
  6664. func (c *TypeProvidersGetCall) Header() http.Header {
  6665. if c.header_ == nil {
  6666. c.header_ = make(http.Header)
  6667. }
  6668. return c.header_
  6669. }
  6670. func (c *TypeProvidersGetCall) doRequest(alt string) (*http.Response, error) {
  6671. reqHeaders := make(http.Header)
  6672. for k, v := range c.header_ {
  6673. reqHeaders[k] = v
  6674. }
  6675. reqHeaders.Set("User-Agent", c.s.userAgent())
  6676. if c.ifNoneMatch_ != "" {
  6677. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6678. }
  6679. var body io.Reader = nil
  6680. c.urlParams_.Set("alt", alt)
  6681. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  6682. urls += "?" + c.urlParams_.Encode()
  6683. req, _ := http.NewRequest("GET", urls, body)
  6684. req.Header = reqHeaders
  6685. googleapi.Expand(req.URL, map[string]string{
  6686. "project": c.project,
  6687. "typeProvider": c.typeProvider,
  6688. })
  6689. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6690. }
  6691. // Do executes the "deploymentmanager.typeProviders.get" call.
  6692. // Exactly one of *TypeProvider or error will be non-nil. Any non-2xx
  6693. // status code is an error. Response headers are in either
  6694. // *TypeProvider.ServerResponse.Header or (if a response was returned at
  6695. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6696. // to check whether the returned error was because
  6697. // http.StatusNotModified was returned.
  6698. func (c *TypeProvidersGetCall) Do(opts ...googleapi.CallOption) (*TypeProvider, error) {
  6699. gensupport.SetOptions(c.urlParams_, opts...)
  6700. res, err := c.doRequest("json")
  6701. if res != nil && res.StatusCode == http.StatusNotModified {
  6702. if res.Body != nil {
  6703. res.Body.Close()
  6704. }
  6705. return nil, &googleapi.Error{
  6706. Code: res.StatusCode,
  6707. Header: res.Header,
  6708. }
  6709. }
  6710. if err != nil {
  6711. return nil, err
  6712. }
  6713. defer googleapi.CloseBody(res)
  6714. if err := googleapi.CheckResponse(res); err != nil {
  6715. return nil, err
  6716. }
  6717. ret := &TypeProvider{
  6718. ServerResponse: googleapi.ServerResponse{
  6719. Header: res.Header,
  6720. HTTPStatusCode: res.StatusCode,
  6721. },
  6722. }
  6723. target := &ret
  6724. if err := gensupport.DecodeResponse(target, res); err != nil {
  6725. return nil, err
  6726. }
  6727. return ret, nil
  6728. // {
  6729. // "description": "Gets information about a specific type provider.",
  6730. // "httpMethod": "GET",
  6731. // "id": "deploymentmanager.typeProviders.get",
  6732. // "parameterOrder": [
  6733. // "project",
  6734. // "typeProvider"
  6735. // ],
  6736. // "parameters": {
  6737. // "project": {
  6738. // "description": "The project ID for this request.",
  6739. // "location": "path",
  6740. // "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])?))",
  6741. // "required": true,
  6742. // "type": "string"
  6743. // },
  6744. // "typeProvider": {
  6745. // "description": "The name of the type provider for this request.",
  6746. // "location": "path",
  6747. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6748. // "required": true,
  6749. // "type": "string"
  6750. // }
  6751. // },
  6752. // "path": "{project}/global/typeProviders/{typeProvider}",
  6753. // "response": {
  6754. // "$ref": "TypeProvider"
  6755. // },
  6756. // "scopes": [
  6757. // "https://www.googleapis.com/auth/cloud-platform",
  6758. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6759. // "https://www.googleapis.com/auth/ndev.cloudman",
  6760. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6761. // ]
  6762. // }
  6763. }
  6764. // method id "deploymentmanager.typeProviders.getType":
  6765. type TypeProvidersGetTypeCall struct {
  6766. s *Service
  6767. project string
  6768. typeProvider string
  6769. type_ string
  6770. urlParams_ gensupport.URLParams
  6771. ifNoneMatch_ string
  6772. ctx_ context.Context
  6773. header_ http.Header
  6774. }
  6775. // GetType: Gets a type info for a type provided by a TypeProvider.
  6776. func (r *TypeProvidersService) GetType(project string, typeProvider string, type_ string) *TypeProvidersGetTypeCall {
  6777. c := &TypeProvidersGetTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6778. c.project = project
  6779. c.typeProvider = typeProvider
  6780. c.type_ = type_
  6781. return c
  6782. }
  6783. // Fields allows partial responses to be retrieved. See
  6784. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6785. // for more information.
  6786. func (c *TypeProvidersGetTypeCall) Fields(s ...googleapi.Field) *TypeProvidersGetTypeCall {
  6787. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6788. return c
  6789. }
  6790. // IfNoneMatch sets the optional parameter which makes the operation
  6791. // fail if the object's ETag matches the given value. This is useful for
  6792. // getting updates only after the object has changed since the last
  6793. // request. Use googleapi.IsNotModified to check whether the response
  6794. // error from Do is the result of In-None-Match.
  6795. func (c *TypeProvidersGetTypeCall) IfNoneMatch(entityTag string) *TypeProvidersGetTypeCall {
  6796. c.ifNoneMatch_ = entityTag
  6797. return c
  6798. }
  6799. // Context sets the context to be used in this call's Do method. Any
  6800. // pending HTTP request will be aborted if the provided context is
  6801. // canceled.
  6802. func (c *TypeProvidersGetTypeCall) Context(ctx context.Context) *TypeProvidersGetTypeCall {
  6803. c.ctx_ = ctx
  6804. return c
  6805. }
  6806. // Header returns an http.Header that can be modified by the caller to
  6807. // add HTTP headers to the request.
  6808. func (c *TypeProvidersGetTypeCall) Header() http.Header {
  6809. if c.header_ == nil {
  6810. c.header_ = make(http.Header)
  6811. }
  6812. return c.header_
  6813. }
  6814. func (c *TypeProvidersGetTypeCall) doRequest(alt string) (*http.Response, error) {
  6815. reqHeaders := make(http.Header)
  6816. for k, v := range c.header_ {
  6817. reqHeaders[k] = v
  6818. }
  6819. reqHeaders.Set("User-Agent", c.s.userAgent())
  6820. if c.ifNoneMatch_ != "" {
  6821. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6822. }
  6823. var body io.Reader = nil
  6824. c.urlParams_.Set("alt", alt)
  6825. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types/{type}")
  6826. urls += "?" + c.urlParams_.Encode()
  6827. req, _ := http.NewRequest("GET", urls, body)
  6828. req.Header = reqHeaders
  6829. googleapi.Expand(req.URL, map[string]string{
  6830. "project": c.project,
  6831. "typeProvider": c.typeProvider,
  6832. "type": c.type_,
  6833. })
  6834. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6835. }
  6836. // Do executes the "deploymentmanager.typeProviders.getType" call.
  6837. // Exactly one of *TypeInfo or error will be non-nil. Any non-2xx status
  6838. // code is an error. Response headers are in either
  6839. // *TypeInfo.ServerResponse.Header or (if a response was returned at
  6840. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6841. // to check whether the returned error was because
  6842. // http.StatusNotModified was returned.
  6843. func (c *TypeProvidersGetTypeCall) Do(opts ...googleapi.CallOption) (*TypeInfo, error) {
  6844. gensupport.SetOptions(c.urlParams_, opts...)
  6845. res, err := c.doRequest("json")
  6846. if res != nil && res.StatusCode == http.StatusNotModified {
  6847. if res.Body != nil {
  6848. res.Body.Close()
  6849. }
  6850. return nil, &googleapi.Error{
  6851. Code: res.StatusCode,
  6852. Header: res.Header,
  6853. }
  6854. }
  6855. if err != nil {
  6856. return nil, err
  6857. }
  6858. defer googleapi.CloseBody(res)
  6859. if err := googleapi.CheckResponse(res); err != nil {
  6860. return nil, err
  6861. }
  6862. ret := &TypeInfo{
  6863. ServerResponse: googleapi.ServerResponse{
  6864. Header: res.Header,
  6865. HTTPStatusCode: res.StatusCode,
  6866. },
  6867. }
  6868. target := &ret
  6869. if err := gensupport.DecodeResponse(target, res); err != nil {
  6870. return nil, err
  6871. }
  6872. return ret, nil
  6873. // {
  6874. // "description": "Gets a type info for a type provided by a TypeProvider.",
  6875. // "httpMethod": "GET",
  6876. // "id": "deploymentmanager.typeProviders.getType",
  6877. // "parameterOrder": [
  6878. // "project",
  6879. // "typeProvider",
  6880. // "type"
  6881. // ],
  6882. // "parameters": {
  6883. // "project": {
  6884. // "description": "The project ID for this request.",
  6885. // "location": "path",
  6886. // "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])?))",
  6887. // "required": true,
  6888. // "type": "string"
  6889. // },
  6890. // "type": {
  6891. // "description": "The name of the type provider type for this request.",
  6892. // "location": "path",
  6893. // "required": true,
  6894. // "type": "string"
  6895. // },
  6896. // "typeProvider": {
  6897. // "description": "The name of the type provider for this request.",
  6898. // "location": "path",
  6899. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6900. // "required": true,
  6901. // "type": "string"
  6902. // }
  6903. // },
  6904. // "path": "{project}/global/typeProviders/{typeProvider}/types/{type}",
  6905. // "response": {
  6906. // "$ref": "TypeInfo"
  6907. // },
  6908. // "scopes": [
  6909. // "https://www.googleapis.com/auth/cloud-platform",
  6910. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6911. // "https://www.googleapis.com/auth/ndev.cloudman",
  6912. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6913. // ]
  6914. // }
  6915. }
  6916. // method id "deploymentmanager.typeProviders.insert":
  6917. type TypeProvidersInsertCall struct {
  6918. s *Service
  6919. project string
  6920. typeprovider *TypeProvider
  6921. urlParams_ gensupport.URLParams
  6922. ctx_ context.Context
  6923. header_ http.Header
  6924. }
  6925. // Insert: Creates a type provider.
  6926. func (r *TypeProvidersService) Insert(project string, typeprovider *TypeProvider) *TypeProvidersInsertCall {
  6927. c := &TypeProvidersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6928. c.project = project
  6929. c.typeprovider = typeprovider
  6930. return c
  6931. }
  6932. // Fields allows partial responses to be retrieved. See
  6933. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6934. // for more information.
  6935. func (c *TypeProvidersInsertCall) Fields(s ...googleapi.Field) *TypeProvidersInsertCall {
  6936. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6937. return c
  6938. }
  6939. // Context sets the context to be used in this call's Do method. Any
  6940. // pending HTTP request will be aborted if the provided context is
  6941. // canceled.
  6942. func (c *TypeProvidersInsertCall) Context(ctx context.Context) *TypeProvidersInsertCall {
  6943. c.ctx_ = ctx
  6944. return c
  6945. }
  6946. // Header returns an http.Header that can be modified by the caller to
  6947. // add HTTP headers to the request.
  6948. func (c *TypeProvidersInsertCall) Header() http.Header {
  6949. if c.header_ == nil {
  6950. c.header_ = make(http.Header)
  6951. }
  6952. return c.header_
  6953. }
  6954. func (c *TypeProvidersInsertCall) doRequest(alt string) (*http.Response, error) {
  6955. reqHeaders := make(http.Header)
  6956. for k, v := range c.header_ {
  6957. reqHeaders[k] = v
  6958. }
  6959. reqHeaders.Set("User-Agent", c.s.userAgent())
  6960. var body io.Reader = nil
  6961. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  6962. if err != nil {
  6963. return nil, err
  6964. }
  6965. reqHeaders.Set("Content-Type", "application/json")
  6966. c.urlParams_.Set("alt", alt)
  6967. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders")
  6968. urls += "?" + c.urlParams_.Encode()
  6969. req, _ := http.NewRequest("POST", urls, body)
  6970. req.Header = reqHeaders
  6971. googleapi.Expand(req.URL, map[string]string{
  6972. "project": c.project,
  6973. })
  6974. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6975. }
  6976. // Do executes the "deploymentmanager.typeProviders.insert" call.
  6977. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6978. // status code is an error. Response headers are in either
  6979. // *Operation.ServerResponse.Header or (if a response was returned at
  6980. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6981. // to check whether the returned error was because
  6982. // http.StatusNotModified was returned.
  6983. func (c *TypeProvidersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6984. gensupport.SetOptions(c.urlParams_, opts...)
  6985. res, err := c.doRequest("json")
  6986. if res != nil && res.StatusCode == http.StatusNotModified {
  6987. if res.Body != nil {
  6988. res.Body.Close()
  6989. }
  6990. return nil, &googleapi.Error{
  6991. Code: res.StatusCode,
  6992. Header: res.Header,
  6993. }
  6994. }
  6995. if err != nil {
  6996. return nil, err
  6997. }
  6998. defer googleapi.CloseBody(res)
  6999. if err := googleapi.CheckResponse(res); err != nil {
  7000. return nil, err
  7001. }
  7002. ret := &Operation{
  7003. ServerResponse: googleapi.ServerResponse{
  7004. Header: res.Header,
  7005. HTTPStatusCode: res.StatusCode,
  7006. },
  7007. }
  7008. target := &ret
  7009. if err := gensupport.DecodeResponse(target, res); err != nil {
  7010. return nil, err
  7011. }
  7012. return ret, nil
  7013. // {
  7014. // "description": "Creates a type provider.",
  7015. // "httpMethod": "POST",
  7016. // "id": "deploymentmanager.typeProviders.insert",
  7017. // "parameterOrder": [
  7018. // "project"
  7019. // ],
  7020. // "parameters": {
  7021. // "project": {
  7022. // "description": "The project ID for this request.",
  7023. // "location": "path",
  7024. // "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])?))",
  7025. // "required": true,
  7026. // "type": "string"
  7027. // }
  7028. // },
  7029. // "path": "{project}/global/typeProviders",
  7030. // "request": {
  7031. // "$ref": "TypeProvider"
  7032. // },
  7033. // "response": {
  7034. // "$ref": "Operation"
  7035. // },
  7036. // "scopes": [
  7037. // "https://www.googleapis.com/auth/cloud-platform",
  7038. // "https://www.googleapis.com/auth/ndev.cloudman"
  7039. // ]
  7040. // }
  7041. }
  7042. // method id "deploymentmanager.typeProviders.list":
  7043. type TypeProvidersListCall struct {
  7044. s *Service
  7045. project string
  7046. urlParams_ gensupport.URLParams
  7047. ifNoneMatch_ string
  7048. ctx_ context.Context
  7049. header_ http.Header
  7050. }
  7051. // List: Lists all resource type providers for Deployment Manager.
  7052. func (r *TypeProvidersService) List(project string) *TypeProvidersListCall {
  7053. c := &TypeProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7054. c.project = project
  7055. return c
  7056. }
  7057. // Filter sets the optional parameter "filter": A filter expression that
  7058. // filters resources listed in the response. The expression must specify
  7059. // the field name, a comparison operator, and the value that you want to
  7060. // use for filtering. The value must be a string, a number, or a
  7061. // boolean. The comparison operator must be either =, !=, >, or <.
  7062. //
  7063. // For example, if you are filtering Compute Engine instances, you can
  7064. // exclude instances named example-instance by specifying name !=
  7065. // example-instance.
  7066. //
  7067. // You can also filter nested fields. For example, you could specify
  7068. // scheduling.automaticRestart = false to include instances only if they
  7069. // are not scheduled for automatic restarts. You can use filtering on
  7070. // nested fields to filter based on resource labels.
  7071. //
  7072. // To filter on multiple expressions, provide each separate expression
  7073. // within parentheses. For example, (scheduling.automaticRestart = true)
  7074. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7075. // AND expression. However, you can include AND and OR expressions
  7076. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7077. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7078. // true).
  7079. func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall {
  7080. c.urlParams_.Set("filter", filter)
  7081. return c
  7082. }
  7083. // MaxResults sets the optional parameter "maxResults": The maximum
  7084. // number of results per page that should be returned. If the number of
  7085. // available results is larger than maxResults, Compute Engine returns a
  7086. // nextPageToken that can be used to get the next page of results in
  7087. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7088. // (Default: 500)
  7089. func (c *TypeProvidersListCall) MaxResults(maxResults int64) *TypeProvidersListCall {
  7090. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7091. return c
  7092. }
  7093. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7094. // a certain order. By default, results are returned in alphanumerical
  7095. // order based on the resource name.
  7096. //
  7097. // You can also sort results in descending order based on the creation
  7098. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7099. // based on the creationTimestamp field in reverse chronological order
  7100. // (newest result first). Use this to sort resources like operations so
  7101. // that the newest operation is returned first.
  7102. //
  7103. // Currently, only sorting by name or creationTimestamp desc is
  7104. // supported.
  7105. func (c *TypeProvidersListCall) OrderBy(orderBy string) *TypeProvidersListCall {
  7106. c.urlParams_.Set("orderBy", orderBy)
  7107. return c
  7108. }
  7109. // PageToken sets the optional parameter "pageToken": Specifies a page
  7110. // token to use. Set pageToken to the nextPageToken returned by a
  7111. // previous list request to get the next page of results.
  7112. func (c *TypeProvidersListCall) PageToken(pageToken string) *TypeProvidersListCall {
  7113. c.urlParams_.Set("pageToken", pageToken)
  7114. return c
  7115. }
  7116. // Fields allows partial responses to be retrieved. See
  7117. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7118. // for more information.
  7119. func (c *TypeProvidersListCall) Fields(s ...googleapi.Field) *TypeProvidersListCall {
  7120. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7121. return c
  7122. }
  7123. // IfNoneMatch sets the optional parameter which makes the operation
  7124. // fail if the object's ETag matches the given value. This is useful for
  7125. // getting updates only after the object has changed since the last
  7126. // request. Use googleapi.IsNotModified to check whether the response
  7127. // error from Do is the result of In-None-Match.
  7128. func (c *TypeProvidersListCall) IfNoneMatch(entityTag string) *TypeProvidersListCall {
  7129. c.ifNoneMatch_ = entityTag
  7130. return c
  7131. }
  7132. // Context sets the context to be used in this call's Do method. Any
  7133. // pending HTTP request will be aborted if the provided context is
  7134. // canceled.
  7135. func (c *TypeProvidersListCall) Context(ctx context.Context) *TypeProvidersListCall {
  7136. c.ctx_ = ctx
  7137. return c
  7138. }
  7139. // Header returns an http.Header that can be modified by the caller to
  7140. // add HTTP headers to the request.
  7141. func (c *TypeProvidersListCall) Header() http.Header {
  7142. if c.header_ == nil {
  7143. c.header_ = make(http.Header)
  7144. }
  7145. return c.header_
  7146. }
  7147. func (c *TypeProvidersListCall) doRequest(alt string) (*http.Response, error) {
  7148. reqHeaders := make(http.Header)
  7149. for k, v := range c.header_ {
  7150. reqHeaders[k] = v
  7151. }
  7152. reqHeaders.Set("User-Agent", c.s.userAgent())
  7153. if c.ifNoneMatch_ != "" {
  7154. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7155. }
  7156. var body io.Reader = nil
  7157. c.urlParams_.Set("alt", alt)
  7158. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders")
  7159. urls += "?" + c.urlParams_.Encode()
  7160. req, _ := http.NewRequest("GET", urls, body)
  7161. req.Header = reqHeaders
  7162. googleapi.Expand(req.URL, map[string]string{
  7163. "project": c.project,
  7164. })
  7165. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7166. }
  7167. // Do executes the "deploymentmanager.typeProviders.list" call.
  7168. // Exactly one of *TypeProvidersListResponse or error will be non-nil.
  7169. // Any non-2xx status code is an error. Response headers are in either
  7170. // *TypeProvidersListResponse.ServerResponse.Header or (if a response
  7171. // was returned at all) in error.(*googleapi.Error).Header. Use
  7172. // googleapi.IsNotModified to check whether the returned error was
  7173. // because http.StatusNotModified was returned.
  7174. func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListResponse, error) {
  7175. gensupport.SetOptions(c.urlParams_, opts...)
  7176. res, err := c.doRequest("json")
  7177. if res != nil && res.StatusCode == http.StatusNotModified {
  7178. if res.Body != nil {
  7179. res.Body.Close()
  7180. }
  7181. return nil, &googleapi.Error{
  7182. Code: res.StatusCode,
  7183. Header: res.Header,
  7184. }
  7185. }
  7186. if err != nil {
  7187. return nil, err
  7188. }
  7189. defer googleapi.CloseBody(res)
  7190. if err := googleapi.CheckResponse(res); err != nil {
  7191. return nil, err
  7192. }
  7193. ret := &TypeProvidersListResponse{
  7194. ServerResponse: googleapi.ServerResponse{
  7195. Header: res.Header,
  7196. HTTPStatusCode: res.StatusCode,
  7197. },
  7198. }
  7199. target := &ret
  7200. if err := gensupport.DecodeResponse(target, res); err != nil {
  7201. return nil, err
  7202. }
  7203. return ret, nil
  7204. // {
  7205. // "description": "Lists all resource type providers for Deployment Manager.",
  7206. // "httpMethod": "GET",
  7207. // "id": "deploymentmanager.typeProviders.list",
  7208. // "parameterOrder": [
  7209. // "project"
  7210. // ],
  7211. // "parameters": {
  7212. // "filter": {
  7213. // "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).",
  7214. // "location": "query",
  7215. // "type": "string"
  7216. // },
  7217. // "maxResults": {
  7218. // "default": "500",
  7219. // "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)",
  7220. // "format": "uint32",
  7221. // "location": "query",
  7222. // "minimum": "0",
  7223. // "type": "integer"
  7224. // },
  7225. // "orderBy": {
  7226. // "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.",
  7227. // "location": "query",
  7228. // "type": "string"
  7229. // },
  7230. // "pageToken": {
  7231. // "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.",
  7232. // "location": "query",
  7233. // "type": "string"
  7234. // },
  7235. // "project": {
  7236. // "description": "The project ID for this request.",
  7237. // "location": "path",
  7238. // "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])?))",
  7239. // "required": true,
  7240. // "type": "string"
  7241. // }
  7242. // },
  7243. // "path": "{project}/global/typeProviders",
  7244. // "response": {
  7245. // "$ref": "TypeProvidersListResponse"
  7246. // },
  7247. // "scopes": [
  7248. // "https://www.googleapis.com/auth/cloud-platform",
  7249. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7250. // "https://www.googleapis.com/auth/ndev.cloudman",
  7251. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7252. // ]
  7253. // }
  7254. }
  7255. // Pages invokes f for each page of results.
  7256. // A non-nil error returned from f will halt the iteration.
  7257. // The provided context supersedes any context provided to the Context method.
  7258. func (c *TypeProvidersListCall) Pages(ctx context.Context, f func(*TypeProvidersListResponse) error) error {
  7259. c.ctx_ = ctx
  7260. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7261. for {
  7262. x, err := c.Do()
  7263. if err != nil {
  7264. return err
  7265. }
  7266. if err := f(x); err != nil {
  7267. return err
  7268. }
  7269. if x.NextPageToken == "" {
  7270. return nil
  7271. }
  7272. c.PageToken(x.NextPageToken)
  7273. }
  7274. }
  7275. // method id "deploymentmanager.typeProviders.listTypes":
  7276. type TypeProvidersListTypesCall struct {
  7277. s *Service
  7278. project string
  7279. typeProvider string
  7280. urlParams_ gensupport.URLParams
  7281. ifNoneMatch_ string
  7282. ctx_ context.Context
  7283. header_ http.Header
  7284. }
  7285. // ListTypes: Lists all the type info for a TypeProvider.
  7286. func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *TypeProvidersListTypesCall {
  7287. c := &TypeProvidersListTypesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7288. c.project = project
  7289. c.typeProvider = typeProvider
  7290. return c
  7291. }
  7292. // Filter sets the optional parameter "filter": A filter expression that
  7293. // filters resources listed in the response. The expression must specify
  7294. // the field name, a comparison operator, and the value that you want to
  7295. // use for filtering. The value must be a string, a number, or a
  7296. // boolean. The comparison operator must be either =, !=, >, or <.
  7297. //
  7298. // For example, if you are filtering Compute Engine instances, you can
  7299. // exclude instances named example-instance by specifying name !=
  7300. // example-instance.
  7301. //
  7302. // You can also filter nested fields. For example, you could specify
  7303. // scheduling.automaticRestart = false to include instances only if they
  7304. // are not scheduled for automatic restarts. You can use filtering on
  7305. // nested fields to filter based on resource labels.
  7306. //
  7307. // To filter on multiple expressions, provide each separate expression
  7308. // within parentheses. For example, (scheduling.automaticRestart = true)
  7309. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7310. // AND expression. However, you can include AND and OR expressions
  7311. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7312. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7313. // true).
  7314. func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall {
  7315. c.urlParams_.Set("filter", filter)
  7316. return c
  7317. }
  7318. // MaxResults sets the optional parameter "maxResults": The maximum
  7319. // number of results per page that should be returned. If the number of
  7320. // available results is larger than maxResults, Compute Engine returns a
  7321. // nextPageToken that can be used to get the next page of results in
  7322. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7323. // (Default: 500)
  7324. func (c *TypeProvidersListTypesCall) MaxResults(maxResults int64) *TypeProvidersListTypesCall {
  7325. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7326. return c
  7327. }
  7328. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7329. // a certain order. By default, results are returned in alphanumerical
  7330. // order based on the resource name.
  7331. //
  7332. // You can also sort results in descending order based on the creation
  7333. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7334. // based on the creationTimestamp field in reverse chronological order
  7335. // (newest result first). Use this to sort resources like operations so
  7336. // that the newest operation is returned first.
  7337. //
  7338. // Currently, only sorting by name or creationTimestamp desc is
  7339. // supported.
  7340. func (c *TypeProvidersListTypesCall) OrderBy(orderBy string) *TypeProvidersListTypesCall {
  7341. c.urlParams_.Set("orderBy", orderBy)
  7342. return c
  7343. }
  7344. // PageToken sets the optional parameter "pageToken": Specifies a page
  7345. // token to use. Set pageToken to the nextPageToken returned by a
  7346. // previous list request to get the next page of results.
  7347. func (c *TypeProvidersListTypesCall) PageToken(pageToken string) *TypeProvidersListTypesCall {
  7348. c.urlParams_.Set("pageToken", pageToken)
  7349. return c
  7350. }
  7351. // Fields allows partial responses to be retrieved. See
  7352. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7353. // for more information.
  7354. func (c *TypeProvidersListTypesCall) Fields(s ...googleapi.Field) *TypeProvidersListTypesCall {
  7355. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7356. return c
  7357. }
  7358. // IfNoneMatch sets the optional parameter which makes the operation
  7359. // fail if the object's ETag matches the given value. This is useful for
  7360. // getting updates only after the object has changed since the last
  7361. // request. Use googleapi.IsNotModified to check whether the response
  7362. // error from Do is the result of In-None-Match.
  7363. func (c *TypeProvidersListTypesCall) IfNoneMatch(entityTag string) *TypeProvidersListTypesCall {
  7364. c.ifNoneMatch_ = entityTag
  7365. return c
  7366. }
  7367. // Context sets the context to be used in this call's Do method. Any
  7368. // pending HTTP request will be aborted if the provided context is
  7369. // canceled.
  7370. func (c *TypeProvidersListTypesCall) Context(ctx context.Context) *TypeProvidersListTypesCall {
  7371. c.ctx_ = ctx
  7372. return c
  7373. }
  7374. // Header returns an http.Header that can be modified by the caller to
  7375. // add HTTP headers to the request.
  7376. func (c *TypeProvidersListTypesCall) Header() http.Header {
  7377. if c.header_ == nil {
  7378. c.header_ = make(http.Header)
  7379. }
  7380. return c.header_
  7381. }
  7382. func (c *TypeProvidersListTypesCall) doRequest(alt string) (*http.Response, error) {
  7383. reqHeaders := make(http.Header)
  7384. for k, v := range c.header_ {
  7385. reqHeaders[k] = v
  7386. }
  7387. reqHeaders.Set("User-Agent", c.s.userAgent())
  7388. if c.ifNoneMatch_ != "" {
  7389. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7390. }
  7391. var body io.Reader = nil
  7392. c.urlParams_.Set("alt", alt)
  7393. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types")
  7394. urls += "?" + c.urlParams_.Encode()
  7395. req, _ := http.NewRequest("GET", urls, body)
  7396. req.Header = reqHeaders
  7397. googleapi.Expand(req.URL, map[string]string{
  7398. "project": c.project,
  7399. "typeProvider": c.typeProvider,
  7400. })
  7401. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7402. }
  7403. // Do executes the "deploymentmanager.typeProviders.listTypes" call.
  7404. // Exactly one of *TypeProvidersListTypesResponse or error will be
  7405. // non-nil. Any non-2xx status code is an error. Response headers are in
  7406. // either *TypeProvidersListTypesResponse.ServerResponse.Header or (if a
  7407. // response was returned at all) in error.(*googleapi.Error).Header. Use
  7408. // googleapi.IsNotModified to check whether the returned error was
  7409. // because http.StatusNotModified was returned.
  7410. func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListTypesResponse, error) {
  7411. gensupport.SetOptions(c.urlParams_, opts...)
  7412. res, err := c.doRequest("json")
  7413. if res != nil && res.StatusCode == http.StatusNotModified {
  7414. if res.Body != nil {
  7415. res.Body.Close()
  7416. }
  7417. return nil, &googleapi.Error{
  7418. Code: res.StatusCode,
  7419. Header: res.Header,
  7420. }
  7421. }
  7422. if err != nil {
  7423. return nil, err
  7424. }
  7425. defer googleapi.CloseBody(res)
  7426. if err := googleapi.CheckResponse(res); err != nil {
  7427. return nil, err
  7428. }
  7429. ret := &TypeProvidersListTypesResponse{
  7430. ServerResponse: googleapi.ServerResponse{
  7431. Header: res.Header,
  7432. HTTPStatusCode: res.StatusCode,
  7433. },
  7434. }
  7435. target := &ret
  7436. if err := gensupport.DecodeResponse(target, res); err != nil {
  7437. return nil, err
  7438. }
  7439. return ret, nil
  7440. // {
  7441. // "description": "Lists all the type info for a TypeProvider.",
  7442. // "httpMethod": "GET",
  7443. // "id": "deploymentmanager.typeProviders.listTypes",
  7444. // "parameterOrder": [
  7445. // "project",
  7446. // "typeProvider"
  7447. // ],
  7448. // "parameters": {
  7449. // "filter": {
  7450. // "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).",
  7451. // "location": "query",
  7452. // "type": "string"
  7453. // },
  7454. // "maxResults": {
  7455. // "default": "500",
  7456. // "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)",
  7457. // "format": "uint32",
  7458. // "location": "query",
  7459. // "minimum": "0",
  7460. // "type": "integer"
  7461. // },
  7462. // "orderBy": {
  7463. // "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.",
  7464. // "location": "query",
  7465. // "type": "string"
  7466. // },
  7467. // "pageToken": {
  7468. // "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.",
  7469. // "location": "query",
  7470. // "type": "string"
  7471. // },
  7472. // "project": {
  7473. // "description": "The project ID for this request.",
  7474. // "location": "path",
  7475. // "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])?))",
  7476. // "required": true,
  7477. // "type": "string"
  7478. // },
  7479. // "typeProvider": {
  7480. // "description": "The name of the type provider for this request.",
  7481. // "location": "path",
  7482. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7483. // "required": true,
  7484. // "type": "string"
  7485. // }
  7486. // },
  7487. // "path": "{project}/global/typeProviders/{typeProvider}/types",
  7488. // "response": {
  7489. // "$ref": "TypeProvidersListTypesResponse"
  7490. // },
  7491. // "scopes": [
  7492. // "https://www.googleapis.com/auth/cloud-platform",
  7493. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7494. // "https://www.googleapis.com/auth/ndev.cloudman",
  7495. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7496. // ]
  7497. // }
  7498. }
  7499. // Pages invokes f for each page of results.
  7500. // A non-nil error returned from f will halt the iteration.
  7501. // The provided context supersedes any context provided to the Context method.
  7502. func (c *TypeProvidersListTypesCall) Pages(ctx context.Context, f func(*TypeProvidersListTypesResponse) error) error {
  7503. c.ctx_ = ctx
  7504. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7505. for {
  7506. x, err := c.Do()
  7507. if err != nil {
  7508. return err
  7509. }
  7510. if err := f(x); err != nil {
  7511. return err
  7512. }
  7513. if x.NextPageToken == "" {
  7514. return nil
  7515. }
  7516. c.PageToken(x.NextPageToken)
  7517. }
  7518. }
  7519. // method id "deploymentmanager.typeProviders.patch":
  7520. type TypeProvidersPatchCall struct {
  7521. s *Service
  7522. project string
  7523. typeProvider string
  7524. typeprovider *TypeProvider
  7525. urlParams_ gensupport.URLParams
  7526. ctx_ context.Context
  7527. header_ http.Header
  7528. }
  7529. // Patch: Updates a type provider. This method supports patch semantics.
  7530. func (r *TypeProvidersService) Patch(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersPatchCall {
  7531. c := &TypeProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7532. c.project = project
  7533. c.typeProvider = typeProvider
  7534. c.typeprovider = typeprovider
  7535. return c
  7536. }
  7537. // Fields allows partial responses to be retrieved. See
  7538. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7539. // for more information.
  7540. func (c *TypeProvidersPatchCall) Fields(s ...googleapi.Field) *TypeProvidersPatchCall {
  7541. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7542. return c
  7543. }
  7544. // Context sets the context to be used in this call's Do method. Any
  7545. // pending HTTP request will be aborted if the provided context is
  7546. // canceled.
  7547. func (c *TypeProvidersPatchCall) Context(ctx context.Context) *TypeProvidersPatchCall {
  7548. c.ctx_ = ctx
  7549. return c
  7550. }
  7551. // Header returns an http.Header that can be modified by the caller to
  7552. // add HTTP headers to the request.
  7553. func (c *TypeProvidersPatchCall) Header() http.Header {
  7554. if c.header_ == nil {
  7555. c.header_ = make(http.Header)
  7556. }
  7557. return c.header_
  7558. }
  7559. func (c *TypeProvidersPatchCall) doRequest(alt string) (*http.Response, error) {
  7560. reqHeaders := make(http.Header)
  7561. for k, v := range c.header_ {
  7562. reqHeaders[k] = v
  7563. }
  7564. reqHeaders.Set("User-Agent", c.s.userAgent())
  7565. var body io.Reader = nil
  7566. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7567. if err != nil {
  7568. return nil, err
  7569. }
  7570. reqHeaders.Set("Content-Type", "application/json")
  7571. c.urlParams_.Set("alt", alt)
  7572. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  7573. urls += "?" + c.urlParams_.Encode()
  7574. req, _ := http.NewRequest("PATCH", urls, body)
  7575. req.Header = reqHeaders
  7576. googleapi.Expand(req.URL, map[string]string{
  7577. "project": c.project,
  7578. "typeProvider": c.typeProvider,
  7579. })
  7580. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7581. }
  7582. // Do executes the "deploymentmanager.typeProviders.patch" call.
  7583. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7584. // status code is an error. Response headers are in either
  7585. // *Operation.ServerResponse.Header or (if a response was returned at
  7586. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7587. // to check whether the returned error was because
  7588. // http.StatusNotModified was returned.
  7589. func (c *TypeProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7590. gensupport.SetOptions(c.urlParams_, opts...)
  7591. res, err := c.doRequest("json")
  7592. if res != nil && res.StatusCode == http.StatusNotModified {
  7593. if res.Body != nil {
  7594. res.Body.Close()
  7595. }
  7596. return nil, &googleapi.Error{
  7597. Code: res.StatusCode,
  7598. Header: res.Header,
  7599. }
  7600. }
  7601. if err != nil {
  7602. return nil, err
  7603. }
  7604. defer googleapi.CloseBody(res)
  7605. if err := googleapi.CheckResponse(res); err != nil {
  7606. return nil, err
  7607. }
  7608. ret := &Operation{
  7609. ServerResponse: googleapi.ServerResponse{
  7610. Header: res.Header,
  7611. HTTPStatusCode: res.StatusCode,
  7612. },
  7613. }
  7614. target := &ret
  7615. if err := gensupport.DecodeResponse(target, res); err != nil {
  7616. return nil, err
  7617. }
  7618. return ret, nil
  7619. // {
  7620. // "description": "Updates a type provider. This method supports patch semantics.",
  7621. // "httpMethod": "PATCH",
  7622. // "id": "deploymentmanager.typeProviders.patch",
  7623. // "parameterOrder": [
  7624. // "project",
  7625. // "typeProvider"
  7626. // ],
  7627. // "parameters": {
  7628. // "project": {
  7629. // "description": "The project ID for this request.",
  7630. // "location": "path",
  7631. // "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])?))",
  7632. // "required": true,
  7633. // "type": "string"
  7634. // },
  7635. // "typeProvider": {
  7636. // "description": "The name of the type provider for this request.",
  7637. // "location": "path",
  7638. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7639. // "required": true,
  7640. // "type": "string"
  7641. // }
  7642. // },
  7643. // "path": "{project}/global/typeProviders/{typeProvider}",
  7644. // "request": {
  7645. // "$ref": "TypeProvider"
  7646. // },
  7647. // "response": {
  7648. // "$ref": "Operation"
  7649. // },
  7650. // "scopes": [
  7651. // "https://www.googleapis.com/auth/cloud-platform",
  7652. // "https://www.googleapis.com/auth/ndev.cloudman"
  7653. // ]
  7654. // }
  7655. }
  7656. // method id "deploymentmanager.typeProviders.update":
  7657. type TypeProvidersUpdateCall struct {
  7658. s *Service
  7659. project string
  7660. typeProvider string
  7661. typeprovider *TypeProvider
  7662. urlParams_ gensupport.URLParams
  7663. ctx_ context.Context
  7664. header_ http.Header
  7665. }
  7666. // Update: Updates a type provider.
  7667. func (r *TypeProvidersService) Update(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersUpdateCall {
  7668. c := &TypeProvidersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7669. c.project = project
  7670. c.typeProvider = typeProvider
  7671. c.typeprovider = typeprovider
  7672. return c
  7673. }
  7674. // Fields allows partial responses to be retrieved. See
  7675. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7676. // for more information.
  7677. func (c *TypeProvidersUpdateCall) Fields(s ...googleapi.Field) *TypeProvidersUpdateCall {
  7678. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7679. return c
  7680. }
  7681. // Context sets the context to be used in this call's Do method. Any
  7682. // pending HTTP request will be aborted if the provided context is
  7683. // canceled.
  7684. func (c *TypeProvidersUpdateCall) Context(ctx context.Context) *TypeProvidersUpdateCall {
  7685. c.ctx_ = ctx
  7686. return c
  7687. }
  7688. // Header returns an http.Header that can be modified by the caller to
  7689. // add HTTP headers to the request.
  7690. func (c *TypeProvidersUpdateCall) Header() http.Header {
  7691. if c.header_ == nil {
  7692. c.header_ = make(http.Header)
  7693. }
  7694. return c.header_
  7695. }
  7696. func (c *TypeProvidersUpdateCall) doRequest(alt string) (*http.Response, error) {
  7697. reqHeaders := make(http.Header)
  7698. for k, v := range c.header_ {
  7699. reqHeaders[k] = v
  7700. }
  7701. reqHeaders.Set("User-Agent", c.s.userAgent())
  7702. var body io.Reader = nil
  7703. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7704. if err != nil {
  7705. return nil, err
  7706. }
  7707. reqHeaders.Set("Content-Type", "application/json")
  7708. c.urlParams_.Set("alt", alt)
  7709. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  7710. urls += "?" + c.urlParams_.Encode()
  7711. req, _ := http.NewRequest("PUT", urls, body)
  7712. req.Header = reqHeaders
  7713. googleapi.Expand(req.URL, map[string]string{
  7714. "project": c.project,
  7715. "typeProvider": c.typeProvider,
  7716. })
  7717. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7718. }
  7719. // Do executes the "deploymentmanager.typeProviders.update" call.
  7720. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7721. // status code is an error. Response headers are in either
  7722. // *Operation.ServerResponse.Header or (if a response was returned at
  7723. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7724. // to check whether the returned error was because
  7725. // http.StatusNotModified was returned.
  7726. func (c *TypeProvidersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7727. gensupport.SetOptions(c.urlParams_, opts...)
  7728. res, err := c.doRequest("json")
  7729. if res != nil && res.StatusCode == http.StatusNotModified {
  7730. if res.Body != nil {
  7731. res.Body.Close()
  7732. }
  7733. return nil, &googleapi.Error{
  7734. Code: res.StatusCode,
  7735. Header: res.Header,
  7736. }
  7737. }
  7738. if err != nil {
  7739. return nil, err
  7740. }
  7741. defer googleapi.CloseBody(res)
  7742. if err := googleapi.CheckResponse(res); err != nil {
  7743. return nil, err
  7744. }
  7745. ret := &Operation{
  7746. ServerResponse: googleapi.ServerResponse{
  7747. Header: res.Header,
  7748. HTTPStatusCode: res.StatusCode,
  7749. },
  7750. }
  7751. target := &ret
  7752. if err := gensupport.DecodeResponse(target, res); err != nil {
  7753. return nil, err
  7754. }
  7755. return ret, nil
  7756. // {
  7757. // "description": "Updates a type provider.",
  7758. // "httpMethod": "PUT",
  7759. // "id": "deploymentmanager.typeProviders.update",
  7760. // "parameterOrder": [
  7761. // "project",
  7762. // "typeProvider"
  7763. // ],
  7764. // "parameters": {
  7765. // "project": {
  7766. // "description": "The project ID for this request.",
  7767. // "location": "path",
  7768. // "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])?))",
  7769. // "required": true,
  7770. // "type": "string"
  7771. // },
  7772. // "typeProvider": {
  7773. // "description": "The name of the type provider for this request.",
  7774. // "location": "path",
  7775. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7776. // "required": true,
  7777. // "type": "string"
  7778. // }
  7779. // },
  7780. // "path": "{project}/global/typeProviders/{typeProvider}",
  7781. // "request": {
  7782. // "$ref": "TypeProvider"
  7783. // },
  7784. // "response": {
  7785. // "$ref": "Operation"
  7786. // },
  7787. // "scopes": [
  7788. // "https://www.googleapis.com/auth/cloud-platform",
  7789. // "https://www.googleapis.com/auth/ndev.cloudman"
  7790. // ]
  7791. // }
  7792. }
  7793. // method id "deploymentmanager.types.delete":
  7794. type TypesDeleteCall struct {
  7795. s *Service
  7796. project string
  7797. type_ string
  7798. urlParams_ gensupport.URLParams
  7799. ctx_ context.Context
  7800. header_ http.Header
  7801. }
  7802. // Delete: Deletes a type and all of the resources in the type.
  7803. func (r *TypesService) Delete(project string, type_ string) *TypesDeleteCall {
  7804. c := &TypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7805. c.project = project
  7806. c.type_ = type_
  7807. return c
  7808. }
  7809. // Fields allows partial responses to be retrieved. See
  7810. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7811. // for more information.
  7812. func (c *TypesDeleteCall) Fields(s ...googleapi.Field) *TypesDeleteCall {
  7813. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7814. return c
  7815. }
  7816. // Context sets the context to be used in this call's Do method. Any
  7817. // pending HTTP request will be aborted if the provided context is
  7818. // canceled.
  7819. func (c *TypesDeleteCall) Context(ctx context.Context) *TypesDeleteCall {
  7820. c.ctx_ = ctx
  7821. return c
  7822. }
  7823. // Header returns an http.Header that can be modified by the caller to
  7824. // add HTTP headers to the request.
  7825. func (c *TypesDeleteCall) Header() http.Header {
  7826. if c.header_ == nil {
  7827. c.header_ = make(http.Header)
  7828. }
  7829. return c.header_
  7830. }
  7831. func (c *TypesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7832. reqHeaders := make(http.Header)
  7833. for k, v := range c.header_ {
  7834. reqHeaders[k] = v
  7835. }
  7836. reqHeaders.Set("User-Agent", c.s.userAgent())
  7837. var body io.Reader = nil
  7838. c.urlParams_.Set("alt", alt)
  7839. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types/{type}")
  7840. urls += "?" + c.urlParams_.Encode()
  7841. req, _ := http.NewRequest("DELETE", urls, body)
  7842. req.Header = reqHeaders
  7843. googleapi.Expand(req.URL, map[string]string{
  7844. "project": c.project,
  7845. "type": c.type_,
  7846. })
  7847. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7848. }
  7849. // Do executes the "deploymentmanager.types.delete" call.
  7850. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7851. // status code is an error. Response headers are in either
  7852. // *Operation.ServerResponse.Header or (if a response was returned at
  7853. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7854. // to check whether the returned error was because
  7855. // http.StatusNotModified was returned.
  7856. func (c *TypesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7857. gensupport.SetOptions(c.urlParams_, opts...)
  7858. res, err := c.doRequest("json")
  7859. if res != nil && res.StatusCode == http.StatusNotModified {
  7860. if res.Body != nil {
  7861. res.Body.Close()
  7862. }
  7863. return nil, &googleapi.Error{
  7864. Code: res.StatusCode,
  7865. Header: res.Header,
  7866. }
  7867. }
  7868. if err != nil {
  7869. return nil, err
  7870. }
  7871. defer googleapi.CloseBody(res)
  7872. if err := googleapi.CheckResponse(res); err != nil {
  7873. return nil, err
  7874. }
  7875. ret := &Operation{
  7876. ServerResponse: googleapi.ServerResponse{
  7877. Header: res.Header,
  7878. HTTPStatusCode: res.StatusCode,
  7879. },
  7880. }
  7881. target := &ret
  7882. if err := gensupport.DecodeResponse(target, res); err != nil {
  7883. return nil, err
  7884. }
  7885. return ret, nil
  7886. // {
  7887. // "description": "Deletes a type and all of the resources in the type.",
  7888. // "httpMethod": "DELETE",
  7889. // "id": "deploymentmanager.types.delete",
  7890. // "parameterOrder": [
  7891. // "project",
  7892. // "type"
  7893. // ],
  7894. // "parameters": {
  7895. // "project": {
  7896. // "description": "The project ID for this request.",
  7897. // "location": "path",
  7898. // "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])?))",
  7899. // "required": true,
  7900. // "type": "string"
  7901. // },
  7902. // "type": {
  7903. // "description": "The name of the type for this request.",
  7904. // "location": "path",
  7905. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7906. // "required": true,
  7907. // "type": "string"
  7908. // }
  7909. // },
  7910. // "path": "{project}/global/types/{type}",
  7911. // "response": {
  7912. // "$ref": "Operation"
  7913. // },
  7914. // "scopes": [
  7915. // "https://www.googleapis.com/auth/cloud-platform",
  7916. // "https://www.googleapis.com/auth/ndev.cloudman"
  7917. // ]
  7918. // }
  7919. }
  7920. // method id "deploymentmanager.types.get":
  7921. type TypesGetCall struct {
  7922. s *Service
  7923. project string
  7924. type_ string
  7925. urlParams_ gensupport.URLParams
  7926. ifNoneMatch_ string
  7927. ctx_ context.Context
  7928. header_ http.Header
  7929. }
  7930. // Get: Gets information about a specific type.
  7931. func (r *TypesService) Get(project string, type_ string) *TypesGetCall {
  7932. c := &TypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7933. c.project = project
  7934. c.type_ = type_
  7935. return c
  7936. }
  7937. // Fields allows partial responses to be retrieved. See
  7938. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7939. // for more information.
  7940. func (c *TypesGetCall) Fields(s ...googleapi.Field) *TypesGetCall {
  7941. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7942. return c
  7943. }
  7944. // IfNoneMatch sets the optional parameter which makes the operation
  7945. // fail if the object's ETag matches the given value. This is useful for
  7946. // getting updates only after the object has changed since the last
  7947. // request. Use googleapi.IsNotModified to check whether the response
  7948. // error from Do is the result of In-None-Match.
  7949. func (c *TypesGetCall) IfNoneMatch(entityTag string) *TypesGetCall {
  7950. c.ifNoneMatch_ = entityTag
  7951. return c
  7952. }
  7953. // Context sets the context to be used in this call's Do method. Any
  7954. // pending HTTP request will be aborted if the provided context is
  7955. // canceled.
  7956. func (c *TypesGetCall) Context(ctx context.Context) *TypesGetCall {
  7957. c.ctx_ = ctx
  7958. return c
  7959. }
  7960. // Header returns an http.Header that can be modified by the caller to
  7961. // add HTTP headers to the request.
  7962. func (c *TypesGetCall) Header() http.Header {
  7963. if c.header_ == nil {
  7964. c.header_ = make(http.Header)
  7965. }
  7966. return c.header_
  7967. }
  7968. func (c *TypesGetCall) doRequest(alt string) (*http.Response, error) {
  7969. reqHeaders := make(http.Header)
  7970. for k, v := range c.header_ {
  7971. reqHeaders[k] = v
  7972. }
  7973. reqHeaders.Set("User-Agent", c.s.userAgent())
  7974. if c.ifNoneMatch_ != "" {
  7975. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7976. }
  7977. var body io.Reader = nil
  7978. c.urlParams_.Set("alt", alt)
  7979. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types/{type}")
  7980. urls += "?" + c.urlParams_.Encode()
  7981. req, _ := http.NewRequest("GET", urls, body)
  7982. req.Header = reqHeaders
  7983. googleapi.Expand(req.URL, map[string]string{
  7984. "project": c.project,
  7985. "type": c.type_,
  7986. })
  7987. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7988. }
  7989. // Do executes the "deploymentmanager.types.get" call.
  7990. // Exactly one of *Type or error will be non-nil. Any non-2xx status
  7991. // code is an error. Response headers are in either
  7992. // *Type.ServerResponse.Header or (if a response was returned at all) in
  7993. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7994. // whether the returned error was because http.StatusNotModified was
  7995. // returned.
  7996. func (c *TypesGetCall) Do(opts ...googleapi.CallOption) (*Type, error) {
  7997. gensupport.SetOptions(c.urlParams_, opts...)
  7998. res, err := c.doRequest("json")
  7999. if res != nil && res.StatusCode == http.StatusNotModified {
  8000. if res.Body != nil {
  8001. res.Body.Close()
  8002. }
  8003. return nil, &googleapi.Error{
  8004. Code: res.StatusCode,
  8005. Header: res.Header,
  8006. }
  8007. }
  8008. if err != nil {
  8009. return nil, err
  8010. }
  8011. defer googleapi.CloseBody(res)
  8012. if err := googleapi.CheckResponse(res); err != nil {
  8013. return nil, err
  8014. }
  8015. ret := &Type{
  8016. ServerResponse: googleapi.ServerResponse{
  8017. Header: res.Header,
  8018. HTTPStatusCode: res.StatusCode,
  8019. },
  8020. }
  8021. target := &ret
  8022. if err := gensupport.DecodeResponse(target, res); err != nil {
  8023. return nil, err
  8024. }
  8025. return ret, nil
  8026. // {
  8027. // "description": "Gets information about a specific type.",
  8028. // "httpMethod": "GET",
  8029. // "id": "deploymentmanager.types.get",
  8030. // "parameterOrder": [
  8031. // "project",
  8032. // "type"
  8033. // ],
  8034. // "parameters": {
  8035. // "project": {
  8036. // "description": "The project ID for this request.",
  8037. // "location": "path",
  8038. // "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])?))",
  8039. // "required": true,
  8040. // "type": "string"
  8041. // },
  8042. // "type": {
  8043. // "description": "The name of the type for this request.",
  8044. // "location": "path",
  8045. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  8046. // "required": true,
  8047. // "type": "string"
  8048. // }
  8049. // },
  8050. // "path": "{project}/global/types/{type}",
  8051. // "response": {
  8052. // "$ref": "Type"
  8053. // },
  8054. // "scopes": [
  8055. // "https://www.googleapis.com/auth/cloud-platform",
  8056. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  8057. // "https://www.googleapis.com/auth/ndev.cloudman",
  8058. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  8059. // ]
  8060. // }
  8061. }
  8062. // method id "deploymentmanager.types.insert":
  8063. type TypesInsertCall struct {
  8064. s *Service
  8065. project string
  8066. type_ *Type
  8067. urlParams_ gensupport.URLParams
  8068. ctx_ context.Context
  8069. header_ http.Header
  8070. }
  8071. // Insert: Creates a type.
  8072. func (r *TypesService) Insert(project string, type_ *Type) *TypesInsertCall {
  8073. c := &TypesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8074. c.project = project
  8075. c.type_ = type_
  8076. return c
  8077. }
  8078. // Fields allows partial responses to be retrieved. See
  8079. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8080. // for more information.
  8081. func (c *TypesInsertCall) Fields(s ...googleapi.Field) *TypesInsertCall {
  8082. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8083. return c
  8084. }
  8085. // Context sets the context to be used in this call's Do method. Any
  8086. // pending HTTP request will be aborted if the provided context is
  8087. // canceled.
  8088. func (c *TypesInsertCall) Context(ctx context.Context) *TypesInsertCall {
  8089. c.ctx_ = ctx
  8090. return c
  8091. }
  8092. // Header returns an http.Header that can be modified by the caller to
  8093. // add HTTP headers to the request.
  8094. func (c *TypesInsertCall) Header() http.Header {
  8095. if c.header_ == nil {
  8096. c.header_ = make(http.Header)
  8097. }
  8098. return c.header_
  8099. }
  8100. func (c *TypesInsertCall) doRequest(alt string) (*http.Response, error) {
  8101. reqHeaders := make(http.Header)
  8102. for k, v := range c.header_ {
  8103. reqHeaders[k] = v
  8104. }
  8105. reqHeaders.Set("User-Agent", c.s.userAgent())
  8106. var body io.Reader = nil
  8107. body, err := googleapi.WithoutDataWrapper.JSONReader(c.type_)
  8108. if err != nil {
  8109. return nil, err
  8110. }
  8111. reqHeaders.Set("Content-Type", "application/json")
  8112. c.urlParams_.Set("alt", alt)
  8113. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types")
  8114. urls += "?" + c.urlParams_.Encode()
  8115. req, _ := http.NewRequest("POST", urls, body)
  8116. req.Header = reqHeaders
  8117. googleapi.Expand(req.URL, map[string]string{
  8118. "project": c.project,
  8119. })
  8120. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8121. }
  8122. // Do executes the "deploymentmanager.types.insert" call.
  8123. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8124. // status code is an error. Response headers are in either
  8125. // *Operation.ServerResponse.Header or (if a response was returned at
  8126. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8127. // to check whether the returned error was because
  8128. // http.StatusNotModified was returned.
  8129. func (c *TypesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8130. gensupport.SetOptions(c.urlParams_, opts...)
  8131. res, err := c.doRequest("json")
  8132. if res != nil && res.StatusCode == http.StatusNotModified {
  8133. if res.Body != nil {
  8134. res.Body.Close()
  8135. }
  8136. return nil, &googleapi.Error{
  8137. Code: res.StatusCode,
  8138. Header: res.Header,
  8139. }
  8140. }
  8141. if err != nil {
  8142. return nil, err
  8143. }
  8144. defer googleapi.CloseBody(res)
  8145. if err := googleapi.CheckResponse(res); err != nil {
  8146. return nil, err
  8147. }
  8148. ret := &Operation{
  8149. ServerResponse: googleapi.ServerResponse{
  8150. Header: res.Header,
  8151. HTTPStatusCode: res.StatusCode,
  8152. },
  8153. }
  8154. target := &ret
  8155. if err := gensupport.DecodeResponse(target, res); err != nil {
  8156. return nil, err
  8157. }
  8158. return ret, nil
  8159. // {
  8160. // "description": "Creates a type.",
  8161. // "httpMethod": "POST",
  8162. // "id": "deploymentmanager.types.insert",
  8163. // "parameterOrder": [
  8164. // "project"
  8165. // ],
  8166. // "parameters": {
  8167. // "project": {
  8168. // "description": "The project ID for this request.",
  8169. // "location": "path",
  8170. // "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])?))",
  8171. // "required": true,
  8172. // "type": "string"
  8173. // }
  8174. // },
  8175. // "path": "{project}/global/types",
  8176. // "request": {
  8177. // "$ref": "Type"
  8178. // },
  8179. // "response": {
  8180. // "$ref": "Operation"
  8181. // },
  8182. // "scopes": [
  8183. // "https://www.googleapis.com/auth/cloud-platform",
  8184. // "https://www.googleapis.com/auth/ndev.cloudman"
  8185. // ]
  8186. // }
  8187. }
  8188. // method id "deploymentmanager.types.list":
  8189. type TypesListCall struct {
  8190. s *Service
  8191. project string
  8192. urlParams_ gensupport.URLParams
  8193. ifNoneMatch_ string
  8194. ctx_ context.Context
  8195. header_ http.Header
  8196. }
  8197. // List: Lists all resource types for Deployment Manager.
  8198. func (r *TypesService) List(project string) *TypesListCall {
  8199. c := &TypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8200. c.project = project
  8201. return c
  8202. }
  8203. // Filter sets the optional parameter "filter": A filter expression that
  8204. // filters resources listed in the response. The expression must specify
  8205. // the field name, a comparison operator, and the value that you want to
  8206. // use for filtering. The value must be a string, a number, or a
  8207. // boolean. The comparison operator must be either =, !=, >, or <.
  8208. //
  8209. // For example, if you are filtering Compute Engine instances, you can
  8210. // exclude instances named example-instance by specifying name !=
  8211. // example-instance.
  8212. //
  8213. // You can also filter nested fields. For example, you could specify
  8214. // scheduling.automaticRestart = false to include instances only if they
  8215. // are not scheduled for automatic restarts. You can use filtering on
  8216. // nested fields to filter based on resource labels.
  8217. //
  8218. // To filter on multiple expressions, provide each separate expression
  8219. // within parentheses. For example, (scheduling.automaticRestart = true)
  8220. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  8221. // AND expression. However, you can include AND and OR expressions
  8222. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  8223. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  8224. // true).
  8225. func (c *TypesListCall) Filter(filter string) *TypesListCall {
  8226. c.urlParams_.Set("filter", filter)
  8227. return c
  8228. }
  8229. // MaxResults sets the optional parameter "maxResults": The maximum
  8230. // number of results per page that should be returned. If the number of
  8231. // available results is larger than maxResults, Compute Engine returns a
  8232. // nextPageToken that can be used to get the next page of results in
  8233. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  8234. // (Default: 500)
  8235. func (c *TypesListCall) MaxResults(maxResults int64) *TypesListCall {
  8236. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  8237. return c
  8238. }
  8239. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  8240. // a certain order. By default, results are returned in alphanumerical
  8241. // order based on the resource name.
  8242. //
  8243. // You can also sort results in descending order based on the creation
  8244. // timestamp using orderBy="creationTimestamp desc". This sorts results
  8245. // based on the creationTimestamp field in reverse chronological order
  8246. // (newest result first). Use this to sort resources like operations so
  8247. // that the newest operation is returned first.
  8248. //
  8249. // Currently, only sorting by name or creationTimestamp desc is
  8250. // supported.
  8251. func (c *TypesListCall) OrderBy(orderBy string) *TypesListCall {
  8252. c.urlParams_.Set("orderBy", orderBy)
  8253. return c
  8254. }
  8255. // PageToken sets the optional parameter "pageToken": Specifies a page
  8256. // token to use. Set pageToken to the nextPageToken returned by a
  8257. // previous list request to get the next page of results.
  8258. func (c *TypesListCall) PageToken(pageToken string) *TypesListCall {
  8259. c.urlParams_.Set("pageToken", pageToken)
  8260. return c
  8261. }
  8262. // Fields allows partial responses to be retrieved. See
  8263. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8264. // for more information.
  8265. func (c *TypesListCall) Fields(s ...googleapi.Field) *TypesListCall {
  8266. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8267. return c
  8268. }
  8269. // IfNoneMatch sets the optional parameter which makes the operation
  8270. // fail if the object's ETag matches the given value. This is useful for
  8271. // getting updates only after the object has changed since the last
  8272. // request. Use googleapi.IsNotModified to check whether the response
  8273. // error from Do is the result of In-None-Match.
  8274. func (c *TypesListCall) IfNoneMatch(entityTag string) *TypesListCall {
  8275. c.ifNoneMatch_ = entityTag
  8276. return c
  8277. }
  8278. // Context sets the context to be used in this call's Do method. Any
  8279. // pending HTTP request will be aborted if the provided context is
  8280. // canceled.
  8281. func (c *TypesListCall) Context(ctx context.Context) *TypesListCall {
  8282. c.ctx_ = ctx
  8283. return c
  8284. }
  8285. // Header returns an http.Header that can be modified by the caller to
  8286. // add HTTP headers to the request.
  8287. func (c *TypesListCall) Header() http.Header {
  8288. if c.header_ == nil {
  8289. c.header_ = make(http.Header)
  8290. }
  8291. return c.header_
  8292. }
  8293. func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
  8294. reqHeaders := make(http.Header)
  8295. for k, v := range c.header_ {
  8296. reqHeaders[k] = v
  8297. }
  8298. reqHeaders.Set("User-Agent", c.s.userAgent())
  8299. if c.ifNoneMatch_ != "" {
  8300. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8301. }
  8302. var body io.Reader = nil
  8303. c.urlParams_.Set("alt", alt)
  8304. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types")
  8305. urls += "?" + c.urlParams_.Encode()
  8306. req, _ := http.NewRequest("GET", urls, body)
  8307. req.Header = reqHeaders
  8308. googleapi.Expand(req.URL, map[string]string{
  8309. "project": c.project,
  8310. })
  8311. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8312. }
  8313. // Do executes the "deploymentmanager.types.list" call.
  8314. // Exactly one of *TypesListResponse or error will be non-nil. Any
  8315. // non-2xx status code is an error. Response headers are in either
  8316. // *TypesListResponse.ServerResponse.Header or (if a response was
  8317. // returned at all) in error.(*googleapi.Error).Header. Use
  8318. // googleapi.IsNotModified to check whether the returned error was
  8319. // because http.StatusNotModified was returned.
  8320. func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, error) {
  8321. gensupport.SetOptions(c.urlParams_, opts...)
  8322. res, err := c.doRequest("json")
  8323. if res != nil && res.StatusCode == http.StatusNotModified {
  8324. if res.Body != nil {
  8325. res.Body.Close()
  8326. }
  8327. return nil, &googleapi.Error{
  8328. Code: res.StatusCode,
  8329. Header: res.Header,
  8330. }
  8331. }
  8332. if err != nil {
  8333. return nil, err
  8334. }
  8335. defer googleapi.CloseBody(res)
  8336. if err := googleapi.CheckResponse(res); err != nil {
  8337. return nil, err
  8338. }
  8339. ret := &TypesListResponse{
  8340. ServerResponse: googleapi.ServerResponse{
  8341. Header: res.Header,
  8342. HTTPStatusCode: res.StatusCode,
  8343. },
  8344. }
  8345. target := &ret
  8346. if err := gensupport.DecodeResponse(target, res); err != nil {
  8347. return nil, err
  8348. }
  8349. return ret, nil
  8350. // {
  8351. // "description": "Lists all resource types for Deployment Manager.",
  8352. // "httpMethod": "GET",
  8353. // "id": "deploymentmanager.types.list",
  8354. // "parameterOrder": [
  8355. // "project"
  8356. // ],
  8357. // "parameters": {
  8358. // "filter": {
  8359. // "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).",
  8360. // "location": "query",
  8361. // "type": "string"
  8362. // },
  8363. // "maxResults": {
  8364. // "default": "500",
  8365. // "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)",
  8366. // "format": "uint32",
  8367. // "location": "query",
  8368. // "minimum": "0",
  8369. // "type": "integer"
  8370. // },
  8371. // "orderBy": {
  8372. // "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.",
  8373. // "location": "query",
  8374. // "type": "string"
  8375. // },
  8376. // "pageToken": {
  8377. // "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.",
  8378. // "location": "query",
  8379. // "type": "string"
  8380. // },
  8381. // "project": {
  8382. // "description": "The project ID for this request.",
  8383. // "location": "path",
  8384. // "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])?))",
  8385. // "required": true,
  8386. // "type": "string"
  8387. // }
  8388. // },
  8389. // "path": "{project}/global/types",
  8390. // "response": {
  8391. // "$ref": "TypesListResponse"
  8392. // },
  8393. // "scopes": [
  8394. // "https://www.googleapis.com/auth/cloud-platform",
  8395. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  8396. // "https://www.googleapis.com/auth/ndev.cloudman",
  8397. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  8398. // ]
  8399. // }
  8400. }
  8401. // Pages invokes f for each page of results.
  8402. // A non-nil error returned from f will halt the iteration.
  8403. // The provided context supersedes any context provided to the Context method.
  8404. func (c *TypesListCall) Pages(ctx context.Context, f func(*TypesListResponse) error) error {
  8405. c.ctx_ = ctx
  8406. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8407. for {
  8408. x, err := c.Do()
  8409. if err != nil {
  8410. return err
  8411. }
  8412. if err := f(x); err != nil {
  8413. return err
  8414. }
  8415. if x.NextPageToken == "" {
  8416. return nil
  8417. }
  8418. c.PageToken(x.NextPageToken)
  8419. }
  8420. }
  8421. // method id "deploymentmanager.types.patch":
  8422. type TypesPatchCall struct {
  8423. s *Service
  8424. project string
  8425. type_ string
  8426. type_2 *Type
  8427. urlParams_ gensupport.URLParams
  8428. ctx_ context.Context
  8429. header_ http.Header
  8430. }
  8431. // Patch: Updates a type. This method supports patch semantics.
  8432. func (r *TypesService) Patch(project string, type_ string, type_2 *Type) *TypesPatchCall {
  8433. c := &TypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8434. c.project = project
  8435. c.type_ = type_
  8436. c.type_2 = type_2
  8437. return c
  8438. }
  8439. // Fields allows partial responses to be retrieved. See
  8440. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8441. // for more information.
  8442. func (c *TypesPatchCall) Fields(s ...googleapi.Field) *TypesPatchCall {
  8443. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8444. return c
  8445. }
  8446. // Context sets the context to be used in this call's Do method. Any
  8447. // pending HTTP request will be aborted if the provided context is
  8448. // canceled.
  8449. func (c *TypesPatchCall) Context(ctx context.Context) *TypesPatchCall {
  8450. c.ctx_ = ctx
  8451. return c
  8452. }
  8453. // Header returns an http.Header that can be modified by the caller to
  8454. // add HTTP headers to the request.
  8455. func (c *TypesPatchCall) Header() http.Header {
  8456. if c.header_ == nil {
  8457. c.header_ = make(http.Header)
  8458. }
  8459. return c.header_
  8460. }
  8461. func (c *TypesPatchCall) doRequest(alt string) (*http.Response, error) {
  8462. reqHeaders := make(http.Header)
  8463. for k, v := range c.header_ {
  8464. reqHeaders[k] = v
  8465. }
  8466. reqHeaders.Set("User-Agent", c.s.userAgent())
  8467. var body io.Reader = nil
  8468. body, err := googleapi.WithoutDataWrapper.JSONReader(c.type_2)
  8469. if err != nil {
  8470. return nil, err
  8471. }
  8472. reqHeaders.Set("Content-Type", "application/json")
  8473. c.urlParams_.Set("alt", alt)
  8474. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types/{type}")
  8475. urls += "?" + c.urlParams_.Encode()
  8476. req, _ := http.NewRequest("PATCH", urls, body)
  8477. req.Header = reqHeaders
  8478. googleapi.Expand(req.URL, map[string]string{
  8479. "project": c.project,
  8480. "type": c.type_,
  8481. })
  8482. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8483. }
  8484. // Do executes the "deploymentmanager.types.patch" call.
  8485. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8486. // status code is an error. Response headers are in either
  8487. // *Operation.ServerResponse.Header or (if a response was returned at
  8488. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8489. // to check whether the returned error was because
  8490. // http.StatusNotModified was returned.
  8491. func (c *TypesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8492. gensupport.SetOptions(c.urlParams_, opts...)
  8493. res, err := c.doRequest("json")
  8494. if res != nil && res.StatusCode == http.StatusNotModified {
  8495. if res.Body != nil {
  8496. res.Body.Close()
  8497. }
  8498. return nil, &googleapi.Error{
  8499. Code: res.StatusCode,
  8500. Header: res.Header,
  8501. }
  8502. }
  8503. if err != nil {
  8504. return nil, err
  8505. }
  8506. defer googleapi.CloseBody(res)
  8507. if err := googleapi.CheckResponse(res); err != nil {
  8508. return nil, err
  8509. }
  8510. ret := &Operation{
  8511. ServerResponse: googleapi.ServerResponse{
  8512. Header: res.Header,
  8513. HTTPStatusCode: res.StatusCode,
  8514. },
  8515. }
  8516. target := &ret
  8517. if err := gensupport.DecodeResponse(target, res); err != nil {
  8518. return nil, err
  8519. }
  8520. return ret, nil
  8521. // {
  8522. // "description": "Updates a type. This method supports patch semantics.",
  8523. // "httpMethod": "PATCH",
  8524. // "id": "deploymentmanager.types.patch",
  8525. // "parameterOrder": [
  8526. // "project",
  8527. // "type"
  8528. // ],
  8529. // "parameters": {
  8530. // "project": {
  8531. // "description": "The project ID for this request.",
  8532. // "location": "path",
  8533. // "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])?))",
  8534. // "required": true,
  8535. // "type": "string"
  8536. // },
  8537. // "type": {
  8538. // "description": "The name of the type for this request.",
  8539. // "location": "path",
  8540. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  8541. // "required": true,
  8542. // "type": "string"
  8543. // }
  8544. // },
  8545. // "path": "{project}/global/types/{type}",
  8546. // "request": {
  8547. // "$ref": "Type"
  8548. // },
  8549. // "response": {
  8550. // "$ref": "Operation"
  8551. // },
  8552. // "scopes": [
  8553. // "https://www.googleapis.com/auth/cloud-platform",
  8554. // "https://www.googleapis.com/auth/ndev.cloudman"
  8555. // ]
  8556. // }
  8557. }
  8558. // method id "deploymentmanager.types.update":
  8559. type TypesUpdateCall struct {
  8560. s *Service
  8561. project string
  8562. type_ string
  8563. type_2 *Type
  8564. urlParams_ gensupport.URLParams
  8565. ctx_ context.Context
  8566. header_ http.Header
  8567. }
  8568. // Update: Updates a type.
  8569. func (r *TypesService) Update(project string, type_ string, type_2 *Type) *TypesUpdateCall {
  8570. c := &TypesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8571. c.project = project
  8572. c.type_ = type_
  8573. c.type_2 = type_2
  8574. return c
  8575. }
  8576. // Fields allows partial responses to be retrieved. See
  8577. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8578. // for more information.
  8579. func (c *TypesUpdateCall) Fields(s ...googleapi.Field) *TypesUpdateCall {
  8580. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8581. return c
  8582. }
  8583. // Context sets the context to be used in this call's Do method. Any
  8584. // pending HTTP request will be aborted if the provided context is
  8585. // canceled.
  8586. func (c *TypesUpdateCall) Context(ctx context.Context) *TypesUpdateCall {
  8587. c.ctx_ = ctx
  8588. return c
  8589. }
  8590. // Header returns an http.Header that can be modified by the caller to
  8591. // add HTTP headers to the request.
  8592. func (c *TypesUpdateCall) Header() http.Header {
  8593. if c.header_ == nil {
  8594. c.header_ = make(http.Header)
  8595. }
  8596. return c.header_
  8597. }
  8598. func (c *TypesUpdateCall) doRequest(alt string) (*http.Response, error) {
  8599. reqHeaders := make(http.Header)
  8600. for k, v := range c.header_ {
  8601. reqHeaders[k] = v
  8602. }
  8603. reqHeaders.Set("User-Agent", c.s.userAgent())
  8604. var body io.Reader = nil
  8605. body, err := googleapi.WithoutDataWrapper.JSONReader(c.type_2)
  8606. if err != nil {
  8607. return nil, err
  8608. }
  8609. reqHeaders.Set("Content-Type", "application/json")
  8610. c.urlParams_.Set("alt", alt)
  8611. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types/{type}")
  8612. urls += "?" + c.urlParams_.Encode()
  8613. req, _ := http.NewRequest("PUT", urls, body)
  8614. req.Header = reqHeaders
  8615. googleapi.Expand(req.URL, map[string]string{
  8616. "project": c.project,
  8617. "type": c.type_,
  8618. })
  8619. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8620. }
  8621. // Do executes the "deploymentmanager.types.update" call.
  8622. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8623. // status code is an error. Response headers are in either
  8624. // *Operation.ServerResponse.Header or (if a response was returned at
  8625. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8626. // to check whether the returned error was because
  8627. // http.StatusNotModified was returned.
  8628. func (c *TypesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8629. gensupport.SetOptions(c.urlParams_, opts...)
  8630. res, err := c.doRequest("json")
  8631. if res != nil && res.StatusCode == http.StatusNotModified {
  8632. if res.Body != nil {
  8633. res.Body.Close()
  8634. }
  8635. return nil, &googleapi.Error{
  8636. Code: res.StatusCode,
  8637. Header: res.Header,
  8638. }
  8639. }
  8640. if err != nil {
  8641. return nil, err
  8642. }
  8643. defer googleapi.CloseBody(res)
  8644. if err := googleapi.CheckResponse(res); err != nil {
  8645. return nil, err
  8646. }
  8647. ret := &Operation{
  8648. ServerResponse: googleapi.ServerResponse{
  8649. Header: res.Header,
  8650. HTTPStatusCode: res.StatusCode,
  8651. },
  8652. }
  8653. target := &ret
  8654. if err := gensupport.DecodeResponse(target, res); err != nil {
  8655. return nil, err
  8656. }
  8657. return ret, nil
  8658. // {
  8659. // "description": "Updates a type.",
  8660. // "httpMethod": "PUT",
  8661. // "id": "deploymentmanager.types.update",
  8662. // "parameterOrder": [
  8663. // "project",
  8664. // "type"
  8665. // ],
  8666. // "parameters": {
  8667. // "project": {
  8668. // "description": "The project ID for this request.",
  8669. // "location": "path",
  8670. // "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])?))",
  8671. // "required": true,
  8672. // "type": "string"
  8673. // },
  8674. // "type": {
  8675. // "description": "The name of the type for this request.",
  8676. // "location": "path",
  8677. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  8678. // "required": true,
  8679. // "type": "string"
  8680. // }
  8681. // },
  8682. // "path": "{project}/global/types/{type}",
  8683. // "request": {
  8684. // "$ref": "Type"
  8685. // },
  8686. // "response": {
  8687. // "$ref": "Operation"
  8688. // },
  8689. // "scopes": [
  8690. // "https://www.googleapis.com/auth/cloud-platform",
  8691. // "https://www.googleapis.com/auth/ndev.cloudman"
  8692. // ]
  8693. // }
  8694. }