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.
 
 
 

8783 lines
332 KiB

  1. // Package deploymentmanager provides access to the Google Cloud Deployment Manager API V2Beta Methods.
  2. //
  3. // See https://developers.google.com/deployment-manager/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/deploymentmanager/v2beta"
  8. // ...
  9. // deploymentmanagerService, err := deploymentmanager.New(oauthHttpClient)
  10. package deploymentmanager // import "google.golang.org/api/deploymentmanager/v2beta"
  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:v2beta"
  41. const apiName = "deploymentmanager"
  42. const apiVersion = "v2beta"
  43. const basePath = "https://www.googleapis.com/deploymentmanager/v2beta/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. // BaseType: BaseType that describes a service-backed Type.
  284. type BaseType struct {
  285. // CollectionOverrides: Allows resource handling overrides for specific
  286. // collections
  287. CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"`
  288. // Credential: Credential used when interacting with this type.
  289. Credential *Credential `json:"credential,omitempty"`
  290. // DescriptorUrl: Descriptor Url for the this type.
  291. DescriptorUrl string `json:"descriptorUrl,omitempty"`
  292. // Options: Options to apply when handling any resources in this
  293. // service.
  294. Options *Options `json:"options,omitempty"`
  295. // ForceSendFields is a list of field names (e.g. "CollectionOverrides")
  296. // to unconditionally include in API requests. By default, fields with
  297. // empty values are omitted from API requests. However, any non-pointer,
  298. // non-interface field appearing in ForceSendFields will be sent to the
  299. // server regardless of whether the field is empty or not. This may be
  300. // used to include empty fields in Patch requests.
  301. ForceSendFields []string `json:"-"`
  302. // NullFields is a list of field names (e.g. "CollectionOverrides") to
  303. // include in API requests with the JSON null value. By default, fields
  304. // with empty values are omitted from API requests. However, any field
  305. // with an empty value appearing in NullFields will be sent to the
  306. // server as null. It is an error if a field in this list has a
  307. // non-empty value. This may be used to include null fields in Patch
  308. // requests.
  309. NullFields []string `json:"-"`
  310. }
  311. func (s *BaseType) MarshalJSON() ([]byte, error) {
  312. type NoMethod BaseType
  313. raw := NoMethod(*s)
  314. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  315. }
  316. // BasicAuth: Basic Auth used as a credential.
  317. type BasicAuth struct {
  318. Password string `json:"password,omitempty"`
  319. User string `json:"user,omitempty"`
  320. // ForceSendFields is a list of field names (e.g. "Password") to
  321. // unconditionally include in API requests. By default, fields with
  322. // empty values are omitted from API requests. However, any non-pointer,
  323. // non-interface field appearing in ForceSendFields will be sent to the
  324. // server regardless of whether the field is empty or not. This may be
  325. // used to include empty fields in Patch requests.
  326. ForceSendFields []string `json:"-"`
  327. // NullFields is a list of field names (e.g. "Password") to include in
  328. // API requests with the JSON null value. By default, fields with empty
  329. // values are omitted from API requests. However, any field with an
  330. // empty value appearing in NullFields will be sent to the server as
  331. // null. It is an error if a field in this list has a non-empty value.
  332. // This may be used to include null fields in Patch requests.
  333. NullFields []string `json:"-"`
  334. }
  335. func (s *BasicAuth) MarshalJSON() ([]byte, error) {
  336. type NoMethod BasicAuth
  337. raw := NoMethod(*s)
  338. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  339. }
  340. // Binding: Associates `members` with a `role`.
  341. type Binding struct {
  342. // Condition: The condition that is associated with this binding. NOTE:
  343. // an unsatisfied condition will not allow user access via current
  344. // binding. Different bindings, including their conditions, are examined
  345. // independently. This field is only visible as GOOGLE_INTERNAL or
  346. // CONDITION_TRUSTED_TESTER.
  347. Condition *Expr `json:"condition,omitempty"`
  348. // Members: Specifies the identities requesting access for a Cloud
  349. // Platform resource. `members` can have the following values:
  350. //
  351. // * `allUsers`: A special identifier that represents anyone who is on
  352. // the internet; with or without a Google account.
  353. //
  354. // * `allAuthenticatedUsers`: A special identifier that represents
  355. // anyone who is authenticated with a Google account or a service
  356. // account.
  357. //
  358. // * `user:{emailid}`: An email address that represents a specific
  359. // Google account. For example, `alice@gmail.com` .
  360. //
  361. //
  362. //
  363. // * `serviceAccount:{emailid}`: An email address that represents a
  364. // service account. For example,
  365. // `my-other-app@appspot.gserviceaccount.com`.
  366. //
  367. // * `group:{emailid}`: An email address that represents a Google group.
  368. // For example, `admins@example.com`.
  369. //
  370. //
  371. //
  372. // * `domain:{domain}`: A Google Apps domain name that represents all
  373. // the users of that domain. For example, `google.com` or `example.com`.
  374. Members []string `json:"members,omitempty"`
  375. // Role: Role that is assigned to `members`. For example,
  376. // `roles/viewer`, `roles/editor`, or `roles/owner`.
  377. Role string `json:"role,omitempty"`
  378. // ForceSendFields is a list of field names (e.g. "Condition") to
  379. // unconditionally include in API requests. By default, fields with
  380. // empty values are omitted from API requests. However, any non-pointer,
  381. // non-interface field appearing in ForceSendFields will be sent to the
  382. // server regardless of whether the field is empty or not. This may be
  383. // used to include empty fields in Patch requests.
  384. ForceSendFields []string `json:"-"`
  385. // NullFields is a list of field names (e.g. "Condition") to include in
  386. // API requests with the JSON null value. By default, fields with empty
  387. // values are omitted from API requests. However, any field with an
  388. // empty value appearing in NullFields will be sent to the server as
  389. // null. It is an error if a field in this list has a non-empty value.
  390. // This may be used to include null fields in Patch requests.
  391. NullFields []string `json:"-"`
  392. }
  393. func (s *Binding) MarshalJSON() ([]byte, error) {
  394. type NoMethod Binding
  395. raw := NoMethod(*s)
  396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  397. }
  398. // CollectionOverride: CollectionOverride allows resource handling
  399. // overrides for specific resources within a BaseType
  400. type CollectionOverride struct {
  401. // Collection: The collection that identifies this resource within its
  402. // service.
  403. Collection string `json:"collection,omitempty"`
  404. // Options: The options to apply to this resource-level override
  405. Options *Options `json:"options,omitempty"`
  406. // ForceSendFields is a list of field names (e.g. "Collection") to
  407. // unconditionally include in API requests. By default, fields with
  408. // empty values are omitted from API requests. However, any non-pointer,
  409. // non-interface field appearing in ForceSendFields will be sent to the
  410. // server regardless of whether the field is empty or not. This may be
  411. // used to include empty fields in Patch requests.
  412. ForceSendFields []string `json:"-"`
  413. // NullFields is a list of field names (e.g. "Collection") to include in
  414. // API requests with the JSON null value. By default, fields with empty
  415. // values are omitted from API requests. However, any field with an
  416. // empty value appearing in NullFields will be sent to the server as
  417. // null. It is an error if a field in this list has a non-empty value.
  418. // This may be used to include null fields in Patch requests.
  419. NullFields []string `json:"-"`
  420. }
  421. func (s *CollectionOverride) MarshalJSON() ([]byte, error) {
  422. type NoMethod CollectionOverride
  423. raw := NoMethod(*s)
  424. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  425. }
  426. // CompositeType: Holds the composite type.
  427. type CompositeType struct {
  428. // Description: An optional textual description of the resource;
  429. // provided by the client when the resource is created.
  430. Description string `json:"description,omitempty"`
  431. // Id: Output only. Unique identifier for the resource; defined by the
  432. // server.
  433. Id uint64 `json:"id,omitempty,string"`
  434. // InsertTime: Output only. Timestamp when the composite type was
  435. // created, in RFC3339 text format.
  436. InsertTime string `json:"insertTime,omitempty"`
  437. // Labels: Map of labels; provided by the client when the resource is
  438. // created or updated. Specifically: Label keys must be between 1 and 63
  439. // characters long and must conform to the following regular expression:
  440. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  441. // characters long and must conform to the regular expression
  442. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  443. Labels []*CompositeTypeLabelEntry `json:"labels,omitempty"`
  444. // Name: Name of the composite type, must follow the expression:
  445. // [a-z]([-a-z0-9_.]{0,61}[a-z0-9])?.
  446. Name string `json:"name,omitempty"`
  447. // Operation: Output only. The Operation that most recently ran, or is
  448. // currently running, on this composite type.
  449. Operation *Operation `json:"operation,omitempty"`
  450. // SelfLink: Output only. Self link for the type provider.
  451. SelfLink string `json:"selfLink,omitempty"`
  452. Status string `json:"status,omitempty"`
  453. // TemplateContents: Files for the template type.
  454. TemplateContents *TemplateContents `json:"templateContents,omitempty"`
  455. // ServerResponse contains the HTTP response code and headers from the
  456. // server.
  457. googleapi.ServerResponse `json:"-"`
  458. // ForceSendFields is a list of field names (e.g. "Description") to
  459. // unconditionally include in API requests. By default, fields with
  460. // empty values are omitted from API requests. However, any non-pointer,
  461. // non-interface field appearing in ForceSendFields will be sent to the
  462. // server regardless of whether the field is empty or not. This may be
  463. // used to include empty fields in Patch requests.
  464. ForceSendFields []string `json:"-"`
  465. // NullFields is a list of field names (e.g. "Description") to include
  466. // in API requests with the JSON null value. By default, fields with
  467. // empty values are omitted from API requests. However, any field with
  468. // an empty value appearing in NullFields will be sent to the server as
  469. // null. It is an error if a field in this list has a non-empty value.
  470. // This may be used to include null fields in Patch requests.
  471. NullFields []string `json:"-"`
  472. }
  473. func (s *CompositeType) MarshalJSON() ([]byte, error) {
  474. type NoMethod CompositeType
  475. raw := NoMethod(*s)
  476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  477. }
  478. type CompositeTypeLabelEntry struct {
  479. Key string `json:"key,omitempty"`
  480. Value string `json:"value,omitempty"`
  481. // ForceSendFields is a list of field names (e.g. "Key") to
  482. // unconditionally include in API requests. By default, fields with
  483. // empty values are omitted from API requests. However, any non-pointer,
  484. // non-interface field appearing in ForceSendFields will be sent to the
  485. // server regardless of whether the field is empty or not. This may be
  486. // used to include empty fields in Patch requests.
  487. ForceSendFields []string `json:"-"`
  488. // NullFields is a list of field names (e.g. "Key") to include in API
  489. // requests with the JSON null value. By default, fields with empty
  490. // values are omitted from API requests. However, any field with an
  491. // empty value appearing in NullFields will be sent to the server as
  492. // null. It is an error if a field in this list has a non-empty value.
  493. // This may be used to include null fields in Patch requests.
  494. NullFields []string `json:"-"`
  495. }
  496. func (s *CompositeTypeLabelEntry) MarshalJSON() ([]byte, error) {
  497. type NoMethod CompositeTypeLabelEntry
  498. raw := NoMethod(*s)
  499. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  500. }
  501. // CompositeTypesListResponse: A response that returns all Composite
  502. // Types supported by Deployment Manager
  503. type CompositeTypesListResponse struct {
  504. // CompositeTypes: Output only. A list of resource composite types
  505. // supported by Deployment Manager.
  506. CompositeTypes []*CompositeType `json:"compositeTypes,omitempty"`
  507. // NextPageToken: A token used to continue a truncated list request.
  508. NextPageToken string `json:"nextPageToken,omitempty"`
  509. // ServerResponse contains the HTTP response code and headers from the
  510. // server.
  511. googleapi.ServerResponse `json:"-"`
  512. // ForceSendFields is a list of field names (e.g. "CompositeTypes") to
  513. // unconditionally include in API requests. By default, fields with
  514. // empty values are omitted from API requests. However, any non-pointer,
  515. // non-interface field appearing in ForceSendFields will be sent to the
  516. // server regardless of whether the field is empty or not. This may be
  517. // used to include empty fields in Patch requests.
  518. ForceSendFields []string `json:"-"`
  519. // NullFields is a list of field names (e.g. "CompositeTypes") to
  520. // include in API requests with the JSON null value. By default, fields
  521. // with empty values are omitted from API requests. However, any field
  522. // with an empty value appearing in NullFields will be sent to the
  523. // server as null. It is an error if a field in this list has a
  524. // non-empty value. This may be used to include null fields in Patch
  525. // requests.
  526. NullFields []string `json:"-"`
  527. }
  528. func (s *CompositeTypesListResponse) MarshalJSON() ([]byte, error) {
  529. type NoMethod CompositeTypesListResponse
  530. raw := NoMethod(*s)
  531. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  532. }
  533. // Condition: A condition to be met.
  534. type Condition struct {
  535. // Iam: Trusted attributes supplied by the IAM system.
  536. Iam string `json:"iam,omitempty"`
  537. // Op: An operator to apply the subject with.
  538. Op string `json:"op,omitempty"`
  539. // Svc: Trusted attributes discharged by the service.
  540. Svc string `json:"svc,omitempty"`
  541. // Sys: Trusted attributes supplied by any service that owns resources
  542. // and uses the IAM system for access control.
  543. Sys string `json:"sys,omitempty"`
  544. // Value: DEPRECATED. Use 'values' instead.
  545. Value string `json:"value,omitempty"`
  546. // Values: The objects of the condition. This is mutually exclusive with
  547. // 'value'.
  548. Values []string `json:"values,omitempty"`
  549. // ForceSendFields is a list of field names (e.g. "Iam") to
  550. // unconditionally include in API requests. By default, fields with
  551. // empty values are omitted from API requests. However, any non-pointer,
  552. // non-interface field appearing in ForceSendFields will be sent to the
  553. // server regardless of whether the field is empty or not. This may be
  554. // used to include empty fields in Patch requests.
  555. ForceSendFields []string `json:"-"`
  556. // NullFields is a list of field names (e.g. "Iam") to include in API
  557. // requests with the JSON null value. By default, fields with empty
  558. // values are omitted from API requests. However, any field with an
  559. // empty value appearing in NullFields will be sent to the server as
  560. // null. It is an error if a field in this list has a non-empty value.
  561. // This may be used to include null fields in Patch requests.
  562. NullFields []string `json:"-"`
  563. }
  564. func (s *Condition) MarshalJSON() ([]byte, error) {
  565. type NoMethod Condition
  566. raw := NoMethod(*s)
  567. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  568. }
  569. type ConfigFile struct {
  570. // Content: The contents of the file.
  571. Content string `json:"content,omitempty"`
  572. // ForceSendFields is a list of field names (e.g. "Content") to
  573. // unconditionally include in API requests. By default, fields with
  574. // empty values are omitted from API requests. However, any non-pointer,
  575. // non-interface field appearing in ForceSendFields will be sent to the
  576. // server regardless of whether the field is empty or not. This may be
  577. // used to include empty fields in Patch requests.
  578. ForceSendFields []string `json:"-"`
  579. // NullFields is a list of field names (e.g. "Content") to include in
  580. // API requests with the JSON null value. By default, fields with empty
  581. // values are omitted from API requests. However, any field with an
  582. // empty value appearing in NullFields will be sent to the server as
  583. // null. It is an error if a field in this list has a non-empty value.
  584. // This may be used to include null fields in Patch requests.
  585. NullFields []string `json:"-"`
  586. }
  587. func (s *ConfigFile) MarshalJSON() ([]byte, error) {
  588. type NoMethod ConfigFile
  589. raw := NoMethod(*s)
  590. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  591. }
  592. // Credential: The credential used by Deployment Manager and
  593. // TypeProvider. Only one of the options is permitted.
  594. type Credential struct {
  595. // BasicAuth: Basic Auth Credential, only used by TypeProvider.
  596. BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
  597. // ServiceAccount: Service Account Credential, only used by Deployment.
  598. ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
  599. // UseProjectDefault: Specify to use the project default credential,
  600. // only supported by Deployment.
  601. UseProjectDefault bool `json:"useProjectDefault,omitempty"`
  602. // ForceSendFields is a list of field names (e.g. "BasicAuth") to
  603. // unconditionally include in API requests. By default, fields with
  604. // empty values are omitted from API requests. However, any non-pointer,
  605. // non-interface field appearing in ForceSendFields will be sent to the
  606. // server regardless of whether the field is empty or not. This may be
  607. // used to include empty fields in Patch requests.
  608. ForceSendFields []string `json:"-"`
  609. // NullFields is a list of field names (e.g. "BasicAuth") to include in
  610. // API requests with the JSON null value. By default, fields with empty
  611. // values are omitted from API requests. However, any field with an
  612. // empty value appearing in NullFields will be sent to the server as
  613. // null. It is an error if a field in this list has a non-empty value.
  614. // This may be used to include null fields in Patch requests.
  615. NullFields []string `json:"-"`
  616. }
  617. func (s *Credential) MarshalJSON() ([]byte, error) {
  618. type NoMethod Credential
  619. raw := NoMethod(*s)
  620. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  621. }
  622. type Deployment struct {
  623. // Description: An optional user-provided description of the deployment.
  624. Description string `json:"description,omitempty"`
  625. // Fingerprint: Provides a fingerprint to use in requests to modify a
  626. // deployment, such as update(), stop(), and cancelPreview() requests. A
  627. // fingerprint is a randomly generated value that must be provided with
  628. // update(), stop(), and cancelPreview() requests to perform optimistic
  629. // locking. This ensures optimistic concurrency so that only one request
  630. // happens at a time.
  631. //
  632. // The fingerprint is initially generated by Deployment Manager and
  633. // changes after every request to modify data. To get the latest
  634. // fingerprint value, perform a get() request to a deployment.
  635. Fingerprint string `json:"fingerprint,omitempty"`
  636. // Id: Output only. Unique identifier for the resource; defined by the
  637. // server.
  638. Id uint64 `json:"id,omitempty,string"`
  639. // InsertTime: Output only. Timestamp when the deployment was created,
  640. // in RFC3339 text format .
  641. InsertTime string `json:"insertTime,omitempty"`
  642. // Labels: Map of labels; provided by the client when the resource is
  643. // created or updated. Specifically: Label keys must be between 1 and 63
  644. // characters long and must conform to the following regular expression:
  645. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  646. // characters long and must conform to the regular expression
  647. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  648. Labels []*DeploymentLabelEntry `json:"labels,omitempty"`
  649. // Manifest: Output only. URL of the manifest representing the last
  650. // manifest that was successfully deployed.
  651. Manifest string `json:"manifest,omitempty"`
  652. // Name: Name of the resource; provided by the client when the resource
  653. // is created. The name must be 1-63 characters long, and comply with
  654. // RFC1035. Specifically, the name must be 1-63 characters long and
  655. // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
  656. // the first character must be a lowercase letter, and all following
  657. // characters must be a dash, lowercase letter, or digit, except the
  658. // last character, which cannot be a dash.
  659. Name string `json:"name,omitempty"`
  660. // Operation: Output only. The Operation that most recently ran, or is
  661. // currently running, on this deployment.
  662. Operation *Operation `json:"operation,omitempty"`
  663. // SelfLink: Output only. Self link for the deployment.
  664. SelfLink string `json:"selfLink,omitempty"`
  665. // Target: [Input Only] The parameters that define your deployment,
  666. // including the deployment configuration and relevant templates.
  667. Target *TargetConfiguration `json:"target,omitempty"`
  668. // Update: Output only. If Deployment Manager is currently updating or
  669. // previewing an update to this deployment, the updated configuration
  670. // appears here.
  671. Update *DeploymentUpdate `json:"update,omitempty"`
  672. // ServerResponse contains the HTTP response code and headers from the
  673. // server.
  674. googleapi.ServerResponse `json:"-"`
  675. // ForceSendFields is a list of field names (e.g. "Description") to
  676. // unconditionally include in API requests. By default, fields with
  677. // empty values are omitted from API requests. However, any non-pointer,
  678. // non-interface field appearing in ForceSendFields will be sent to the
  679. // server regardless of whether the field is empty or not. This may be
  680. // used to include empty fields in Patch requests.
  681. ForceSendFields []string `json:"-"`
  682. // NullFields is a list of field names (e.g. "Description") to include
  683. // in API requests with the JSON null value. By default, fields with
  684. // empty values are omitted from API requests. However, any field with
  685. // an empty value appearing in NullFields will be sent to the server as
  686. // null. It is an error if a field in this list has a non-empty value.
  687. // This may be used to include null fields in Patch requests.
  688. NullFields []string `json:"-"`
  689. }
  690. func (s *Deployment) MarshalJSON() ([]byte, error) {
  691. type NoMethod Deployment
  692. raw := NoMethod(*s)
  693. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  694. }
  695. type DeploymentLabelEntry struct {
  696. Key string `json:"key,omitempty"`
  697. Value string `json:"value,omitempty"`
  698. // ForceSendFields is a list of field names (e.g. "Key") to
  699. // unconditionally include in API requests. By default, fields with
  700. // empty values are omitted from API requests. However, any non-pointer,
  701. // non-interface field appearing in ForceSendFields will be sent to the
  702. // server regardless of whether the field is empty or not. This may be
  703. // used to include empty fields in Patch requests.
  704. ForceSendFields []string `json:"-"`
  705. // NullFields is a list of field names (e.g. "Key") to include in API
  706. // requests with the JSON null value. By default, fields with empty
  707. // values are omitted from API requests. However, any field with an
  708. // empty value appearing in NullFields will be sent to the server as
  709. // null. It is an error if a field in this list has a non-empty value.
  710. // This may be used to include null fields in Patch requests.
  711. NullFields []string `json:"-"`
  712. }
  713. func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) {
  714. type NoMethod DeploymentLabelEntry
  715. raw := NoMethod(*s)
  716. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  717. }
  718. type DeploymentUpdate struct {
  719. // Description: Output only. An optional user-provided description of
  720. // the deployment after the current update has been applied.
  721. Description string `json:"description,omitempty"`
  722. // Labels: Output only. Map of labels; provided by the client when the
  723. // resource is created or updated. Specifically: Label keys must be
  724. // between 1 and 63 characters long and must conform to the following
  725. // regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be
  726. // between 0 and 63 characters long and must conform to the regular
  727. // expression ([a-z]([-a-z0-9]*[a-z0-9])?)?
  728. Labels []*DeploymentUpdateLabelEntry `json:"labels,omitempty"`
  729. // Manifest: Output only. URL of the manifest representing the update
  730. // configuration of this deployment.
  731. Manifest string `json:"manifest,omitempty"`
  732. // ForceSendFields is a list of field names (e.g. "Description") to
  733. // unconditionally include in API requests. By default, fields with
  734. // empty values are omitted from API requests. However, any non-pointer,
  735. // non-interface field appearing in ForceSendFields will be sent to the
  736. // server regardless of whether the field is empty or not. This may be
  737. // used to include empty fields in Patch requests.
  738. ForceSendFields []string `json:"-"`
  739. // NullFields is a list of field names (e.g. "Description") to include
  740. // in API requests with the JSON null value. By default, fields with
  741. // empty values are omitted from API requests. However, any field with
  742. // an empty value appearing in NullFields will be sent to the server as
  743. // null. It is an error if a field in this list has a non-empty value.
  744. // This may be used to include null fields in Patch requests.
  745. NullFields []string `json:"-"`
  746. }
  747. func (s *DeploymentUpdate) MarshalJSON() ([]byte, error) {
  748. type NoMethod DeploymentUpdate
  749. raw := NoMethod(*s)
  750. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  751. }
  752. type DeploymentUpdateLabelEntry struct {
  753. Key string `json:"key,omitempty"`
  754. Value string `json:"value,omitempty"`
  755. // ForceSendFields is a list of field names (e.g. "Key") to
  756. // unconditionally include in API requests. By default, fields with
  757. // empty values are omitted from API requests. However, any non-pointer,
  758. // non-interface field appearing in ForceSendFields will be sent to the
  759. // server regardless of whether the field is empty or not. This may be
  760. // used to include empty fields in Patch requests.
  761. ForceSendFields []string `json:"-"`
  762. // NullFields is a list of field names (e.g. "Key") to include in API
  763. // requests with the JSON null value. By default, fields with empty
  764. // values are omitted from API requests. However, any field with an
  765. // empty value appearing in NullFields will be sent to the server as
  766. // null. It is an error if a field in this list has a non-empty value.
  767. // This may be used to include null fields in Patch requests.
  768. NullFields []string `json:"-"`
  769. }
  770. func (s *DeploymentUpdateLabelEntry) MarshalJSON() ([]byte, error) {
  771. type NoMethod DeploymentUpdateLabelEntry
  772. raw := NoMethod(*s)
  773. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  774. }
  775. type DeploymentsCancelPreviewRequest struct {
  776. // Fingerprint: Specifies a fingerprint for cancelPreview() requests. A
  777. // fingerprint is a randomly generated value that must be provided in
  778. // cancelPreview() requests to perform optimistic locking. This ensures
  779. // optimistic concurrency so that the deployment does not have
  780. // conflicting requests (e.g. if someone attempts to make a new update
  781. // request while another user attempts to cancel a preview, this would
  782. // prevent one of the requests).
  783. //
  784. // The fingerprint is initially generated by Deployment Manager and
  785. // changes after every request to modify a deployment. To get the latest
  786. // fingerprint value, perform a get() request on the deployment.
  787. Fingerprint string `json:"fingerprint,omitempty"`
  788. // ForceSendFields is a list of field names (e.g. "Fingerprint") to
  789. // unconditionally include in API requests. By default, fields with
  790. // empty values are omitted from API requests. However, any non-pointer,
  791. // non-interface field appearing in ForceSendFields will be sent to the
  792. // server regardless of whether the field is empty or not. This may be
  793. // used to include empty fields in Patch requests.
  794. ForceSendFields []string `json:"-"`
  795. // NullFields is a list of field names (e.g. "Fingerprint") to include
  796. // in API requests with the JSON null value. By default, fields with
  797. // empty values are omitted from API requests. However, any field with
  798. // an empty value appearing in NullFields will be sent to the server as
  799. // null. It is an error if a field in this list has a non-empty value.
  800. // This may be used to include null fields in Patch requests.
  801. NullFields []string `json:"-"`
  802. }
  803. func (s *DeploymentsCancelPreviewRequest) MarshalJSON() ([]byte, error) {
  804. type NoMethod DeploymentsCancelPreviewRequest
  805. raw := NoMethod(*s)
  806. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  807. }
  808. // DeploymentsListResponse: A response containing a partial list of
  809. // deployments and a page token used to build the next request if the
  810. // request has been truncated.
  811. type DeploymentsListResponse struct {
  812. // Deployments: Output only. The deployments contained in this response.
  813. Deployments []*Deployment `json:"deployments,omitempty"`
  814. // NextPageToken: Output only. A token used to continue a truncated list
  815. // request.
  816. NextPageToken string `json:"nextPageToken,omitempty"`
  817. // ServerResponse contains the HTTP response code and headers from the
  818. // server.
  819. googleapi.ServerResponse `json:"-"`
  820. // ForceSendFields is a list of field names (e.g. "Deployments") to
  821. // unconditionally include in API requests. By default, fields with
  822. // empty values are omitted from API requests. However, any non-pointer,
  823. // non-interface field appearing in ForceSendFields will be sent to the
  824. // server regardless of whether the field is empty or not. This may be
  825. // used to include empty fields in Patch requests.
  826. ForceSendFields []string `json:"-"`
  827. // NullFields is a list of field names (e.g. "Deployments") to include
  828. // in API requests with the JSON null value. By default, fields with
  829. // empty values are omitted from API requests. However, any field with
  830. // an empty value appearing in NullFields will be sent to the server as
  831. // null. It is an error if a field in this list has a non-empty value.
  832. // This may be used to include null fields in Patch requests.
  833. NullFields []string `json:"-"`
  834. }
  835. func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) {
  836. type NoMethod DeploymentsListResponse
  837. raw := NoMethod(*s)
  838. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  839. }
  840. type DeploymentsStopRequest struct {
  841. // Fingerprint: Specifies a fingerprint for stop() requests. A
  842. // fingerprint is a randomly generated value that must be provided in
  843. // stop() requests to perform optimistic locking. This ensures
  844. // optimistic concurrency so that the deployment does not have
  845. // conflicting requests (e.g. if someone attempts to make a new update
  846. // request while another user attempts to stop an ongoing update
  847. // request, this would prevent a collision).
  848. //
  849. // The fingerprint is initially generated by Deployment Manager and
  850. // changes after every request to modify a deployment. To get the latest
  851. // fingerprint value, perform a get() request on the deployment.
  852. Fingerprint string `json:"fingerprint,omitempty"`
  853. // ForceSendFields is a list of field names (e.g. "Fingerprint") to
  854. // unconditionally include in API requests. By default, fields with
  855. // empty values are omitted from API requests. However, any non-pointer,
  856. // non-interface field appearing in ForceSendFields will be sent to the
  857. // server regardless of whether the field is empty or not. This may be
  858. // used to include empty fields in Patch requests.
  859. ForceSendFields []string `json:"-"`
  860. // NullFields is a list of field names (e.g. "Fingerprint") to include
  861. // in API requests with the JSON null value. By default, fields with
  862. // empty values are omitted from API requests. However, any field with
  863. // an empty value appearing in NullFields will be sent to the server as
  864. // null. It is an error if a field in this list has a non-empty value.
  865. // This may be used to include null fields in Patch requests.
  866. NullFields []string `json:"-"`
  867. }
  868. func (s *DeploymentsStopRequest) MarshalJSON() ([]byte, error) {
  869. type NoMethod DeploymentsStopRequest
  870. raw := NoMethod(*s)
  871. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  872. }
  873. type Diagnostic struct {
  874. // Field: JsonPath expression on the resource that if non empty,
  875. // indicates that this field needs to be extracted as a diagnostic.
  876. Field string `json:"field,omitempty"`
  877. // Level: Level to record this diagnostic.
  878. Level string `json:"level,omitempty"`
  879. // ForceSendFields is a list of field names (e.g. "Field") to
  880. // unconditionally include in API requests. By default, fields with
  881. // empty values are omitted from API requests. However, any non-pointer,
  882. // non-interface field appearing in ForceSendFields will be sent to the
  883. // server regardless of whether the field is empty or not. This may be
  884. // used to include empty fields in Patch requests.
  885. ForceSendFields []string `json:"-"`
  886. // NullFields is a list of field names (e.g. "Field") to include in API
  887. // requests with the JSON null value. By default, fields with empty
  888. // values are omitted from API requests. However, any field with an
  889. // empty value appearing in NullFields will be sent to the server as
  890. // null. It is an error if a field in this list has a non-empty value.
  891. // This may be used to include null fields in Patch requests.
  892. NullFields []string `json:"-"`
  893. }
  894. func (s *Diagnostic) MarshalJSON() ([]byte, error) {
  895. type NoMethod Diagnostic
  896. raw := NoMethod(*s)
  897. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  898. }
  899. // Expr: Represents an expression text. Example:
  900. //
  901. // title: "User account presence" description: "Determines whether the
  902. // request has a user account" expression: "size(request.user) > 0"
  903. type Expr struct {
  904. // Description: An optional description of the expression. This is a
  905. // longer text which describes the expression, e.g. when hovered over it
  906. // in a UI.
  907. Description string `json:"description,omitempty"`
  908. // Expression: Textual representation of an expression in Common
  909. // Expression Language syntax.
  910. //
  911. // The application context of the containing message determines which
  912. // well-known feature set of CEL is supported.
  913. Expression string `json:"expression,omitempty"`
  914. // Location: An optional string indicating the location of the
  915. // expression for error reporting, e.g. a file name and a position in
  916. // the file.
  917. Location string `json:"location,omitempty"`
  918. // Title: An optional title for the expression, i.e. a short string
  919. // describing its purpose. This can be used e.g. in UIs which allow to
  920. // enter the expression.
  921. Title string `json:"title,omitempty"`
  922. // ForceSendFields is a list of field names (e.g. "Description") to
  923. // unconditionally include in API requests. By default, fields with
  924. // empty values are omitted from API requests. However, any non-pointer,
  925. // non-interface field appearing in ForceSendFields will be sent to the
  926. // server regardless of whether the field is empty or not. This may be
  927. // used to include empty fields in Patch requests.
  928. ForceSendFields []string `json:"-"`
  929. // NullFields is a list of field names (e.g. "Description") to include
  930. // in API requests with the JSON null value. By default, fields with
  931. // empty values are omitted from API requests. However, any field with
  932. // an empty value appearing in NullFields will be sent to the server as
  933. // null. It is an error if a field in this list has a non-empty value.
  934. // This may be used to include null fields in Patch requests.
  935. NullFields []string `json:"-"`
  936. }
  937. func (s *Expr) MarshalJSON() ([]byte, error) {
  938. type NoMethod Expr
  939. raw := NoMethod(*s)
  940. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  941. }
  942. type GlobalSetPolicyRequest struct {
  943. // Bindings: Flatten Policy to create a backwacd compatible wire-format.
  944. // Deprecated. Use 'policy' to specify bindings.
  945. Bindings []*Binding `json:"bindings,omitempty"`
  946. // Etag: Flatten Policy to create a backward compatible wire-format.
  947. // Deprecated. Use 'policy' to specify the etag.
  948. Etag string `json:"etag,omitempty"`
  949. // Policy: REQUIRED: The complete policy to be applied to the
  950. // 'resource'. The size of the policy is limited to a few 10s of KB. An
  951. // empty policy is in general a valid policy but certain services (like
  952. // Projects) might reject them.
  953. Policy *Policy `json:"policy,omitempty"`
  954. // ForceSendFields is a list of field names (e.g. "Bindings") to
  955. // unconditionally include in API requests. By default, fields with
  956. // empty values are omitted from API requests. However, any non-pointer,
  957. // non-interface field appearing in ForceSendFields will be sent to the
  958. // server regardless of whether the field is empty or not. This may be
  959. // used to include empty fields in Patch requests.
  960. ForceSendFields []string `json:"-"`
  961. // NullFields is a list of field names (e.g. "Bindings") to include in
  962. // API requests with the JSON null value. By default, fields with empty
  963. // values are omitted from API requests. However, any field with an
  964. // empty value appearing in NullFields will be sent to the server as
  965. // null. It is an error if a field in this list has a non-empty value.
  966. // This may be used to include null fields in Patch requests.
  967. NullFields []string `json:"-"`
  968. }
  969. func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) {
  970. type NoMethod GlobalSetPolicyRequest
  971. raw := NoMethod(*s)
  972. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  973. }
  974. type ImportFile struct {
  975. // Content: The contents of the file.
  976. Content string `json:"content,omitempty"`
  977. // Name: The name of the file.
  978. Name string `json:"name,omitempty"`
  979. // ForceSendFields is a list of field names (e.g. "Content") to
  980. // unconditionally include in API requests. By default, fields with
  981. // empty values are omitted from API requests. However, any non-pointer,
  982. // non-interface field appearing in ForceSendFields will be sent to the
  983. // server regardless of whether the field is empty or not. This may be
  984. // used to include empty fields in Patch requests.
  985. ForceSendFields []string `json:"-"`
  986. // NullFields is a list of field names (e.g. "Content") to include in
  987. // API requests with the JSON null value. By default, fields with empty
  988. // values are omitted from API requests. However, any field with an
  989. // empty value appearing in NullFields will be sent to the server as
  990. // null. It is an error if a field in this list has a non-empty value.
  991. // This may be used to include null fields in Patch requests.
  992. NullFields []string `json:"-"`
  993. }
  994. func (s *ImportFile) MarshalJSON() ([]byte, error) {
  995. type NoMethod ImportFile
  996. raw := NoMethod(*s)
  997. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  998. }
  999. // InputMapping: InputMapping creates a 'virtual' property that will be
  1000. // injected into the properties before sending the request to the
  1001. // underlying API.
  1002. type InputMapping struct {
  1003. // FieldName: The name of the field that is going to be injected.
  1004. FieldName string `json:"fieldName,omitempty"`
  1005. // Location: The location where this mapping applies.
  1006. Location string `json:"location,omitempty"`
  1007. // MethodMatch: Regex to evaluate on method to decide if input applies.
  1008. MethodMatch string `json:"methodMatch,omitempty"`
  1009. // Value: A jsonPath expression to select an element.
  1010. Value string `json:"value,omitempty"`
  1011. // ForceSendFields is a list of field names (e.g. "FieldName") to
  1012. // unconditionally include in API requests. By default, fields with
  1013. // empty values are omitted from API requests. However, any non-pointer,
  1014. // non-interface field appearing in ForceSendFields will be sent to the
  1015. // server regardless of whether the field is empty or not. This may be
  1016. // used to include empty fields in Patch requests.
  1017. ForceSendFields []string `json:"-"`
  1018. // NullFields is a list of field names (e.g. "FieldName") to include in
  1019. // API requests with the JSON null value. By default, fields with empty
  1020. // values are omitted from API requests. However, any field with an
  1021. // empty value appearing in NullFields will be sent to the server as
  1022. // null. It is an error if a field in this list has a non-empty value.
  1023. // This may be used to include null fields in Patch requests.
  1024. NullFields []string `json:"-"`
  1025. }
  1026. func (s *InputMapping) MarshalJSON() ([]byte, error) {
  1027. type NoMethod InputMapping
  1028. raw := NoMethod(*s)
  1029. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1030. }
  1031. // LogConfig: Specifies what kind of log the caller must write
  1032. type LogConfig struct {
  1033. // CloudAudit: Cloud audit options.
  1034. CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"`
  1035. // Counter: Counter options.
  1036. Counter *LogConfigCounterOptions `json:"counter,omitempty"`
  1037. // DataAccess: Data access options.
  1038. DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"`
  1039. // ForceSendFields is a list of field names (e.g. "CloudAudit") to
  1040. // unconditionally include in API requests. By default, fields with
  1041. // empty values are omitted from API requests. However, any non-pointer,
  1042. // non-interface field appearing in ForceSendFields will be sent to the
  1043. // server regardless of whether the field is empty or not. This may be
  1044. // used to include empty fields in Patch requests.
  1045. ForceSendFields []string `json:"-"`
  1046. // NullFields is a list of field names (e.g. "CloudAudit") to include in
  1047. // API requests with the JSON null value. By default, fields with empty
  1048. // values are omitted from API requests. However, any field with an
  1049. // empty value appearing in NullFields will be sent to the server as
  1050. // null. It is an error if a field in this list has a non-empty value.
  1051. // This may be used to include null fields in Patch requests.
  1052. NullFields []string `json:"-"`
  1053. }
  1054. func (s *LogConfig) MarshalJSON() ([]byte, error) {
  1055. type NoMethod LogConfig
  1056. raw := NoMethod(*s)
  1057. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1058. }
  1059. // LogConfigCloudAuditOptions: Write a Cloud Audit log
  1060. type LogConfigCloudAuditOptions struct {
  1061. // AuthorizationLoggingOptions: Information used by the Cloud Audit
  1062. // Logging pipeline.
  1063. AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"`
  1064. // LogName: The log_name to populate in the Cloud Audit Record.
  1065. LogName string `json:"logName,omitempty"`
  1066. // ForceSendFields is a list of field names (e.g.
  1067. // "AuthorizationLoggingOptions") to unconditionally include in API
  1068. // requests. By default, fields with empty values are omitted from API
  1069. // requests. However, any non-pointer, non-interface field appearing in
  1070. // ForceSendFields will be sent to the server regardless of whether the
  1071. // field is empty or not. This may be used to include empty fields in
  1072. // Patch requests.
  1073. ForceSendFields []string `json:"-"`
  1074. // NullFields is a list of field names (e.g.
  1075. // "AuthorizationLoggingOptions") to include in API requests with the
  1076. // JSON null value. By default, fields with empty values are omitted
  1077. // from API requests. However, any field with an empty value appearing
  1078. // in NullFields will be sent to the server as null. It is an error if a
  1079. // field in this list has a non-empty value. This may be used to include
  1080. // null fields in Patch requests.
  1081. NullFields []string `json:"-"`
  1082. }
  1083. func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) {
  1084. type NoMethod LogConfigCloudAuditOptions
  1085. raw := NoMethod(*s)
  1086. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1087. }
  1088. // LogConfigCounterOptions: Increment a streamz counter with the
  1089. // specified metric and field names.
  1090. //
  1091. // Metric names should start with a '/', generally be lowercase-only,
  1092. // and end in "_count". Field names should not contain an initial slash.
  1093. // The actual exported metric names will have "/iam/policy"
  1094. // prepended.
  1095. //
  1096. // Field names correspond to IAM request parameters and field values are
  1097. // their respective values.
  1098. //
  1099. // At present the only supported field names are - "iam_principal",
  1100. // corresponding to IAMContext.principal; - "" (empty string), resulting
  1101. // in one aggretated counter with no field.
  1102. //
  1103. // Examples: counter { metric: "/debug_access_count" field:
  1104. // "iam_principal" } ==> increment counter
  1105. // /iam/policy/backend_debug_access_count {iam_principal=[value of
  1106. // IAMContext.principal]}
  1107. //
  1108. // At this time we do not support: * multiple field names (though this
  1109. // may be supported in the future) * decrementing the counter *
  1110. // incrementing it by anything other than 1
  1111. type LogConfigCounterOptions struct {
  1112. // Field: The field value to attribute.
  1113. Field string `json:"field,omitempty"`
  1114. // Metric: The metric to update.
  1115. Metric string `json:"metric,omitempty"`
  1116. // ForceSendFields is a list of field names (e.g. "Field") to
  1117. // unconditionally include in API requests. By default, fields with
  1118. // empty values are omitted from API requests. However, any non-pointer,
  1119. // non-interface field appearing in ForceSendFields will be sent to the
  1120. // server regardless of whether the field is empty or not. This may be
  1121. // used to include empty fields in Patch requests.
  1122. ForceSendFields []string `json:"-"`
  1123. // NullFields is a list of field names (e.g. "Field") to include in API
  1124. // requests with the JSON null value. By default, fields with empty
  1125. // values are omitted from API requests. However, any field with an
  1126. // empty value appearing in NullFields will be sent to the server as
  1127. // null. It is an error if a field in this list has a non-empty value.
  1128. // This may be used to include null fields in Patch requests.
  1129. NullFields []string `json:"-"`
  1130. }
  1131. func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) {
  1132. type NoMethod LogConfigCounterOptions
  1133. raw := NoMethod(*s)
  1134. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1135. }
  1136. // LogConfigDataAccessOptions: Write a Data Access (Gin) log
  1137. type LogConfigDataAccessOptions struct {
  1138. // LogMode: Whether Gin logging should happen in a fail-closed manner at
  1139. // the caller. This is relevant only in the LocalIAM implementation, for
  1140. // now.
  1141. LogMode string `json:"logMode,omitempty"`
  1142. // ForceSendFields is a list of field names (e.g. "LogMode") to
  1143. // unconditionally include in API requests. By default, fields with
  1144. // empty values are omitted from API requests. However, any non-pointer,
  1145. // non-interface field appearing in ForceSendFields will be sent to the
  1146. // server regardless of whether the field is empty or not. This may be
  1147. // used to include empty fields in Patch requests.
  1148. ForceSendFields []string `json:"-"`
  1149. // NullFields is a list of field names (e.g. "LogMode") to include in
  1150. // API requests with the JSON null value. By default, fields with empty
  1151. // values are omitted from API requests. However, any field with an
  1152. // empty value appearing in NullFields will be sent to the server as
  1153. // null. It is an error if a field in this list has a non-empty value.
  1154. // This may be used to include null fields in Patch requests.
  1155. NullFields []string `json:"-"`
  1156. }
  1157. func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) {
  1158. type NoMethod LogConfigDataAccessOptions
  1159. raw := NoMethod(*s)
  1160. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1161. }
  1162. type Manifest struct {
  1163. // Config: Output only. The YAML configuration for this manifest.
  1164. Config *ConfigFile `json:"config,omitempty"`
  1165. // ExpandedConfig: Output only. The fully-expanded configuration file,
  1166. // including any templates and references.
  1167. ExpandedConfig string `json:"expandedConfig,omitempty"`
  1168. // Id: Output only. Unique identifier for the resource; defined by the
  1169. // server.
  1170. Id uint64 `json:"id,omitempty,string"`
  1171. // Imports: Output only. The imported files for this manifest.
  1172. Imports []*ImportFile `json:"imports,omitempty"`
  1173. // InsertTime: Output only. Timestamp when the manifest was created, in
  1174. // RFC3339 text format.
  1175. InsertTime string `json:"insertTime,omitempty"`
  1176. // Layout: Output only. The YAML layout for this manifest.
  1177. Layout string `json:"layout,omitempty"`
  1178. // Name: Output only.
  1179. //
  1180. // The name of the manifest.
  1181. Name string `json:"name,omitempty"`
  1182. // SelfLink: Output only. Self link for the manifest.
  1183. SelfLink string `json:"selfLink,omitempty"`
  1184. // ServerResponse contains the HTTP response code and headers from the
  1185. // server.
  1186. googleapi.ServerResponse `json:"-"`
  1187. // ForceSendFields is a list of field names (e.g. "Config") to
  1188. // unconditionally include in API requests. By default, fields with
  1189. // empty values are omitted from API requests. However, any non-pointer,
  1190. // non-interface field appearing in ForceSendFields will be sent to the
  1191. // server regardless of whether the field is empty or not. This may be
  1192. // used to include empty fields in Patch requests.
  1193. ForceSendFields []string `json:"-"`
  1194. // NullFields is a list of field names (e.g. "Config") to include in API
  1195. // requests with the JSON null value. By default, fields with empty
  1196. // values are omitted from API requests. However, any field with an
  1197. // empty value appearing in NullFields will be sent to the server as
  1198. // null. It is an error if a field in this list has a non-empty value.
  1199. // This may be used to include null fields in Patch requests.
  1200. NullFields []string `json:"-"`
  1201. }
  1202. func (s *Manifest) MarshalJSON() ([]byte, error) {
  1203. type NoMethod Manifest
  1204. raw := NoMethod(*s)
  1205. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1206. }
  1207. // ManifestsListResponse: A response containing a partial list of
  1208. // manifests and a page token used to build the next request if the
  1209. // request has been truncated.
  1210. type ManifestsListResponse struct {
  1211. // Manifests: Output only. Manifests contained in this list response.
  1212. Manifests []*Manifest `json:"manifests,omitempty"`
  1213. // NextPageToken: Output only. A token used to continue a truncated list
  1214. // request.
  1215. NextPageToken string `json:"nextPageToken,omitempty"`
  1216. // ServerResponse contains the HTTP response code and headers from the
  1217. // server.
  1218. googleapi.ServerResponse `json:"-"`
  1219. // ForceSendFields is a list of field names (e.g. "Manifests") to
  1220. // unconditionally include in API requests. By default, fields with
  1221. // empty values are omitted from API requests. However, any non-pointer,
  1222. // non-interface field appearing in ForceSendFields will be sent to the
  1223. // server regardless of whether the field is empty or not. This may be
  1224. // used to include empty fields in Patch requests.
  1225. ForceSendFields []string `json:"-"`
  1226. // NullFields is a list of field names (e.g. "Manifests") to include in
  1227. // API requests with the JSON null value. By default, fields with empty
  1228. // values are omitted from API requests. However, any field with an
  1229. // empty value appearing in NullFields will be sent to the server as
  1230. // null. It is an error if a field in this list has a non-empty value.
  1231. // This may be used to include null fields in Patch requests.
  1232. NullFields []string `json:"-"`
  1233. }
  1234. func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) {
  1235. type NoMethod ManifestsListResponse
  1236. raw := NoMethod(*s)
  1237. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1238. }
  1239. // Operation: An Operation resource, used to manage asynchronous API
  1240. // requests. (== resource_for v1.globalOperations ==) (== resource_for
  1241. // beta.globalOperations ==) (== resource_for v1.regionOperations ==)
  1242. // (== resource_for beta.regionOperations ==) (== resource_for
  1243. // v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
  1244. type Operation struct {
  1245. // ClientOperationId: [Output Only] The value of `requestId` if you
  1246. // provided it in the request. Not present otherwise.
  1247. ClientOperationId string `json:"clientOperationId,omitempty"`
  1248. // CreationTimestamp: [Deprecated] This field is deprecated.
  1249. CreationTimestamp string `json:"creationTimestamp,omitempty"`
  1250. // Description: [Output Only] A textual description of the operation,
  1251. // which is set when the operation is created.
  1252. Description string `json:"description,omitempty"`
  1253. // EndTime: [Output Only] The time that this operation was completed.
  1254. // This value is in RFC3339 text format.
  1255. EndTime string `json:"endTime,omitempty"`
  1256. // Error: [Output Only] If errors are generated during processing of the
  1257. // operation, this field will be populated.
  1258. Error *OperationError `json:"error,omitempty"`
  1259. // HttpErrorMessage: [Output Only] If the operation fails, this field
  1260. // contains the HTTP error message that was returned, such as NOT FOUND.
  1261. HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
  1262. // HttpErrorStatusCode: [Output Only] If the operation fails, this field
  1263. // contains the HTTP error status code that was returned. For example, a
  1264. // 404 means the resource was not found.
  1265. HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
  1266. // Id: [Output Only] The unique identifier for the resource. This
  1267. // identifier is defined by the server.
  1268. Id uint64 `json:"id,omitempty,string"`
  1269. // InsertTime: [Output Only] The time that this operation was requested.
  1270. // This value is in RFC3339 text format.
  1271. InsertTime string `json:"insertTime,omitempty"`
  1272. // Kind: [Output Only] Type of the resource. Always compute#operation
  1273. // for Operation resources.
  1274. Kind string `json:"kind,omitempty"`
  1275. // Name: [Output Only] Name of the resource.
  1276. Name string `json:"name,omitempty"`
  1277. // OperationType: [Output Only] The type of operation, such as insert,
  1278. // update, or delete, and so on.
  1279. OperationType string `json:"operationType,omitempty"`
  1280. // Progress: [Output Only] An optional progress indicator that ranges
  1281. // from 0 to 100. There is no requirement that this be linear or support
  1282. // any granularity of operations. This should not be used to guess when
  1283. // the operation will be complete. This number should monotonically
  1284. // increase as the operation progresses.
  1285. Progress int64 `json:"progress,omitempty"`
  1286. // Region: [Output Only] The URL of the region where the operation
  1287. // resides. Only available when performing regional operations. You must
  1288. // specify this field as part of the HTTP request URL. It is not
  1289. // settable as a field in the request body.
  1290. Region string `json:"region,omitempty"`
  1291. // SelfLink: [Output Only] Server-defined URL for the resource.
  1292. SelfLink string `json:"selfLink,omitempty"`
  1293. // StartTime: [Output Only] The time that this operation was started by
  1294. // the server. This value is in RFC3339 text format.
  1295. StartTime string `json:"startTime,omitempty"`
  1296. // Status: [Output Only] The status of the operation, which can be one
  1297. // of the following: PENDING, RUNNING, or DONE.
  1298. Status string `json:"status,omitempty"`
  1299. // StatusMessage: [Output Only] An optional textual description of the
  1300. // current status of the operation.
  1301. StatusMessage string `json:"statusMessage,omitempty"`
  1302. // TargetId: [Output Only] The unique target ID, which identifies a
  1303. // specific incarnation of the target resource.
  1304. TargetId uint64 `json:"targetId,omitempty,string"`
  1305. // TargetLink: [Output Only] The URL of the resource that the operation
  1306. // modifies. For operations related to creating a snapshot, this points
  1307. // to the persistent disk that the snapshot was created from.
  1308. TargetLink string `json:"targetLink,omitempty"`
  1309. // User: [Output Only] User who requested the operation, for example:
  1310. // user@example.com.
  1311. User string `json:"user,omitempty"`
  1312. // Warnings: [Output Only] If warning messages are generated during
  1313. // processing of the operation, this field will be populated.
  1314. Warnings []*OperationWarnings `json:"warnings,omitempty"`
  1315. // Zone: [Output Only] The URL of the zone where the operation resides.
  1316. // Only available when performing per-zone operations. You must specify
  1317. // this field as part of the HTTP request URL. It is not settable as a
  1318. // field in the request body.
  1319. Zone string `json:"zone,omitempty"`
  1320. // ServerResponse contains the HTTP response code and headers from the
  1321. // server.
  1322. googleapi.ServerResponse `json:"-"`
  1323. // ForceSendFields is a list of field names (e.g. "ClientOperationId")
  1324. // to unconditionally include in API requests. By default, fields with
  1325. // empty values are omitted from API requests. However, any non-pointer,
  1326. // non-interface field appearing in ForceSendFields will be sent to the
  1327. // server regardless of whether the field is empty or not. This may be
  1328. // used to include empty fields in Patch requests.
  1329. ForceSendFields []string `json:"-"`
  1330. // NullFields is a list of field names (e.g. "ClientOperationId") to
  1331. // include in API requests with the JSON null value. By default, fields
  1332. // with empty values are omitted from API requests. However, any field
  1333. // with an empty value appearing in NullFields will be sent to the
  1334. // server as null. It is an error if a field in this list has a
  1335. // non-empty value. This may be used to include null fields in Patch
  1336. // requests.
  1337. NullFields []string `json:"-"`
  1338. }
  1339. func (s *Operation) MarshalJSON() ([]byte, error) {
  1340. type NoMethod Operation
  1341. raw := NoMethod(*s)
  1342. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1343. }
  1344. // OperationError: [Output Only] If errors are generated during
  1345. // processing of the operation, this field will be populated.
  1346. type OperationError struct {
  1347. // Errors: [Output Only] The array of errors encountered while
  1348. // processing this operation.
  1349. Errors []*OperationErrorErrors `json:"errors,omitempty"`
  1350. // ForceSendFields is a list of field names (e.g. "Errors") to
  1351. // unconditionally include in API requests. By default, fields with
  1352. // empty values are omitted from API requests. However, any non-pointer,
  1353. // non-interface field appearing in ForceSendFields will be sent to the
  1354. // server regardless of whether the field is empty or not. This may be
  1355. // used to include empty fields in Patch requests.
  1356. ForceSendFields []string `json:"-"`
  1357. // NullFields is a list of field names (e.g. "Errors") to include in API
  1358. // requests with the JSON null value. By default, fields with empty
  1359. // values are omitted from API requests. However, any field with an
  1360. // empty value appearing in NullFields will be sent to the server as
  1361. // null. It is an error if a field in this list has a non-empty value.
  1362. // This may be used to include null fields in Patch requests.
  1363. NullFields []string `json:"-"`
  1364. }
  1365. func (s *OperationError) MarshalJSON() ([]byte, error) {
  1366. type NoMethod OperationError
  1367. raw := NoMethod(*s)
  1368. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1369. }
  1370. type OperationErrorErrors struct {
  1371. // Code: [Output Only] The error type identifier for this error.
  1372. Code string `json:"code,omitempty"`
  1373. // Location: [Output Only] Indicates the field in the request that
  1374. // caused the error. This property is optional.
  1375. Location string `json:"location,omitempty"`
  1376. // Message: [Output Only] An optional, human-readable error message.
  1377. Message string `json:"message,omitempty"`
  1378. // ForceSendFields is a list of field names (e.g. "Code") to
  1379. // unconditionally include in API requests. By default, fields with
  1380. // empty values are omitted from API requests. However, any non-pointer,
  1381. // non-interface field appearing in ForceSendFields will be sent to the
  1382. // server regardless of whether the field is empty or not. This may be
  1383. // used to include empty fields in Patch requests.
  1384. ForceSendFields []string `json:"-"`
  1385. // NullFields is a list of field names (e.g. "Code") to include in API
  1386. // requests with the JSON null value. By default, fields with empty
  1387. // values are omitted from API requests. However, any field with an
  1388. // empty value appearing in NullFields will be sent to the server as
  1389. // null. It is an error if a field in this list has a non-empty value.
  1390. // This may be used to include null fields in Patch requests.
  1391. NullFields []string `json:"-"`
  1392. }
  1393. func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
  1394. type NoMethod OperationErrorErrors
  1395. raw := NoMethod(*s)
  1396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1397. }
  1398. type OperationWarnings struct {
  1399. // Code: [Output Only] A warning code, if applicable. For example,
  1400. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1401. // the response.
  1402. Code string `json:"code,omitempty"`
  1403. // Data: [Output Only] Metadata about this warning in key: value format.
  1404. // For example:
  1405. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1406. Data []*OperationWarningsData `json:"data,omitempty"`
  1407. // Message: [Output Only] A human-readable description of the warning
  1408. // code.
  1409. Message string `json:"message,omitempty"`
  1410. // ForceSendFields is a list of field names (e.g. "Code") to
  1411. // unconditionally include in API requests. By default, fields with
  1412. // empty values are omitted from API requests. However, any non-pointer,
  1413. // non-interface field appearing in ForceSendFields will be sent to the
  1414. // server regardless of whether the field is empty or not. This may be
  1415. // used to include empty fields in Patch requests.
  1416. ForceSendFields []string `json:"-"`
  1417. // NullFields is a list of field names (e.g. "Code") to include in API
  1418. // requests with the JSON null value. By default, fields with empty
  1419. // values are omitted from API requests. However, any field with an
  1420. // empty value appearing in NullFields will be sent to the server as
  1421. // null. It is an error if a field in this list has a non-empty value.
  1422. // This may be used to include null fields in Patch requests.
  1423. NullFields []string `json:"-"`
  1424. }
  1425. func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
  1426. type NoMethod OperationWarnings
  1427. raw := NoMethod(*s)
  1428. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1429. }
  1430. type OperationWarningsData struct {
  1431. // Key: [Output Only] A key that provides more detail on the warning
  1432. // being returned. For example, for warnings where there are no results
  1433. // in a list request for a particular zone, this key might be scope and
  1434. // the key value might be the zone name. Other examples might be a key
  1435. // indicating a deprecated resource and a suggested replacement, or a
  1436. // warning about invalid network settings (for example, if an instance
  1437. // attempts to perform IP forwarding but is not enabled for IP
  1438. // forwarding).
  1439. Key string `json:"key,omitempty"`
  1440. // Value: [Output Only] A warning data value corresponding to the key.
  1441. Value string `json:"value,omitempty"`
  1442. // ForceSendFields is a list of field names (e.g. "Key") to
  1443. // unconditionally include in API requests. By default, fields with
  1444. // empty values are omitted from API requests. However, any non-pointer,
  1445. // non-interface field appearing in ForceSendFields will be sent to the
  1446. // server regardless of whether the field is empty or not. This may be
  1447. // used to include empty fields in Patch requests.
  1448. ForceSendFields []string `json:"-"`
  1449. // NullFields is a list of field names (e.g. "Key") to include in API
  1450. // requests with the JSON null value. By default, fields with empty
  1451. // values are omitted from API requests. However, any field with an
  1452. // empty value appearing in NullFields will be sent to the server as
  1453. // null. It is an error if a field in this list has a non-empty value.
  1454. // This may be used to include null fields in Patch requests.
  1455. NullFields []string `json:"-"`
  1456. }
  1457. func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
  1458. type NoMethod OperationWarningsData
  1459. raw := NoMethod(*s)
  1460. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1461. }
  1462. // OperationsListResponse: A response containing a partial list of
  1463. // operations and a page token used to build the next request if the
  1464. // request has been truncated.
  1465. type OperationsListResponse struct {
  1466. // NextPageToken: Output only. A token used to continue a truncated list
  1467. // request.
  1468. NextPageToken string `json:"nextPageToken,omitempty"`
  1469. // Operations: Output only. Operations contained in this list response.
  1470. Operations []*Operation `json:"operations,omitempty"`
  1471. // ServerResponse contains the HTTP response code and headers from the
  1472. // server.
  1473. googleapi.ServerResponse `json:"-"`
  1474. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1475. // unconditionally include in API requests. By default, fields with
  1476. // empty values are omitted from API requests. However, any non-pointer,
  1477. // non-interface field appearing in ForceSendFields will be sent to the
  1478. // server regardless of whether the field is empty or not. This may be
  1479. // used to include empty fields in Patch requests.
  1480. ForceSendFields []string `json:"-"`
  1481. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1482. // in API requests with the JSON null value. By default, fields with
  1483. // empty values are omitted from API requests. However, any field with
  1484. // an empty value appearing in NullFields will be sent to the server as
  1485. // null. It is an error if a field in this list has a non-empty value.
  1486. // This may be used to include null fields in Patch requests.
  1487. NullFields []string `json:"-"`
  1488. }
  1489. func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
  1490. type NoMethod OperationsListResponse
  1491. raw := NoMethod(*s)
  1492. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1493. }
  1494. // Options: Options allows customized resource handling by Deployment
  1495. // Manager.
  1496. type Options struct {
  1497. // AsyncOptions: Options regarding how to thread async requests.
  1498. AsyncOptions []*AsyncOptions `json:"asyncOptions,omitempty"`
  1499. // InputMappings: The mappings that apply for requests.
  1500. InputMappings []*InputMapping `json:"inputMappings,omitempty"`
  1501. // ValidationOptions: Options for how to validate and process properties
  1502. // on a resource.
  1503. ValidationOptions *ValidationOptions `json:"validationOptions,omitempty"`
  1504. // VirtualProperties: Additional properties block described as a
  1505. // jsonSchema, these properties will never be part of the json payload,
  1506. // but they can be consumed by InputMappings, this must be a valid json
  1507. // schema draft-04. The properties specified here will be decouple in a
  1508. // different section. This schema will be merged to the schema
  1509. // validation, and properties here will be extracted From the payload
  1510. // and consumed explicitly by InputMappings. ex: field1: type: string
  1511. // field2: type: number
  1512. VirtualProperties string `json:"virtualProperties,omitempty"`
  1513. // ForceSendFields is a list of field names (e.g. "AsyncOptions") to
  1514. // unconditionally include in API requests. By default, fields with
  1515. // empty values are omitted from API requests. However, any non-pointer,
  1516. // non-interface field appearing in ForceSendFields will be sent to the
  1517. // server regardless of whether the field is empty or not. This may be
  1518. // used to include empty fields in Patch requests.
  1519. ForceSendFields []string `json:"-"`
  1520. // NullFields is a list of field names (e.g. "AsyncOptions") to include
  1521. // in API requests with the JSON null value. By default, fields with
  1522. // empty values are omitted from API requests. However, any field with
  1523. // an empty value appearing in NullFields will be sent to the server as
  1524. // null. It is an error if a field in this list has a non-empty value.
  1525. // This may be used to include null fields in Patch requests.
  1526. NullFields []string `json:"-"`
  1527. }
  1528. func (s *Options) MarshalJSON() ([]byte, error) {
  1529. type NoMethod Options
  1530. raw := NoMethod(*s)
  1531. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1532. }
  1533. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  1534. // used to specify access control policies for Cloud Platform
  1535. // resources.
  1536. //
  1537. //
  1538. //
  1539. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  1540. // of `members` to a `role`, where the members can be user accounts,
  1541. // Google groups, Google domains, and service accounts. A `role` is a
  1542. // named list of permissions defined by IAM.
  1543. //
  1544. // **JSON Example**
  1545. //
  1546. // { "bindings": [ { "role": "roles/owner", "members": [
  1547. // "user:mike@example.com", "group:admins@example.com",
  1548. // "domain:google.com",
  1549. // "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, {
  1550. // "role": "roles/viewer", "members": ["user:sean@example.com"] } ]
  1551. // }
  1552. //
  1553. // **YAML Example**
  1554. //
  1555. // bindings: - members: - user:mike@example.com -
  1556. // group:admins@example.com - domain:google.com -
  1557. // serviceAccount:my-other-app@appspot.gserviceaccount.com role:
  1558. // roles/owner - members: - user:sean@example.com role:
  1559. // roles/viewer
  1560. //
  1561. //
  1562. //
  1563. // For a description of IAM and its features, see the [IAM developer's
  1564. // guide](https://cloud.google.com/iam/docs).
  1565. type Policy struct {
  1566. // AuditConfigs: Specifies cloud audit logging configuration for this
  1567. // policy.
  1568. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1569. // Bindings: Associates a list of `members` to a `role`. `bindings` with
  1570. // no members will result in an error.
  1571. Bindings []*Binding `json:"bindings,omitempty"`
  1572. // Etag: `etag` is used for optimistic concurrency control as a way to
  1573. // help prevent simultaneous updates of a policy from overwriting each
  1574. // other. It is strongly suggested that systems make use of the `etag`
  1575. // in the read-modify-write cycle to perform policy updates in order to
  1576. // avoid race conditions: An `etag` is returned in the response to
  1577. // `getIamPolicy`, and systems are expected to put that etag in the
  1578. // request to `setIamPolicy` to ensure that their change will be applied
  1579. // to the same version of the policy.
  1580. //
  1581. // If no `etag` is provided in the call to `setIamPolicy`, then the
  1582. // existing policy is overwritten blindly.
  1583. Etag string `json:"etag,omitempty"`
  1584. IamOwned bool `json:"iamOwned,omitempty"`
  1585. // Rules: If more than one rule is specified, the rules are applied in
  1586. // the following manner: - All matching LOG rules are always applied. -
  1587. // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging
  1588. // will be applied if one or more matching rule requires logging. -
  1589. // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
  1590. // granted. Logging will be applied if one or more matching rule
  1591. // requires logging. - Otherwise, if no rule applies, permission is
  1592. // denied.
  1593. Rules []*Rule `json:"rules,omitempty"`
  1594. // Version: Deprecated.
  1595. Version int64 `json:"version,omitempty"`
  1596. // ServerResponse contains the HTTP response code and headers from the
  1597. // server.
  1598. googleapi.ServerResponse `json:"-"`
  1599. // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1600. // unconditionally include in API requests. By default, fields with
  1601. // empty values are omitted from API requests. However, any non-pointer,
  1602. // non-interface field appearing in ForceSendFields will be sent to the
  1603. // server regardless of whether the field is empty or not. This may be
  1604. // used to include empty fields in Patch requests.
  1605. ForceSendFields []string `json:"-"`
  1606. // NullFields is a list of field names (e.g. "AuditConfigs") to include
  1607. // in API requests with the JSON null value. By default, fields with
  1608. // empty values are omitted from API requests. However, any field with
  1609. // an empty value appearing in NullFields will be sent to the server as
  1610. // null. It is an error if a field in this list has a non-empty value.
  1611. // This may be used to include null fields in Patch requests.
  1612. NullFields []string `json:"-"`
  1613. }
  1614. func (s *Policy) MarshalJSON() ([]byte, error) {
  1615. type NoMethod Policy
  1616. raw := NoMethod(*s)
  1617. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1618. }
  1619. type PollingOptions struct {
  1620. // Diagnostics: An array of diagnostics to be collected by Deployment
  1621. // Manager, these diagnostics will be displayed to the user.
  1622. Diagnostics []*Diagnostic `json:"diagnostics,omitempty"`
  1623. // FailCondition: JsonPath expression that determines if the request
  1624. // failed.
  1625. FailCondition string `json:"failCondition,omitempty"`
  1626. // FinishCondition: JsonPath expression that determines if the request
  1627. // is completed.
  1628. FinishCondition string `json:"finishCondition,omitempty"`
  1629. // PollingLink: JsonPath expression that evaluates to string, it
  1630. // indicates where to poll.
  1631. PollingLink string `json:"pollingLink,omitempty"`
  1632. // TargetLink: JsonPath expression, after polling is completed,
  1633. // indicates where to fetch the resource.
  1634. TargetLink string `json:"targetLink,omitempty"`
  1635. // ForceSendFields is a list of field names (e.g. "Diagnostics") to
  1636. // unconditionally include in API requests. By default, fields with
  1637. // empty values are omitted from API requests. However, any non-pointer,
  1638. // non-interface field appearing in ForceSendFields will be sent to the
  1639. // server regardless of whether the field is empty or not. This may be
  1640. // used to include empty fields in Patch requests.
  1641. ForceSendFields []string `json:"-"`
  1642. // NullFields is a list of field names (e.g. "Diagnostics") to include
  1643. // in API requests with the JSON null value. By default, fields with
  1644. // empty values are omitted from API requests. However, any field with
  1645. // an empty value appearing in NullFields will be sent to the server as
  1646. // null. It is an error if a field in this list has a non-empty value.
  1647. // This may be used to include null fields in Patch requests.
  1648. NullFields []string `json:"-"`
  1649. }
  1650. func (s *PollingOptions) MarshalJSON() ([]byte, error) {
  1651. type NoMethod PollingOptions
  1652. raw := NoMethod(*s)
  1653. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1654. }
  1655. type Resource struct {
  1656. // AccessControl: The Access Control Policy set on this resource.
  1657. AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
  1658. // FinalProperties: Output only. The evaluated properties of the
  1659. // resource with references expanded. Returned as serialized YAML.
  1660. FinalProperties string `json:"finalProperties,omitempty"`
  1661. // Id: Output only. Unique identifier for the resource; defined by the
  1662. // server.
  1663. Id uint64 `json:"id,omitempty,string"`
  1664. // InsertTime: Output only. Timestamp when the resource was created or
  1665. // acquired, in RFC3339 text format .
  1666. InsertTime string `json:"insertTime,omitempty"`
  1667. // Manifest: Output only. URL of the manifest representing the current
  1668. // configuration of this resource.
  1669. Manifest string `json:"manifest,omitempty"`
  1670. // Name: Output only. The name of the resource as it appears in the YAML
  1671. // config.
  1672. Name string `json:"name,omitempty"`
  1673. // Properties: Output only. The current properties of the resource
  1674. // before any references have been filled in. Returned as serialized
  1675. // YAML.
  1676. Properties string `json:"properties,omitempty"`
  1677. // Type: Output only. The type of the resource, for example
  1678. // compute.v1.instance, or cloudfunctions.v1beta1.function.
  1679. Type string `json:"type,omitempty"`
  1680. // Update: Output only. If Deployment Manager is currently updating or
  1681. // previewing an update to this resource, the updated configuration
  1682. // appears here.
  1683. Update *ResourceUpdate `json:"update,omitempty"`
  1684. // UpdateTime: Output only. Timestamp when the resource was updated, in
  1685. // RFC3339 text format .
  1686. UpdateTime string `json:"updateTime,omitempty"`
  1687. // Url: Output only. The URL of the actual resource.
  1688. Url string `json:"url,omitempty"`
  1689. // Warnings: Output only. If warning messages are generated during
  1690. // processing of this resource, this field will be populated.
  1691. Warnings []*ResourceWarnings `json:"warnings,omitempty"`
  1692. // ServerResponse contains the HTTP response code and headers from the
  1693. // server.
  1694. googleapi.ServerResponse `json:"-"`
  1695. // ForceSendFields is a list of field names (e.g. "AccessControl") to
  1696. // unconditionally include in API requests. By default, fields with
  1697. // empty values are omitted from API requests. However, any non-pointer,
  1698. // non-interface field appearing in ForceSendFields will be sent to the
  1699. // server regardless of whether the field is empty or not. This may be
  1700. // used to include empty fields in Patch requests.
  1701. ForceSendFields []string `json:"-"`
  1702. // NullFields is a list of field names (e.g. "AccessControl") to include
  1703. // in API requests with the JSON null value. By default, fields with
  1704. // empty values are omitted from API requests. However, any field with
  1705. // an empty value appearing in NullFields will be sent to the server as
  1706. // null. It is an error if a field in this list has a non-empty value.
  1707. // This may be used to include null fields in Patch requests.
  1708. NullFields []string `json:"-"`
  1709. }
  1710. func (s *Resource) MarshalJSON() ([]byte, error) {
  1711. type NoMethod Resource
  1712. raw := NoMethod(*s)
  1713. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1714. }
  1715. type ResourceWarnings struct {
  1716. // Code: [Output Only] A warning code, if applicable. For example,
  1717. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1718. // the response.
  1719. Code string `json:"code,omitempty"`
  1720. // Data: [Output Only] Metadata about this warning in key: value format.
  1721. // For example:
  1722. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1723. Data []*ResourceWarningsData `json:"data,omitempty"`
  1724. // Message: [Output Only] A human-readable description of the warning
  1725. // code.
  1726. Message string `json:"message,omitempty"`
  1727. // ForceSendFields is a list of field names (e.g. "Code") to
  1728. // unconditionally include in API requests. By default, fields with
  1729. // empty values are omitted from API requests. However, any non-pointer,
  1730. // non-interface field appearing in ForceSendFields will be sent to the
  1731. // server regardless of whether the field is empty or not. This may be
  1732. // used to include empty fields in Patch requests.
  1733. ForceSendFields []string `json:"-"`
  1734. // NullFields is a list of field names (e.g. "Code") to include in API
  1735. // requests with the JSON null value. By default, fields with empty
  1736. // values are omitted from API requests. However, any field with an
  1737. // empty value appearing in NullFields will be sent to the server as
  1738. // null. It is an error if a field in this list has a non-empty value.
  1739. // This may be used to include null fields in Patch requests.
  1740. NullFields []string `json:"-"`
  1741. }
  1742. func (s *ResourceWarnings) MarshalJSON() ([]byte, error) {
  1743. type NoMethod ResourceWarnings
  1744. raw := NoMethod(*s)
  1745. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1746. }
  1747. type ResourceWarningsData struct {
  1748. // Key: [Output Only] A key that provides more detail on the warning
  1749. // being returned. For example, for warnings where there are no results
  1750. // in a list request for a particular zone, this key might be scope and
  1751. // the key value might be the zone name. Other examples might be a key
  1752. // indicating a deprecated resource and a suggested replacement, or a
  1753. // warning about invalid network settings (for example, if an instance
  1754. // attempts to perform IP forwarding but is not enabled for IP
  1755. // forwarding).
  1756. Key string `json:"key,omitempty"`
  1757. // Value: [Output Only] A warning data value corresponding to the key.
  1758. Value string `json:"value,omitempty"`
  1759. // ForceSendFields is a list of field names (e.g. "Key") to
  1760. // unconditionally include in API requests. By default, fields with
  1761. // empty values are omitted from API requests. However, any non-pointer,
  1762. // non-interface field appearing in ForceSendFields will be sent to the
  1763. // server regardless of whether the field is empty or not. This may be
  1764. // used to include empty fields in Patch requests.
  1765. ForceSendFields []string `json:"-"`
  1766. // NullFields is a list of field names (e.g. "Key") to include in API
  1767. // requests with the JSON null value. By default, fields with empty
  1768. // values are omitted from API requests. However, any field with an
  1769. // empty value appearing in NullFields will be sent to the server as
  1770. // null. It is an error if a field in this list has a non-empty value.
  1771. // This may be used to include null fields in Patch requests.
  1772. NullFields []string `json:"-"`
  1773. }
  1774. func (s *ResourceWarningsData) MarshalJSON() ([]byte, error) {
  1775. type NoMethod ResourceWarningsData
  1776. raw := NoMethod(*s)
  1777. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1778. }
  1779. // ResourceAccessControl: The access controls set on the resource.
  1780. type ResourceAccessControl struct {
  1781. // GcpIamPolicy: The GCP IAM Policy to set on the resource.
  1782. GcpIamPolicy string `json:"gcpIamPolicy,omitempty"`
  1783. // ForceSendFields is a list of field names (e.g. "GcpIamPolicy") to
  1784. // unconditionally include in API requests. By default, fields with
  1785. // empty values are omitted from API requests. However, any non-pointer,
  1786. // non-interface field appearing in ForceSendFields will be sent to the
  1787. // server regardless of whether the field is empty or not. This may be
  1788. // used to include empty fields in Patch requests.
  1789. ForceSendFields []string `json:"-"`
  1790. // NullFields is a list of field names (e.g. "GcpIamPolicy") to include
  1791. // in API requests with the JSON null value. By default, fields with
  1792. // empty values are omitted from API requests. However, any field with
  1793. // an empty value appearing in NullFields will be sent to the server as
  1794. // null. It is an error if a field in this list has a non-empty value.
  1795. // This may be used to include null fields in Patch requests.
  1796. NullFields []string `json:"-"`
  1797. }
  1798. func (s *ResourceAccessControl) MarshalJSON() ([]byte, error) {
  1799. type NoMethod ResourceAccessControl
  1800. raw := NoMethod(*s)
  1801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1802. }
  1803. type ResourceUpdate struct {
  1804. // AccessControl: The Access Control Policy to set on this resource
  1805. // after updating the resource itself.
  1806. AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
  1807. // Error: Output only. If errors are generated during update of the
  1808. // resource, this field will be populated.
  1809. Error *ResourceUpdateError `json:"error,omitempty"`
  1810. // FinalProperties: Output only. The expanded properties of the resource
  1811. // with reference values expanded. Returned as serialized YAML.
  1812. FinalProperties string `json:"finalProperties,omitempty"`
  1813. // Intent: Output only. The intent of the resource: PREVIEW, UPDATE, or
  1814. // CANCEL.
  1815. Intent string `json:"intent,omitempty"`
  1816. // Manifest: Output only. URL of the manifest representing the update
  1817. // configuration of this resource.
  1818. Manifest string `json:"manifest,omitempty"`
  1819. // Properties: Output only. The set of updated properties for this
  1820. // resource, before references are expanded. Returned as serialized
  1821. // YAML.
  1822. Properties string `json:"properties,omitempty"`
  1823. // State: Output only. The state of the resource.
  1824. State string `json:"state,omitempty"`
  1825. // Warnings: Output only. If warning messages are generated during
  1826. // processing of this resource, this field will be populated.
  1827. Warnings []*ResourceUpdateWarnings `json:"warnings,omitempty"`
  1828. // ForceSendFields is a list of field names (e.g. "AccessControl") to
  1829. // unconditionally include in API requests. By default, fields with
  1830. // empty values are omitted from API requests. However, any non-pointer,
  1831. // non-interface field appearing in ForceSendFields will be sent to the
  1832. // server regardless of whether the field is empty or not. This may be
  1833. // used to include empty fields in Patch requests.
  1834. ForceSendFields []string `json:"-"`
  1835. // NullFields is a list of field names (e.g. "AccessControl") to include
  1836. // in API requests with the JSON null value. By default, fields with
  1837. // empty values are omitted from API requests. However, any field with
  1838. // an empty value appearing in NullFields will be sent to the server as
  1839. // null. It is an error if a field in this list has a non-empty value.
  1840. // This may be used to include null fields in Patch requests.
  1841. NullFields []string `json:"-"`
  1842. }
  1843. func (s *ResourceUpdate) MarshalJSON() ([]byte, error) {
  1844. type NoMethod ResourceUpdate
  1845. raw := NoMethod(*s)
  1846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1847. }
  1848. // ResourceUpdateError: Output only. If errors are generated during
  1849. // update of the resource, this field will be populated.
  1850. type ResourceUpdateError struct {
  1851. // Errors: [Output Only] The array of errors encountered while
  1852. // processing this operation.
  1853. Errors []*ResourceUpdateErrorErrors `json:"errors,omitempty"`
  1854. // ForceSendFields is a list of field names (e.g. "Errors") to
  1855. // unconditionally include in API requests. By default, fields with
  1856. // empty values are omitted from API requests. However, any non-pointer,
  1857. // non-interface field appearing in ForceSendFields will be sent to the
  1858. // server regardless of whether the field is empty or not. This may be
  1859. // used to include empty fields in Patch requests.
  1860. ForceSendFields []string `json:"-"`
  1861. // NullFields is a list of field names (e.g. "Errors") to include in API
  1862. // requests with the JSON null value. By default, fields with empty
  1863. // values are omitted from API requests. However, any field with an
  1864. // empty value appearing in NullFields will be sent to the server as
  1865. // null. It is an error if a field in this list has a non-empty value.
  1866. // This may be used to include null fields in Patch requests.
  1867. NullFields []string `json:"-"`
  1868. }
  1869. func (s *ResourceUpdateError) MarshalJSON() ([]byte, error) {
  1870. type NoMethod ResourceUpdateError
  1871. raw := NoMethod(*s)
  1872. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1873. }
  1874. type ResourceUpdateErrorErrors struct {
  1875. // Code: [Output Only] The error type identifier for this error.
  1876. Code string `json:"code,omitempty"`
  1877. // Location: [Output Only] Indicates the field in the request that
  1878. // caused the error. This property is optional.
  1879. Location string `json:"location,omitempty"`
  1880. // Message: [Output Only] An optional, human-readable error message.
  1881. Message string `json:"message,omitempty"`
  1882. // ForceSendFields is a list of field names (e.g. "Code") to
  1883. // unconditionally include in API requests. By default, fields with
  1884. // empty values are omitted from API requests. However, any non-pointer,
  1885. // non-interface field appearing in ForceSendFields will be sent to the
  1886. // server regardless of whether the field is empty or not. This may be
  1887. // used to include empty fields in Patch requests.
  1888. ForceSendFields []string `json:"-"`
  1889. // NullFields is a list of field names (e.g. "Code") to include in API
  1890. // requests with the JSON null value. By default, fields with empty
  1891. // values are omitted from API requests. However, any field with an
  1892. // empty value appearing in NullFields will be sent to the server as
  1893. // null. It is an error if a field in this list has a non-empty value.
  1894. // This may be used to include null fields in Patch requests.
  1895. NullFields []string `json:"-"`
  1896. }
  1897. func (s *ResourceUpdateErrorErrors) MarshalJSON() ([]byte, error) {
  1898. type NoMethod ResourceUpdateErrorErrors
  1899. raw := NoMethod(*s)
  1900. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1901. }
  1902. type ResourceUpdateWarnings struct {
  1903. // Code: [Output Only] A warning code, if applicable. For example,
  1904. // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
  1905. // the response.
  1906. Code string `json:"code,omitempty"`
  1907. // Data: [Output Only] Metadata about this warning in key: value format.
  1908. // For example:
  1909. // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
  1910. Data []*ResourceUpdateWarningsData `json:"data,omitempty"`
  1911. // Message: [Output Only] A human-readable description of the warning
  1912. // code.
  1913. Message string `json:"message,omitempty"`
  1914. // ForceSendFields is a list of field names (e.g. "Code") to
  1915. // unconditionally include in API requests. By default, fields with
  1916. // empty values are omitted from API requests. However, any non-pointer,
  1917. // non-interface field appearing in ForceSendFields will be sent to the
  1918. // server regardless of whether the field is empty or not. This may be
  1919. // used to include empty fields in Patch requests.
  1920. ForceSendFields []string `json:"-"`
  1921. // NullFields is a list of field names (e.g. "Code") to include in API
  1922. // requests with the JSON null value. By default, fields with empty
  1923. // values are omitted from API requests. However, any field with an
  1924. // empty value appearing in NullFields will be sent to the server as
  1925. // null. It is an error if a field in this list has a non-empty value.
  1926. // This may be used to include null fields in Patch requests.
  1927. NullFields []string `json:"-"`
  1928. }
  1929. func (s *ResourceUpdateWarnings) MarshalJSON() ([]byte, error) {
  1930. type NoMethod ResourceUpdateWarnings
  1931. raw := NoMethod(*s)
  1932. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1933. }
  1934. type ResourceUpdateWarningsData struct {
  1935. // Key: [Output Only] A key that provides more detail on the warning
  1936. // being returned. For example, for warnings where there are no results
  1937. // in a list request for a particular zone, this key might be scope and
  1938. // the key value might be the zone name. Other examples might be a key
  1939. // indicating a deprecated resource and a suggested replacement, or a
  1940. // warning about invalid network settings (for example, if an instance
  1941. // attempts to perform IP forwarding but is not enabled for IP
  1942. // forwarding).
  1943. Key string `json:"key,omitempty"`
  1944. // Value: [Output Only] A warning data value corresponding to the key.
  1945. Value string `json:"value,omitempty"`
  1946. // ForceSendFields is a list of field names (e.g. "Key") to
  1947. // unconditionally include in API requests. By default, fields with
  1948. // empty values are omitted from API requests. However, any non-pointer,
  1949. // non-interface field appearing in ForceSendFields will be sent to the
  1950. // server regardless of whether the field is empty or not. This may be
  1951. // used to include empty fields in Patch requests.
  1952. ForceSendFields []string `json:"-"`
  1953. // NullFields is a list of field names (e.g. "Key") to include in API
  1954. // requests with the JSON null value. By default, fields with empty
  1955. // values are omitted from API requests. However, any field with an
  1956. // empty value appearing in NullFields will be sent to the server as
  1957. // null. It is an error if a field in this list has a non-empty value.
  1958. // This may be used to include null fields in Patch requests.
  1959. NullFields []string `json:"-"`
  1960. }
  1961. func (s *ResourceUpdateWarningsData) MarshalJSON() ([]byte, error) {
  1962. type NoMethod ResourceUpdateWarningsData
  1963. raw := NoMethod(*s)
  1964. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1965. }
  1966. // ResourcesListResponse: A response containing a partial list of
  1967. // resources and a page token used to build the next request if the
  1968. // request has been truncated.
  1969. type ResourcesListResponse struct {
  1970. // NextPageToken: A token used to continue a truncated list request.
  1971. NextPageToken string `json:"nextPageToken,omitempty"`
  1972. // Resources: Resources contained in this list response.
  1973. Resources []*Resource `json:"resources,omitempty"`
  1974. // ServerResponse contains the HTTP response code and headers from the
  1975. // server.
  1976. googleapi.ServerResponse `json:"-"`
  1977. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1978. // unconditionally include in API requests. By default, fields with
  1979. // empty values are omitted from API requests. However, any non-pointer,
  1980. // non-interface field appearing in ForceSendFields will be sent to the
  1981. // server regardless of whether the field is empty or not. This may be
  1982. // used to include empty fields in Patch requests.
  1983. ForceSendFields []string `json:"-"`
  1984. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1985. // in API requests with the JSON null value. By default, fields with
  1986. // empty values are omitted from API requests. However, any field with
  1987. // an empty value appearing in NullFields will be sent to the server as
  1988. // null. It is an error if a field in this list has a non-empty value.
  1989. // This may be used to include null fields in Patch requests.
  1990. NullFields []string `json:"-"`
  1991. }
  1992. func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) {
  1993. type NoMethod ResourcesListResponse
  1994. raw := NoMethod(*s)
  1995. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1996. }
  1997. // Rule: A rule to be applied in a Policy.
  1998. type Rule struct {
  1999. // Action: Required
  2000. Action string `json:"action,omitempty"`
  2001. // Conditions: Additional restrictions that must be met. All conditions
  2002. // must pass for the rule to match.
  2003. Conditions []*Condition `json:"conditions,omitempty"`
  2004. // Description: Human-readable description of the rule.
  2005. Description string `json:"description,omitempty"`
  2006. // Ins: If one or more 'in' clauses are specified, the rule matches if
  2007. // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
  2008. Ins []string `json:"ins,omitempty"`
  2009. // LogConfigs: The config returned to callers of
  2010. // tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
  2011. LogConfigs []*LogConfig `json:"logConfigs,omitempty"`
  2012. // NotIns: If one or more 'not_in' clauses are specified, the rule
  2013. // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the
  2014. // entries.
  2015. NotIns []string `json:"notIns,omitempty"`
  2016. // Permissions: A permission is a string of form '..' (e.g.,
  2017. // 'storage.buckets.list'). A value of '*' matches all permissions, and
  2018. // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
  2019. Permissions []string `json:"permissions,omitempty"`
  2020. // ForceSendFields is a list of field names (e.g. "Action") to
  2021. // unconditionally include in API requests. By default, fields with
  2022. // empty values are omitted from API requests. However, any non-pointer,
  2023. // non-interface field appearing in ForceSendFields will be sent to the
  2024. // server regardless of whether the field is empty or not. This may be
  2025. // used to include empty fields in Patch requests.
  2026. ForceSendFields []string `json:"-"`
  2027. // NullFields is a list of field names (e.g. "Action") to include in API
  2028. // requests with the JSON null value. By default, fields with empty
  2029. // values are omitted from API requests. However, any field with an
  2030. // empty value appearing in NullFields will be sent to the server as
  2031. // null. It is an error if a field in this list has a non-empty value.
  2032. // This may be used to include null fields in Patch requests.
  2033. NullFields []string `json:"-"`
  2034. }
  2035. func (s *Rule) MarshalJSON() ([]byte, error) {
  2036. type NoMethod Rule
  2037. raw := NoMethod(*s)
  2038. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2039. }
  2040. // ServiceAccount: Service Account used as a credential.
  2041. type ServiceAccount struct {
  2042. // Email: The IAM service account email address like
  2043. // test@myproject.iam.gserviceaccount.com
  2044. Email string `json:"email,omitempty"`
  2045. // ForceSendFields is a list of field names (e.g. "Email") to
  2046. // unconditionally include in API requests. By default, fields with
  2047. // empty values are omitted from API requests. However, any non-pointer,
  2048. // non-interface field appearing in ForceSendFields will be sent to the
  2049. // server regardless of whether the field is empty or not. This may be
  2050. // used to include empty fields in Patch requests.
  2051. ForceSendFields []string `json:"-"`
  2052. // NullFields is a list of field names (e.g. "Email") to include in API
  2053. // requests with the JSON null value. By default, fields with empty
  2054. // values are omitted from API requests. However, any field with an
  2055. // empty value appearing in NullFields will be sent to the server as
  2056. // null. It is an error if a field in this list has a non-empty value.
  2057. // This may be used to include null fields in Patch requests.
  2058. NullFields []string `json:"-"`
  2059. }
  2060. func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  2061. type NoMethod ServiceAccount
  2062. raw := NoMethod(*s)
  2063. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2064. }
  2065. type TargetConfiguration struct {
  2066. // Config: The configuration to use for this deployment.
  2067. Config *ConfigFile `json:"config,omitempty"`
  2068. // Imports: Specifies any files to import for this configuration. This
  2069. // can be used to import templates or other files. For example, you
  2070. // might import a text file in order to use the file in a template.
  2071. Imports []*ImportFile `json:"imports,omitempty"`
  2072. // ForceSendFields is a list of field names (e.g. "Config") to
  2073. // unconditionally include in API requests. By default, fields with
  2074. // empty values are omitted from API requests. However, any non-pointer,
  2075. // non-interface field appearing in ForceSendFields will be sent to the
  2076. // server regardless of whether the field is empty or not. This may be
  2077. // used to include empty fields in Patch requests.
  2078. ForceSendFields []string `json:"-"`
  2079. // NullFields is a list of field names (e.g. "Config") to include in API
  2080. // requests with the JSON null value. By default, fields with empty
  2081. // values are omitted from API requests. However, any field with an
  2082. // empty value appearing in NullFields will be sent to the server as
  2083. // null. It is an error if a field in this list has a non-empty value.
  2084. // This may be used to include null fields in Patch requests.
  2085. NullFields []string `json:"-"`
  2086. }
  2087. func (s *TargetConfiguration) MarshalJSON() ([]byte, error) {
  2088. type NoMethod TargetConfiguration
  2089. raw := NoMethod(*s)
  2090. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2091. }
  2092. // TemplateContents: Files that make up the template contents of a
  2093. // template type.
  2094. type TemplateContents struct {
  2095. // Imports: Import files referenced by the main template.
  2096. Imports []*ImportFile `json:"imports,omitempty"`
  2097. // Interpreter: Which interpreter (python or jinja) should be used
  2098. // during expansion.
  2099. Interpreter string `json:"interpreter,omitempty"`
  2100. // MainTemplate: The filename of the mainTemplate
  2101. MainTemplate string `json:"mainTemplate,omitempty"`
  2102. // Schema: The contents of the template schema.
  2103. Schema string `json:"schema,omitempty"`
  2104. // Template: The contents of the main template file.
  2105. Template string `json:"template,omitempty"`
  2106. // ForceSendFields is a list of field names (e.g. "Imports") to
  2107. // unconditionally include in API requests. By default, fields with
  2108. // empty values are omitted from API requests. However, any non-pointer,
  2109. // non-interface field appearing in ForceSendFields will be sent to the
  2110. // server regardless of whether the field is empty or not. This may be
  2111. // used to include empty fields in Patch requests.
  2112. ForceSendFields []string `json:"-"`
  2113. // NullFields is a list of field names (e.g. "Imports") to include in
  2114. // API requests with the JSON null value. By default, fields with empty
  2115. // values are omitted from API requests. However, any field with an
  2116. // empty value appearing in NullFields will be sent to the server as
  2117. // null. It is an error if a field in this list has a non-empty value.
  2118. // This may be used to include null fields in Patch requests.
  2119. NullFields []string `json:"-"`
  2120. }
  2121. func (s *TemplateContents) MarshalJSON() ([]byte, error) {
  2122. type NoMethod TemplateContents
  2123. raw := NoMethod(*s)
  2124. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2125. }
  2126. type TestPermissionsRequest struct {
  2127. // Permissions: The set of permissions to check for the 'resource'.
  2128. // Permissions with wildcards (such as '*' or 'storage.*') are not
  2129. // allowed.
  2130. Permissions []string `json:"permissions,omitempty"`
  2131. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2132. // unconditionally include in API requests. By default, fields with
  2133. // empty values are omitted from API requests. However, any non-pointer,
  2134. // non-interface field appearing in ForceSendFields will be sent to the
  2135. // server regardless of whether the field is empty or not. This may be
  2136. // used to include empty fields in Patch requests.
  2137. ForceSendFields []string `json:"-"`
  2138. // NullFields is a list of field names (e.g. "Permissions") to include
  2139. // in API requests with the JSON null value. By default, fields with
  2140. // empty values are omitted from API requests. However, any field with
  2141. // an empty value appearing in NullFields will be sent to the server as
  2142. // null. It is an error if a field in this list has a non-empty value.
  2143. // This may be used to include null fields in Patch requests.
  2144. NullFields []string `json:"-"`
  2145. }
  2146. func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) {
  2147. type NoMethod TestPermissionsRequest
  2148. raw := NoMethod(*s)
  2149. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2150. }
  2151. type TestPermissionsResponse struct {
  2152. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  2153. // the caller is allowed.
  2154. Permissions []string `json:"permissions,omitempty"`
  2155. // ServerResponse contains the HTTP response code and headers from the
  2156. // server.
  2157. googleapi.ServerResponse `json:"-"`
  2158. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2159. // unconditionally include in API requests. By default, fields with
  2160. // empty values are omitted from API requests. However, any non-pointer,
  2161. // non-interface field appearing in ForceSendFields will be sent to the
  2162. // server regardless of whether the field is empty or not. This may be
  2163. // used to include empty fields in Patch requests.
  2164. ForceSendFields []string `json:"-"`
  2165. // NullFields is a list of field names (e.g. "Permissions") to include
  2166. // in API requests with the JSON null value. By default, fields with
  2167. // empty values are omitted from API requests. However, any field with
  2168. // an empty value appearing in NullFields will be sent to the server as
  2169. // null. It is an error if a field in this list has a non-empty value.
  2170. // This may be used to include null fields in Patch requests.
  2171. NullFields []string `json:"-"`
  2172. }
  2173. func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) {
  2174. type NoMethod TestPermissionsResponse
  2175. raw := NoMethod(*s)
  2176. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2177. }
  2178. // Type: A resource type supported by Deployment Manager.
  2179. type Type struct {
  2180. // Base: Base Type (configurable service) that backs this Type.
  2181. Base *BaseType `json:"base,omitempty"`
  2182. // Description: An optional textual description of the resource;
  2183. // provided by the client when the resource is created.
  2184. Description string `json:"description,omitempty"`
  2185. // Id: Output only. Unique identifier for the resource; defined by the
  2186. // server.
  2187. Id uint64 `json:"id,omitempty,string"`
  2188. // InsertTime: Output only. Timestamp when the type was created, in
  2189. // RFC3339 text format.
  2190. InsertTime string `json:"insertTime,omitempty"`
  2191. // Labels: Map of labels; provided by the client when the resource is
  2192. // created or updated. Specifically: Label keys must be between 1 and 63
  2193. // characters long and must conform to the following regular expression:
  2194. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  2195. // characters long and must conform to the regular expression
  2196. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  2197. Labels []*TypeLabelEntry `json:"labels,omitempty"`
  2198. // Name: Name of the type.
  2199. Name string `json:"name,omitempty"`
  2200. // Operation: Output only. The Operation that most recently ran, or is
  2201. // currently running, on this type.
  2202. Operation *Operation `json:"operation,omitempty"`
  2203. // SelfLink: Output only. Self link for the type.
  2204. SelfLink string `json:"selfLink,omitempty"`
  2205. // ForceSendFields is a list of field names (e.g. "Base") to
  2206. // unconditionally include in API requests. By default, fields with
  2207. // empty values are omitted from API requests. However, any non-pointer,
  2208. // non-interface field appearing in ForceSendFields will be sent to the
  2209. // server regardless of whether the field is empty or not. This may be
  2210. // used to include empty fields in Patch requests.
  2211. ForceSendFields []string `json:"-"`
  2212. // NullFields is a list of field names (e.g. "Base") to include in API
  2213. // requests with the JSON null value. By default, fields with empty
  2214. // values are omitted from API requests. However, any field with an
  2215. // empty value appearing in NullFields will be sent to the server as
  2216. // null. It is an error if a field in this list has a non-empty value.
  2217. // This may be used to include null fields in Patch requests.
  2218. NullFields []string `json:"-"`
  2219. }
  2220. func (s *Type) MarshalJSON() ([]byte, error) {
  2221. type NoMethod Type
  2222. raw := NoMethod(*s)
  2223. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2224. }
  2225. // TypeInfo: Contains detailed information about a composite type, base
  2226. // type, or base type with specific collection.
  2227. type TypeInfo struct {
  2228. // Description: The description of the type.
  2229. Description string `json:"description,omitempty"`
  2230. // DocumentationLink: For swagger 2.0 externalDocs field will be used.
  2231. // For swagger 1.2 this field will be empty.
  2232. DocumentationLink string `json:"documentationLink,omitempty"`
  2233. // Kind: Output only. Type of the output. Always
  2234. // deploymentManager#TypeInfo for TypeInfo.
  2235. Kind string `json:"kind,omitempty"`
  2236. // Name: The base type or composite type name.
  2237. Name string `json:"name,omitempty"`
  2238. // Schema: For base types with a collection, we return a schema and
  2239. // documentation link For template types, we return only a schema
  2240. Schema *TypeInfoSchemaInfo `json:"schema,omitempty"`
  2241. // SelfLink: Output only. Server-defined URL for the resource.
  2242. SelfLink string `json:"selfLink,omitempty"`
  2243. // Title: The title on the API descriptor URL provided.
  2244. Title string `json:"title,omitempty"`
  2245. // ServerResponse contains the HTTP response code and headers from the
  2246. // server.
  2247. googleapi.ServerResponse `json:"-"`
  2248. // ForceSendFields is a list of field names (e.g. "Description") to
  2249. // unconditionally include in API requests. By default, fields with
  2250. // empty values are omitted from API requests. However, any non-pointer,
  2251. // non-interface field appearing in ForceSendFields will be sent to the
  2252. // server regardless of whether the field is empty or not. This may be
  2253. // used to include empty fields in Patch requests.
  2254. ForceSendFields []string `json:"-"`
  2255. // NullFields is a list of field names (e.g. "Description") to include
  2256. // in API requests with the JSON null value. By default, fields with
  2257. // empty values are omitted from API requests. However, any field with
  2258. // an empty value appearing in NullFields will be sent to the server as
  2259. // null. It is an error if a field in this list has a non-empty value.
  2260. // This may be used to include null fields in Patch requests.
  2261. NullFields []string `json:"-"`
  2262. }
  2263. func (s *TypeInfo) MarshalJSON() ([]byte, error) {
  2264. type NoMethod TypeInfo
  2265. raw := NoMethod(*s)
  2266. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2267. }
  2268. type TypeInfoSchemaInfo struct {
  2269. // Input: The properties that this composite type or base type
  2270. // collection accept as input, represented as a json blob, format is:
  2271. // JSON Schema Draft V4
  2272. Input string `json:"input,omitempty"`
  2273. // Output: The properties that this composite type or base type
  2274. // collection exposes as output, these properties can be used for
  2275. // references, represented as json blob, format is: JSON Schema Draft V4
  2276. Output string `json:"output,omitempty"`
  2277. // ForceSendFields is a list of field names (e.g. "Input") to
  2278. // unconditionally include in API requests. By default, fields with
  2279. // empty values are omitted from API requests. However, any non-pointer,
  2280. // non-interface field appearing in ForceSendFields will be sent to the
  2281. // server regardless of whether the field is empty or not. This may be
  2282. // used to include empty fields in Patch requests.
  2283. ForceSendFields []string `json:"-"`
  2284. // NullFields is a list of field names (e.g. "Input") to include in API
  2285. // requests with the JSON null value. By default, fields with empty
  2286. // values are omitted from API requests. However, any field with an
  2287. // empty value appearing in NullFields will be sent to the server as
  2288. // null. It is an error if a field in this list has a non-empty value.
  2289. // This may be used to include null fields in Patch requests.
  2290. NullFields []string `json:"-"`
  2291. }
  2292. func (s *TypeInfoSchemaInfo) MarshalJSON() ([]byte, error) {
  2293. type NoMethod TypeInfoSchemaInfo
  2294. raw := NoMethod(*s)
  2295. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2296. }
  2297. type TypeLabelEntry struct {
  2298. Key string `json:"key,omitempty"`
  2299. Value string `json:"value,omitempty"`
  2300. // ForceSendFields is a list of field names (e.g. "Key") to
  2301. // unconditionally include in API requests. By default, fields with
  2302. // empty values are omitted from API requests. However, any non-pointer,
  2303. // non-interface field appearing in ForceSendFields will be sent to the
  2304. // server regardless of whether the field is empty or not. This may be
  2305. // used to include empty fields in Patch requests.
  2306. ForceSendFields []string `json:"-"`
  2307. // NullFields is a list of field names (e.g. "Key") to include in API
  2308. // requests with the JSON null value. By default, fields with empty
  2309. // values are omitted from API requests. However, any field with an
  2310. // empty value appearing in NullFields will be sent to the server as
  2311. // null. It is an error if a field in this list has a non-empty value.
  2312. // This may be used to include null fields in Patch requests.
  2313. NullFields []string `json:"-"`
  2314. }
  2315. func (s *TypeLabelEntry) MarshalJSON() ([]byte, error) {
  2316. type NoMethod TypeLabelEntry
  2317. raw := NoMethod(*s)
  2318. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2319. }
  2320. // TypeProvider: A type provider that describes a service-backed Type.
  2321. type TypeProvider struct {
  2322. // CollectionOverrides: Allows resource handling overrides for specific
  2323. // collections
  2324. CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"`
  2325. // Credential: Credential used when interacting with this type.
  2326. Credential *Credential `json:"credential,omitempty"`
  2327. // Description: An optional textual description of the resource;
  2328. // provided by the client when the resource is created.
  2329. Description string `json:"description,omitempty"`
  2330. // DescriptorUrl: Descriptor Url for the this type provider.
  2331. DescriptorUrl string `json:"descriptorUrl,omitempty"`
  2332. // Id: Output only. Unique identifier for the resource; defined by the
  2333. // server.
  2334. Id uint64 `json:"id,omitempty,string"`
  2335. // InsertTime: Output only. Timestamp when the type provider was
  2336. // created, in RFC3339 text format.
  2337. InsertTime string `json:"insertTime,omitempty"`
  2338. // Labels: Map of labels; provided by the client when the resource is
  2339. // created or updated. Specifically: Label keys must be between 1 and 63
  2340. // characters long and must conform to the following regular expression:
  2341. // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
  2342. // characters long and must conform to the regular expression
  2343. // ([a-z]([-a-z0-9]*[a-z0-9])?)?
  2344. Labels []*TypeProviderLabelEntry `json:"labels,omitempty"`
  2345. // Name: Name of the resource; provided by the client when the resource
  2346. // is created. The name must be 1-63 characters long, and comply with
  2347. // RFC1035. Specifically, the name must be 1-63 characters long and
  2348. // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
  2349. // the first character must be a lowercase letter, and all following
  2350. // characters must be a dash, lowercase letter, or digit, except the
  2351. // last character, which cannot be a dash.
  2352. Name string `json:"name,omitempty"`
  2353. // Operation: Output only. The Operation that most recently ran, or is
  2354. // currently running, on this type provider.
  2355. Operation *Operation `json:"operation,omitempty"`
  2356. // Options: Options to apply when handling any resources in this
  2357. // service.
  2358. Options *Options `json:"options,omitempty"`
  2359. // SelfLink: Output only. Self link for the type provider.
  2360. SelfLink string `json:"selfLink,omitempty"`
  2361. // ServerResponse contains the HTTP response code and headers from the
  2362. // server.
  2363. googleapi.ServerResponse `json:"-"`
  2364. // ForceSendFields is a list of field names (e.g. "CollectionOverrides")
  2365. // to unconditionally include in API requests. By default, fields with
  2366. // empty values are omitted from API requests. However, any non-pointer,
  2367. // non-interface field appearing in ForceSendFields will be sent to the
  2368. // server regardless of whether the field is empty or not. This may be
  2369. // used to include empty fields in Patch requests.
  2370. ForceSendFields []string `json:"-"`
  2371. // NullFields is a list of field names (e.g. "CollectionOverrides") to
  2372. // include in API requests with the JSON null value. By default, fields
  2373. // with empty values are omitted from API requests. However, any field
  2374. // with an empty value appearing in NullFields will be sent to the
  2375. // server as null. It is an error if a field in this list has a
  2376. // non-empty value. This may be used to include null fields in Patch
  2377. // requests.
  2378. NullFields []string `json:"-"`
  2379. }
  2380. func (s *TypeProvider) MarshalJSON() ([]byte, error) {
  2381. type NoMethod TypeProvider
  2382. raw := NoMethod(*s)
  2383. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2384. }
  2385. type TypeProviderLabelEntry struct {
  2386. Key string `json:"key,omitempty"`
  2387. Value string `json:"value,omitempty"`
  2388. // ForceSendFields is a list of field names (e.g. "Key") to
  2389. // unconditionally include in API requests. By default, fields with
  2390. // empty values are omitted from API requests. However, any non-pointer,
  2391. // non-interface field appearing in ForceSendFields will be sent to the
  2392. // server regardless of whether the field is empty or not. This may be
  2393. // used to include empty fields in Patch requests.
  2394. ForceSendFields []string `json:"-"`
  2395. // NullFields is a list of field names (e.g. "Key") to include in API
  2396. // requests with the JSON null value. By default, fields with empty
  2397. // values are omitted from API requests. However, any field with an
  2398. // empty value appearing in NullFields will be sent to the server as
  2399. // null. It is an error if a field in this list has a non-empty value.
  2400. // This may be used to include null fields in Patch requests.
  2401. NullFields []string `json:"-"`
  2402. }
  2403. func (s *TypeProviderLabelEntry) MarshalJSON() ([]byte, error) {
  2404. type NoMethod TypeProviderLabelEntry
  2405. raw := NoMethod(*s)
  2406. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2407. }
  2408. // TypeProvidersListResponse: A response that returns all Type Providers
  2409. // supported by Deployment Manager
  2410. type TypeProvidersListResponse struct {
  2411. // NextPageToken: A token used to continue a truncated list request.
  2412. NextPageToken string `json:"nextPageToken,omitempty"`
  2413. // TypeProviders: Output only. A list of resource type providers
  2414. // supported by Deployment Manager.
  2415. TypeProviders []*TypeProvider `json:"typeProviders,omitempty"`
  2416. // ServerResponse contains the HTTP response code and headers from the
  2417. // server.
  2418. googleapi.ServerResponse `json:"-"`
  2419. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2420. // unconditionally include in API requests. By default, fields with
  2421. // empty values are omitted from API requests. However, any non-pointer,
  2422. // non-interface field appearing in ForceSendFields will be sent to the
  2423. // server regardless of whether the field is empty or not. This may be
  2424. // used to include empty fields in Patch requests.
  2425. ForceSendFields []string `json:"-"`
  2426. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2427. // in API requests with the JSON null value. By default, fields with
  2428. // empty values are omitted from API requests. However, any field with
  2429. // an empty value appearing in NullFields will be sent to the server as
  2430. // null. It is an error if a field in this list has a non-empty value.
  2431. // This may be used to include null fields in Patch requests.
  2432. NullFields []string `json:"-"`
  2433. }
  2434. func (s *TypeProvidersListResponse) MarshalJSON() ([]byte, error) {
  2435. type NoMethod TypeProvidersListResponse
  2436. raw := NoMethod(*s)
  2437. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2438. }
  2439. type TypeProvidersListTypesResponse struct {
  2440. // NextPageToken: A token used to continue a truncated list request.
  2441. NextPageToken string `json:"nextPageToken,omitempty"`
  2442. // Types: Output only. A list of resource type info.
  2443. Types []*TypeInfo `json:"types,omitempty"`
  2444. // ServerResponse contains the HTTP response code and headers from the
  2445. // server.
  2446. googleapi.ServerResponse `json:"-"`
  2447. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2448. // unconditionally include in API requests. By default, fields with
  2449. // empty values are omitted from API requests. However, any non-pointer,
  2450. // non-interface field appearing in ForceSendFields will be sent to the
  2451. // server regardless of whether the field is empty or not. This may be
  2452. // used to include empty fields in Patch requests.
  2453. ForceSendFields []string `json:"-"`
  2454. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2455. // in API requests with the JSON null value. By default, fields with
  2456. // empty values are omitted from API requests. However, any field with
  2457. // an empty value appearing in NullFields will be sent to the server as
  2458. // null. It is an error if a field in this list has a non-empty value.
  2459. // This may be used to include null fields in Patch requests.
  2460. NullFields []string `json:"-"`
  2461. }
  2462. func (s *TypeProvidersListTypesResponse) MarshalJSON() ([]byte, error) {
  2463. type NoMethod TypeProvidersListTypesResponse
  2464. raw := NoMethod(*s)
  2465. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2466. }
  2467. // TypesListResponse: A response that returns all Types supported by
  2468. // Deployment Manager
  2469. type TypesListResponse struct {
  2470. // NextPageToken: A token used to continue a truncated list request.
  2471. NextPageToken string `json:"nextPageToken,omitempty"`
  2472. // Types: Output only. A list of resource types supported by Deployment
  2473. // Manager.
  2474. Types []*Type `json:"types,omitempty"`
  2475. // ServerResponse contains the HTTP response code and headers from the
  2476. // server.
  2477. googleapi.ServerResponse `json:"-"`
  2478. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2479. // unconditionally include in API requests. By default, fields with
  2480. // empty values are omitted from API requests. However, any non-pointer,
  2481. // non-interface field appearing in ForceSendFields will be sent to the
  2482. // server regardless of whether the field is empty or not. This may be
  2483. // used to include empty fields in Patch requests.
  2484. ForceSendFields []string `json:"-"`
  2485. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2486. // in API requests with the JSON null value. By default, fields with
  2487. // empty values are omitted from API requests. However, any field with
  2488. // an empty value appearing in NullFields will be sent to the server as
  2489. // null. It is an error if a field in this list has a non-empty value.
  2490. // This may be used to include null fields in Patch requests.
  2491. NullFields []string `json:"-"`
  2492. }
  2493. func (s *TypesListResponse) MarshalJSON() ([]byte, error) {
  2494. type NoMethod TypesListResponse
  2495. raw := NoMethod(*s)
  2496. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2497. }
  2498. // ValidationOptions: Options for how to validate and process properties
  2499. // on a resource.
  2500. type ValidationOptions struct {
  2501. // SchemaValidation: Customize how deployment manager will validate the
  2502. // resource against schema errors.
  2503. SchemaValidation string `json:"schemaValidation,omitempty"`
  2504. // UndeclaredProperties: Specify what to do with extra properties when
  2505. // executing a request.
  2506. UndeclaredProperties string `json:"undeclaredProperties,omitempty"`
  2507. // ForceSendFields is a list of field names (e.g. "SchemaValidation") to
  2508. // unconditionally include in API requests. By default, fields with
  2509. // empty values are omitted from API requests. However, any non-pointer,
  2510. // non-interface field appearing in ForceSendFields will be sent to the
  2511. // server regardless of whether the field is empty or not. This may be
  2512. // used to include empty fields in Patch requests.
  2513. ForceSendFields []string `json:"-"`
  2514. // NullFields is a list of field names (e.g. "SchemaValidation") to
  2515. // include in API requests with the JSON null value. By default, fields
  2516. // with empty values are omitted from API requests. However, any field
  2517. // with an empty value appearing in NullFields will be sent to the
  2518. // server as null. It is an error if a field in this list has a
  2519. // non-empty value. This may be used to include null fields in Patch
  2520. // requests.
  2521. NullFields []string `json:"-"`
  2522. }
  2523. func (s *ValidationOptions) MarshalJSON() ([]byte, error) {
  2524. type NoMethod ValidationOptions
  2525. raw := NoMethod(*s)
  2526. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2527. }
  2528. // method id "deploymentmanager.compositeTypes.delete":
  2529. type CompositeTypesDeleteCall struct {
  2530. s *Service
  2531. project string
  2532. compositeType string
  2533. urlParams_ gensupport.URLParams
  2534. ctx_ context.Context
  2535. header_ http.Header
  2536. }
  2537. // Delete: Deletes a composite type.
  2538. func (r *CompositeTypesService) Delete(project string, compositeType string) *CompositeTypesDeleteCall {
  2539. c := &CompositeTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2540. c.project = project
  2541. c.compositeType = compositeType
  2542. return c
  2543. }
  2544. // Fields allows partial responses to be retrieved. See
  2545. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2546. // for more information.
  2547. func (c *CompositeTypesDeleteCall) Fields(s ...googleapi.Field) *CompositeTypesDeleteCall {
  2548. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2549. return c
  2550. }
  2551. // Context sets the context to be used in this call's Do method. Any
  2552. // pending HTTP request will be aborted if the provided context is
  2553. // canceled.
  2554. func (c *CompositeTypesDeleteCall) Context(ctx context.Context) *CompositeTypesDeleteCall {
  2555. c.ctx_ = ctx
  2556. return c
  2557. }
  2558. // Header returns an http.Header that can be modified by the caller to
  2559. // add HTTP headers to the request.
  2560. func (c *CompositeTypesDeleteCall) Header() http.Header {
  2561. if c.header_ == nil {
  2562. c.header_ = make(http.Header)
  2563. }
  2564. return c.header_
  2565. }
  2566. func (c *CompositeTypesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2567. reqHeaders := make(http.Header)
  2568. for k, v := range c.header_ {
  2569. reqHeaders[k] = v
  2570. }
  2571. reqHeaders.Set("User-Agent", c.s.userAgent())
  2572. var body io.Reader = nil
  2573. c.urlParams_.Set("alt", alt)
  2574. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  2575. urls += "?" + c.urlParams_.Encode()
  2576. req, _ := http.NewRequest("DELETE", urls, body)
  2577. req.Header = reqHeaders
  2578. googleapi.Expand(req.URL, map[string]string{
  2579. "project": c.project,
  2580. "compositeType": c.compositeType,
  2581. })
  2582. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2583. }
  2584. // Do executes the "deploymentmanager.compositeTypes.delete" call.
  2585. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2586. // status code is an error. Response headers are in either
  2587. // *Operation.ServerResponse.Header or (if a response was returned at
  2588. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2589. // to check whether the returned error was because
  2590. // http.StatusNotModified was returned.
  2591. func (c *CompositeTypesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2592. gensupport.SetOptions(c.urlParams_, opts...)
  2593. res, err := c.doRequest("json")
  2594. if res != nil && res.StatusCode == http.StatusNotModified {
  2595. if res.Body != nil {
  2596. res.Body.Close()
  2597. }
  2598. return nil, &googleapi.Error{
  2599. Code: res.StatusCode,
  2600. Header: res.Header,
  2601. }
  2602. }
  2603. if err != nil {
  2604. return nil, err
  2605. }
  2606. defer googleapi.CloseBody(res)
  2607. if err := googleapi.CheckResponse(res); err != nil {
  2608. return nil, err
  2609. }
  2610. ret := &Operation{
  2611. ServerResponse: googleapi.ServerResponse{
  2612. Header: res.Header,
  2613. HTTPStatusCode: res.StatusCode,
  2614. },
  2615. }
  2616. target := &ret
  2617. if err := gensupport.DecodeResponse(target, res); err != nil {
  2618. return nil, err
  2619. }
  2620. return ret, nil
  2621. // {
  2622. // "description": "Deletes a composite type.",
  2623. // "httpMethod": "DELETE",
  2624. // "id": "deploymentmanager.compositeTypes.delete",
  2625. // "parameterOrder": [
  2626. // "project",
  2627. // "compositeType"
  2628. // ],
  2629. // "parameters": {
  2630. // "compositeType": {
  2631. // "description": "The name of the type for this request.",
  2632. // "location": "path",
  2633. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  2634. // "required": true,
  2635. // "type": "string"
  2636. // },
  2637. // "project": {
  2638. // "description": "The project ID for this request.",
  2639. // "location": "path",
  2640. // "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])?))",
  2641. // "required": true,
  2642. // "type": "string"
  2643. // }
  2644. // },
  2645. // "path": "{project}/global/compositeTypes/{compositeType}",
  2646. // "response": {
  2647. // "$ref": "Operation"
  2648. // },
  2649. // "scopes": [
  2650. // "https://www.googleapis.com/auth/cloud-platform",
  2651. // "https://www.googleapis.com/auth/ndev.cloudman"
  2652. // ]
  2653. // }
  2654. }
  2655. // method id "deploymentmanager.compositeTypes.get":
  2656. type CompositeTypesGetCall struct {
  2657. s *Service
  2658. project string
  2659. compositeType string
  2660. urlParams_ gensupport.URLParams
  2661. ifNoneMatch_ string
  2662. ctx_ context.Context
  2663. header_ http.Header
  2664. }
  2665. // Get: Gets information about a specific composite type.
  2666. func (r *CompositeTypesService) Get(project string, compositeType string) *CompositeTypesGetCall {
  2667. c := &CompositeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2668. c.project = project
  2669. c.compositeType = compositeType
  2670. return c
  2671. }
  2672. // Fields allows partial responses to be retrieved. See
  2673. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2674. // for more information.
  2675. func (c *CompositeTypesGetCall) Fields(s ...googleapi.Field) *CompositeTypesGetCall {
  2676. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2677. return c
  2678. }
  2679. // IfNoneMatch sets the optional parameter which makes the operation
  2680. // fail if the object's ETag matches the given value. This is useful for
  2681. // getting updates only after the object has changed since the last
  2682. // request. Use googleapi.IsNotModified to check whether the response
  2683. // error from Do is the result of In-None-Match.
  2684. func (c *CompositeTypesGetCall) IfNoneMatch(entityTag string) *CompositeTypesGetCall {
  2685. c.ifNoneMatch_ = entityTag
  2686. return c
  2687. }
  2688. // Context sets the context to be used in this call's Do method. Any
  2689. // pending HTTP request will be aborted if the provided context is
  2690. // canceled.
  2691. func (c *CompositeTypesGetCall) Context(ctx context.Context) *CompositeTypesGetCall {
  2692. c.ctx_ = ctx
  2693. return c
  2694. }
  2695. // Header returns an http.Header that can be modified by the caller to
  2696. // add HTTP headers to the request.
  2697. func (c *CompositeTypesGetCall) Header() http.Header {
  2698. if c.header_ == nil {
  2699. c.header_ = make(http.Header)
  2700. }
  2701. return c.header_
  2702. }
  2703. func (c *CompositeTypesGetCall) doRequest(alt string) (*http.Response, error) {
  2704. reqHeaders := make(http.Header)
  2705. for k, v := range c.header_ {
  2706. reqHeaders[k] = v
  2707. }
  2708. reqHeaders.Set("User-Agent", c.s.userAgent())
  2709. if c.ifNoneMatch_ != "" {
  2710. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2711. }
  2712. var body io.Reader = nil
  2713. c.urlParams_.Set("alt", alt)
  2714. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  2715. urls += "?" + c.urlParams_.Encode()
  2716. req, _ := http.NewRequest("GET", urls, body)
  2717. req.Header = reqHeaders
  2718. googleapi.Expand(req.URL, map[string]string{
  2719. "project": c.project,
  2720. "compositeType": c.compositeType,
  2721. })
  2722. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2723. }
  2724. // Do executes the "deploymentmanager.compositeTypes.get" call.
  2725. // Exactly one of *CompositeType or error will be non-nil. Any non-2xx
  2726. // status code is an error. Response headers are in either
  2727. // *CompositeType.ServerResponse.Header or (if a response was returned
  2728. // at all) in error.(*googleapi.Error).Header. Use
  2729. // googleapi.IsNotModified to check whether the returned error was
  2730. // because http.StatusNotModified was returned.
  2731. func (c *CompositeTypesGetCall) Do(opts ...googleapi.CallOption) (*CompositeType, error) {
  2732. gensupport.SetOptions(c.urlParams_, opts...)
  2733. res, err := c.doRequest("json")
  2734. if res != nil && res.StatusCode == http.StatusNotModified {
  2735. if res.Body != nil {
  2736. res.Body.Close()
  2737. }
  2738. return nil, &googleapi.Error{
  2739. Code: res.StatusCode,
  2740. Header: res.Header,
  2741. }
  2742. }
  2743. if err != nil {
  2744. return nil, err
  2745. }
  2746. defer googleapi.CloseBody(res)
  2747. if err := googleapi.CheckResponse(res); err != nil {
  2748. return nil, err
  2749. }
  2750. ret := &CompositeType{
  2751. ServerResponse: googleapi.ServerResponse{
  2752. Header: res.Header,
  2753. HTTPStatusCode: res.StatusCode,
  2754. },
  2755. }
  2756. target := &ret
  2757. if err := gensupport.DecodeResponse(target, res); err != nil {
  2758. return nil, err
  2759. }
  2760. return ret, nil
  2761. // {
  2762. // "description": "Gets information about a specific composite type.",
  2763. // "httpMethod": "GET",
  2764. // "id": "deploymentmanager.compositeTypes.get",
  2765. // "parameterOrder": [
  2766. // "project",
  2767. // "compositeType"
  2768. // ],
  2769. // "parameters": {
  2770. // "compositeType": {
  2771. // "description": "The name of the composite type for this request.",
  2772. // "location": "path",
  2773. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  2774. // "required": true,
  2775. // "type": "string"
  2776. // },
  2777. // "project": {
  2778. // "description": "The project ID for this request.",
  2779. // "location": "path",
  2780. // "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])?))",
  2781. // "required": true,
  2782. // "type": "string"
  2783. // }
  2784. // },
  2785. // "path": "{project}/global/compositeTypes/{compositeType}",
  2786. // "response": {
  2787. // "$ref": "CompositeType"
  2788. // },
  2789. // "scopes": [
  2790. // "https://www.googleapis.com/auth/cloud-platform",
  2791. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  2792. // "https://www.googleapis.com/auth/ndev.cloudman",
  2793. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  2794. // ]
  2795. // }
  2796. }
  2797. // method id "deploymentmanager.compositeTypes.insert":
  2798. type CompositeTypesInsertCall struct {
  2799. s *Service
  2800. project string
  2801. compositetype *CompositeType
  2802. urlParams_ gensupport.URLParams
  2803. ctx_ context.Context
  2804. header_ http.Header
  2805. }
  2806. // Insert: Creates a composite type.
  2807. func (r *CompositeTypesService) Insert(project string, compositetype *CompositeType) *CompositeTypesInsertCall {
  2808. c := &CompositeTypesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2809. c.project = project
  2810. c.compositetype = compositetype
  2811. return c
  2812. }
  2813. // Fields allows partial responses to be retrieved. See
  2814. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2815. // for more information.
  2816. func (c *CompositeTypesInsertCall) Fields(s ...googleapi.Field) *CompositeTypesInsertCall {
  2817. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2818. return c
  2819. }
  2820. // Context sets the context to be used in this call's Do method. Any
  2821. // pending HTTP request will be aborted if the provided context is
  2822. // canceled.
  2823. func (c *CompositeTypesInsertCall) Context(ctx context.Context) *CompositeTypesInsertCall {
  2824. c.ctx_ = ctx
  2825. return c
  2826. }
  2827. // Header returns an http.Header that can be modified by the caller to
  2828. // add HTTP headers to the request.
  2829. func (c *CompositeTypesInsertCall) Header() http.Header {
  2830. if c.header_ == nil {
  2831. c.header_ = make(http.Header)
  2832. }
  2833. return c.header_
  2834. }
  2835. func (c *CompositeTypesInsertCall) doRequest(alt string) (*http.Response, error) {
  2836. reqHeaders := make(http.Header)
  2837. for k, v := range c.header_ {
  2838. reqHeaders[k] = v
  2839. }
  2840. reqHeaders.Set("User-Agent", c.s.userAgent())
  2841. var body io.Reader = nil
  2842. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  2843. if err != nil {
  2844. return nil, err
  2845. }
  2846. reqHeaders.Set("Content-Type", "application/json")
  2847. c.urlParams_.Set("alt", alt)
  2848. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes")
  2849. urls += "?" + c.urlParams_.Encode()
  2850. req, _ := http.NewRequest("POST", urls, body)
  2851. req.Header = reqHeaders
  2852. googleapi.Expand(req.URL, map[string]string{
  2853. "project": c.project,
  2854. })
  2855. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2856. }
  2857. // Do executes the "deploymentmanager.compositeTypes.insert" call.
  2858. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2859. // status code is an error. Response headers are in either
  2860. // *Operation.ServerResponse.Header or (if a response was returned at
  2861. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2862. // to check whether the returned error was because
  2863. // http.StatusNotModified was returned.
  2864. func (c *CompositeTypesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2865. gensupport.SetOptions(c.urlParams_, opts...)
  2866. res, err := c.doRequest("json")
  2867. if res != nil && res.StatusCode == http.StatusNotModified {
  2868. if res.Body != nil {
  2869. res.Body.Close()
  2870. }
  2871. return nil, &googleapi.Error{
  2872. Code: res.StatusCode,
  2873. Header: res.Header,
  2874. }
  2875. }
  2876. if err != nil {
  2877. return nil, err
  2878. }
  2879. defer googleapi.CloseBody(res)
  2880. if err := googleapi.CheckResponse(res); err != nil {
  2881. return nil, err
  2882. }
  2883. ret := &Operation{
  2884. ServerResponse: googleapi.ServerResponse{
  2885. Header: res.Header,
  2886. HTTPStatusCode: res.StatusCode,
  2887. },
  2888. }
  2889. target := &ret
  2890. if err := gensupport.DecodeResponse(target, res); err != nil {
  2891. return nil, err
  2892. }
  2893. return ret, nil
  2894. // {
  2895. // "description": "Creates a composite type.",
  2896. // "httpMethod": "POST",
  2897. // "id": "deploymentmanager.compositeTypes.insert",
  2898. // "parameterOrder": [
  2899. // "project"
  2900. // ],
  2901. // "parameters": {
  2902. // "project": {
  2903. // "description": "The project ID for this request.",
  2904. // "location": "path",
  2905. // "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])?))",
  2906. // "required": true,
  2907. // "type": "string"
  2908. // }
  2909. // },
  2910. // "path": "{project}/global/compositeTypes",
  2911. // "request": {
  2912. // "$ref": "CompositeType"
  2913. // },
  2914. // "response": {
  2915. // "$ref": "Operation"
  2916. // },
  2917. // "scopes": [
  2918. // "https://www.googleapis.com/auth/cloud-platform",
  2919. // "https://www.googleapis.com/auth/ndev.cloudman"
  2920. // ]
  2921. // }
  2922. }
  2923. // method id "deploymentmanager.compositeTypes.list":
  2924. type CompositeTypesListCall struct {
  2925. s *Service
  2926. project string
  2927. urlParams_ gensupport.URLParams
  2928. ifNoneMatch_ string
  2929. ctx_ context.Context
  2930. header_ http.Header
  2931. }
  2932. // List: Lists all composite types for Deployment Manager.
  2933. func (r *CompositeTypesService) List(project string) *CompositeTypesListCall {
  2934. c := &CompositeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2935. c.project = project
  2936. return c
  2937. }
  2938. // Filter sets the optional parameter "filter": A filter expression that
  2939. // filters resources listed in the response. The expression must specify
  2940. // the field name, a comparison operator, and the value that you want to
  2941. // use for filtering. The value must be a string, a number, or a
  2942. // boolean. The comparison operator must be either =, !=, >, or <.
  2943. //
  2944. // For example, if you are filtering Compute Engine instances, you can
  2945. // exclude instances named example-instance by specifying name !=
  2946. // example-instance.
  2947. //
  2948. // You can also filter nested fields. For example, you could specify
  2949. // scheduling.automaticRestart = false to include instances only if they
  2950. // are not scheduled for automatic restarts. You can use filtering on
  2951. // nested fields to filter based on resource labels.
  2952. //
  2953. // To filter on multiple expressions, provide each separate expression
  2954. // within parentheses. For example, (scheduling.automaticRestart = true)
  2955. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  2956. // AND expression. However, you can include AND and OR expressions
  2957. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  2958. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  2959. // true).
  2960. func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall {
  2961. c.urlParams_.Set("filter", filter)
  2962. return c
  2963. }
  2964. // MaxResults sets the optional parameter "maxResults": The maximum
  2965. // number of results per page that should be returned. If the number of
  2966. // available results is larger than maxResults, Compute Engine returns a
  2967. // nextPageToken that can be used to get the next page of results in
  2968. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  2969. // (Default: 500)
  2970. func (c *CompositeTypesListCall) MaxResults(maxResults int64) *CompositeTypesListCall {
  2971. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2972. return c
  2973. }
  2974. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  2975. // a certain order. By default, results are returned in alphanumerical
  2976. // order based on the resource name.
  2977. //
  2978. // You can also sort results in descending order based on the creation
  2979. // timestamp using orderBy="creationTimestamp desc". This sorts results
  2980. // based on the creationTimestamp field in reverse chronological order
  2981. // (newest result first). Use this to sort resources like operations so
  2982. // that the newest operation is returned first.
  2983. //
  2984. // Currently, only sorting by name or creationTimestamp desc is
  2985. // supported.
  2986. func (c *CompositeTypesListCall) OrderBy(orderBy string) *CompositeTypesListCall {
  2987. c.urlParams_.Set("orderBy", orderBy)
  2988. return c
  2989. }
  2990. // PageToken sets the optional parameter "pageToken": Specifies a page
  2991. // token to use. Set pageToken to the nextPageToken returned by a
  2992. // previous list request to get the next page of results.
  2993. func (c *CompositeTypesListCall) PageToken(pageToken string) *CompositeTypesListCall {
  2994. c.urlParams_.Set("pageToken", pageToken)
  2995. return c
  2996. }
  2997. // Fields allows partial responses to be retrieved. See
  2998. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2999. // for more information.
  3000. func (c *CompositeTypesListCall) Fields(s ...googleapi.Field) *CompositeTypesListCall {
  3001. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3002. return c
  3003. }
  3004. // IfNoneMatch sets the optional parameter which makes the operation
  3005. // fail if the object's ETag matches the given value. This is useful for
  3006. // getting updates only after the object has changed since the last
  3007. // request. Use googleapi.IsNotModified to check whether the response
  3008. // error from Do is the result of In-None-Match.
  3009. func (c *CompositeTypesListCall) IfNoneMatch(entityTag string) *CompositeTypesListCall {
  3010. c.ifNoneMatch_ = entityTag
  3011. return c
  3012. }
  3013. // Context sets the context to be used in this call's Do method. Any
  3014. // pending HTTP request will be aborted if the provided context is
  3015. // canceled.
  3016. func (c *CompositeTypesListCall) Context(ctx context.Context) *CompositeTypesListCall {
  3017. c.ctx_ = ctx
  3018. return c
  3019. }
  3020. // Header returns an http.Header that can be modified by the caller to
  3021. // add HTTP headers to the request.
  3022. func (c *CompositeTypesListCall) Header() http.Header {
  3023. if c.header_ == nil {
  3024. c.header_ = make(http.Header)
  3025. }
  3026. return c.header_
  3027. }
  3028. func (c *CompositeTypesListCall) doRequest(alt string) (*http.Response, error) {
  3029. reqHeaders := make(http.Header)
  3030. for k, v := range c.header_ {
  3031. reqHeaders[k] = v
  3032. }
  3033. reqHeaders.Set("User-Agent", c.s.userAgent())
  3034. if c.ifNoneMatch_ != "" {
  3035. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3036. }
  3037. var body io.Reader = nil
  3038. c.urlParams_.Set("alt", alt)
  3039. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes")
  3040. urls += "?" + c.urlParams_.Encode()
  3041. req, _ := http.NewRequest("GET", urls, body)
  3042. req.Header = reqHeaders
  3043. googleapi.Expand(req.URL, map[string]string{
  3044. "project": c.project,
  3045. })
  3046. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3047. }
  3048. // Do executes the "deploymentmanager.compositeTypes.list" call.
  3049. // Exactly one of *CompositeTypesListResponse or error will be non-nil.
  3050. // Any non-2xx status code is an error. Response headers are in either
  3051. // *CompositeTypesListResponse.ServerResponse.Header or (if a response
  3052. // was returned at all) in error.(*googleapi.Error).Header. Use
  3053. // googleapi.IsNotModified to check whether the returned error was
  3054. // because http.StatusNotModified was returned.
  3055. func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTypesListResponse, error) {
  3056. gensupport.SetOptions(c.urlParams_, opts...)
  3057. res, err := c.doRequest("json")
  3058. if res != nil && res.StatusCode == http.StatusNotModified {
  3059. if res.Body != nil {
  3060. res.Body.Close()
  3061. }
  3062. return nil, &googleapi.Error{
  3063. Code: res.StatusCode,
  3064. Header: res.Header,
  3065. }
  3066. }
  3067. if err != nil {
  3068. return nil, err
  3069. }
  3070. defer googleapi.CloseBody(res)
  3071. if err := googleapi.CheckResponse(res); err != nil {
  3072. return nil, err
  3073. }
  3074. ret := &CompositeTypesListResponse{
  3075. ServerResponse: googleapi.ServerResponse{
  3076. Header: res.Header,
  3077. HTTPStatusCode: res.StatusCode,
  3078. },
  3079. }
  3080. target := &ret
  3081. if err := gensupport.DecodeResponse(target, res); err != nil {
  3082. return nil, err
  3083. }
  3084. return ret, nil
  3085. // {
  3086. // "description": "Lists all composite types for Deployment Manager.",
  3087. // "httpMethod": "GET",
  3088. // "id": "deploymentmanager.compositeTypes.list",
  3089. // "parameterOrder": [
  3090. // "project"
  3091. // ],
  3092. // "parameters": {
  3093. // "filter": {
  3094. // "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).",
  3095. // "location": "query",
  3096. // "type": "string"
  3097. // },
  3098. // "maxResults": {
  3099. // "default": "500",
  3100. // "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)",
  3101. // "format": "uint32",
  3102. // "location": "query",
  3103. // "minimum": "0",
  3104. // "type": "integer"
  3105. // },
  3106. // "orderBy": {
  3107. // "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.",
  3108. // "location": "query",
  3109. // "type": "string"
  3110. // },
  3111. // "pageToken": {
  3112. // "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.",
  3113. // "location": "query",
  3114. // "type": "string"
  3115. // },
  3116. // "project": {
  3117. // "description": "The project ID for this request.",
  3118. // "location": "path",
  3119. // "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])?))",
  3120. // "required": true,
  3121. // "type": "string"
  3122. // }
  3123. // },
  3124. // "path": "{project}/global/compositeTypes",
  3125. // "response": {
  3126. // "$ref": "CompositeTypesListResponse"
  3127. // },
  3128. // "scopes": [
  3129. // "https://www.googleapis.com/auth/cloud-platform",
  3130. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  3131. // "https://www.googleapis.com/auth/ndev.cloudman",
  3132. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  3133. // ]
  3134. // }
  3135. }
  3136. // Pages invokes f for each page of results.
  3137. // A non-nil error returned from f will halt the iteration.
  3138. // The provided context supersedes any context provided to the Context method.
  3139. func (c *CompositeTypesListCall) Pages(ctx context.Context, f func(*CompositeTypesListResponse) error) error {
  3140. c.ctx_ = ctx
  3141. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3142. for {
  3143. x, err := c.Do()
  3144. if err != nil {
  3145. return err
  3146. }
  3147. if err := f(x); err != nil {
  3148. return err
  3149. }
  3150. if x.NextPageToken == "" {
  3151. return nil
  3152. }
  3153. c.PageToken(x.NextPageToken)
  3154. }
  3155. }
  3156. // method id "deploymentmanager.compositeTypes.patch":
  3157. type CompositeTypesPatchCall struct {
  3158. s *Service
  3159. project string
  3160. compositeType string
  3161. compositetype *CompositeType
  3162. urlParams_ gensupport.URLParams
  3163. ctx_ context.Context
  3164. header_ http.Header
  3165. }
  3166. // Patch: Updates a composite type. This method supports patch
  3167. // semantics.
  3168. func (r *CompositeTypesService) Patch(project string, compositeType string, compositetype *CompositeType) *CompositeTypesPatchCall {
  3169. c := &CompositeTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3170. c.project = project
  3171. c.compositeType = compositeType
  3172. c.compositetype = compositetype
  3173. return c
  3174. }
  3175. // Fields allows partial responses to be retrieved. See
  3176. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3177. // for more information.
  3178. func (c *CompositeTypesPatchCall) Fields(s ...googleapi.Field) *CompositeTypesPatchCall {
  3179. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3180. return c
  3181. }
  3182. // Context sets the context to be used in this call's Do method. Any
  3183. // pending HTTP request will be aborted if the provided context is
  3184. // canceled.
  3185. func (c *CompositeTypesPatchCall) Context(ctx context.Context) *CompositeTypesPatchCall {
  3186. c.ctx_ = ctx
  3187. return c
  3188. }
  3189. // Header returns an http.Header that can be modified by the caller to
  3190. // add HTTP headers to the request.
  3191. func (c *CompositeTypesPatchCall) Header() http.Header {
  3192. if c.header_ == nil {
  3193. c.header_ = make(http.Header)
  3194. }
  3195. return c.header_
  3196. }
  3197. func (c *CompositeTypesPatchCall) doRequest(alt string) (*http.Response, error) {
  3198. reqHeaders := make(http.Header)
  3199. for k, v := range c.header_ {
  3200. reqHeaders[k] = v
  3201. }
  3202. reqHeaders.Set("User-Agent", c.s.userAgent())
  3203. var body io.Reader = nil
  3204. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  3205. if err != nil {
  3206. return nil, err
  3207. }
  3208. reqHeaders.Set("Content-Type", "application/json")
  3209. c.urlParams_.Set("alt", alt)
  3210. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  3211. urls += "?" + c.urlParams_.Encode()
  3212. req, _ := http.NewRequest("PATCH", urls, body)
  3213. req.Header = reqHeaders
  3214. googleapi.Expand(req.URL, map[string]string{
  3215. "project": c.project,
  3216. "compositeType": c.compositeType,
  3217. })
  3218. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3219. }
  3220. // Do executes the "deploymentmanager.compositeTypes.patch" call.
  3221. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3222. // status code is an error. Response headers are in either
  3223. // *Operation.ServerResponse.Header or (if a response was returned at
  3224. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3225. // to check whether the returned error was because
  3226. // http.StatusNotModified was returned.
  3227. func (c *CompositeTypesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3228. gensupport.SetOptions(c.urlParams_, opts...)
  3229. res, err := c.doRequest("json")
  3230. if res != nil && res.StatusCode == http.StatusNotModified {
  3231. if res.Body != nil {
  3232. res.Body.Close()
  3233. }
  3234. return nil, &googleapi.Error{
  3235. Code: res.StatusCode,
  3236. Header: res.Header,
  3237. }
  3238. }
  3239. if err != nil {
  3240. return nil, err
  3241. }
  3242. defer googleapi.CloseBody(res)
  3243. if err := googleapi.CheckResponse(res); err != nil {
  3244. return nil, err
  3245. }
  3246. ret := &Operation{
  3247. ServerResponse: googleapi.ServerResponse{
  3248. Header: res.Header,
  3249. HTTPStatusCode: res.StatusCode,
  3250. },
  3251. }
  3252. target := &ret
  3253. if err := gensupport.DecodeResponse(target, res); err != nil {
  3254. return nil, err
  3255. }
  3256. return ret, nil
  3257. // {
  3258. // "description": "Updates a composite type. This method supports patch semantics.",
  3259. // "httpMethod": "PATCH",
  3260. // "id": "deploymentmanager.compositeTypes.patch",
  3261. // "parameterOrder": [
  3262. // "project",
  3263. // "compositeType"
  3264. // ],
  3265. // "parameters": {
  3266. // "compositeType": {
  3267. // "description": "The name of the composite type for this request.",
  3268. // "location": "path",
  3269. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  3270. // "required": true,
  3271. // "type": "string"
  3272. // },
  3273. // "project": {
  3274. // "description": "The project ID for this request.",
  3275. // "location": "path",
  3276. // "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])?))",
  3277. // "required": true,
  3278. // "type": "string"
  3279. // }
  3280. // },
  3281. // "path": "{project}/global/compositeTypes/{compositeType}",
  3282. // "request": {
  3283. // "$ref": "CompositeType"
  3284. // },
  3285. // "response": {
  3286. // "$ref": "Operation"
  3287. // },
  3288. // "scopes": [
  3289. // "https://www.googleapis.com/auth/cloud-platform",
  3290. // "https://www.googleapis.com/auth/ndev.cloudman"
  3291. // ]
  3292. // }
  3293. }
  3294. // method id "deploymentmanager.compositeTypes.update":
  3295. type CompositeTypesUpdateCall struct {
  3296. s *Service
  3297. project string
  3298. compositeType string
  3299. compositetype *CompositeType
  3300. urlParams_ gensupport.URLParams
  3301. ctx_ context.Context
  3302. header_ http.Header
  3303. }
  3304. // Update: Updates a composite type.
  3305. func (r *CompositeTypesService) Update(project string, compositeType string, compositetype *CompositeType) *CompositeTypesUpdateCall {
  3306. c := &CompositeTypesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3307. c.project = project
  3308. c.compositeType = compositeType
  3309. c.compositetype = compositetype
  3310. return c
  3311. }
  3312. // Fields allows partial responses to be retrieved. See
  3313. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3314. // for more information.
  3315. func (c *CompositeTypesUpdateCall) Fields(s ...googleapi.Field) *CompositeTypesUpdateCall {
  3316. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3317. return c
  3318. }
  3319. // Context sets the context to be used in this call's Do method. Any
  3320. // pending HTTP request will be aborted if the provided context is
  3321. // canceled.
  3322. func (c *CompositeTypesUpdateCall) Context(ctx context.Context) *CompositeTypesUpdateCall {
  3323. c.ctx_ = ctx
  3324. return c
  3325. }
  3326. // Header returns an http.Header that can be modified by the caller to
  3327. // add HTTP headers to the request.
  3328. func (c *CompositeTypesUpdateCall) Header() http.Header {
  3329. if c.header_ == nil {
  3330. c.header_ = make(http.Header)
  3331. }
  3332. return c.header_
  3333. }
  3334. func (c *CompositeTypesUpdateCall) doRequest(alt string) (*http.Response, error) {
  3335. reqHeaders := make(http.Header)
  3336. for k, v := range c.header_ {
  3337. reqHeaders[k] = v
  3338. }
  3339. reqHeaders.Set("User-Agent", c.s.userAgent())
  3340. var body io.Reader = nil
  3341. body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype)
  3342. if err != nil {
  3343. return nil, err
  3344. }
  3345. reqHeaders.Set("Content-Type", "application/json")
  3346. c.urlParams_.Set("alt", alt)
  3347. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}")
  3348. urls += "?" + c.urlParams_.Encode()
  3349. req, _ := http.NewRequest("PUT", urls, body)
  3350. req.Header = reqHeaders
  3351. googleapi.Expand(req.URL, map[string]string{
  3352. "project": c.project,
  3353. "compositeType": c.compositeType,
  3354. })
  3355. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3356. }
  3357. // Do executes the "deploymentmanager.compositeTypes.update" call.
  3358. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3359. // status code is an error. Response headers are in either
  3360. // *Operation.ServerResponse.Header or (if a response was returned at
  3361. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3362. // to check whether the returned error was because
  3363. // http.StatusNotModified was returned.
  3364. func (c *CompositeTypesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3365. gensupport.SetOptions(c.urlParams_, opts...)
  3366. res, err := c.doRequest("json")
  3367. if res != nil && res.StatusCode == http.StatusNotModified {
  3368. if res.Body != nil {
  3369. res.Body.Close()
  3370. }
  3371. return nil, &googleapi.Error{
  3372. Code: res.StatusCode,
  3373. Header: res.Header,
  3374. }
  3375. }
  3376. if err != nil {
  3377. return nil, err
  3378. }
  3379. defer googleapi.CloseBody(res)
  3380. if err := googleapi.CheckResponse(res); err != nil {
  3381. return nil, err
  3382. }
  3383. ret := &Operation{
  3384. ServerResponse: googleapi.ServerResponse{
  3385. Header: res.Header,
  3386. HTTPStatusCode: res.StatusCode,
  3387. },
  3388. }
  3389. target := &ret
  3390. if err := gensupport.DecodeResponse(target, res); err != nil {
  3391. return nil, err
  3392. }
  3393. return ret, nil
  3394. // {
  3395. // "description": "Updates a composite type.",
  3396. // "httpMethod": "PUT",
  3397. // "id": "deploymentmanager.compositeTypes.update",
  3398. // "parameterOrder": [
  3399. // "project",
  3400. // "compositeType"
  3401. // ],
  3402. // "parameters": {
  3403. // "compositeType": {
  3404. // "description": "The name of the composite type for this request.",
  3405. // "location": "path",
  3406. // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?",
  3407. // "required": true,
  3408. // "type": "string"
  3409. // },
  3410. // "project": {
  3411. // "description": "The project ID for this request.",
  3412. // "location": "path",
  3413. // "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])?))",
  3414. // "required": true,
  3415. // "type": "string"
  3416. // }
  3417. // },
  3418. // "path": "{project}/global/compositeTypes/{compositeType}",
  3419. // "request": {
  3420. // "$ref": "CompositeType"
  3421. // },
  3422. // "response": {
  3423. // "$ref": "Operation"
  3424. // },
  3425. // "scopes": [
  3426. // "https://www.googleapis.com/auth/cloud-platform",
  3427. // "https://www.googleapis.com/auth/ndev.cloudman"
  3428. // ]
  3429. // }
  3430. }
  3431. // method id "deploymentmanager.deployments.cancelPreview":
  3432. type DeploymentsCancelPreviewCall struct {
  3433. s *Service
  3434. project string
  3435. deployment string
  3436. deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest
  3437. urlParams_ gensupport.URLParams
  3438. ctx_ context.Context
  3439. header_ http.Header
  3440. }
  3441. // CancelPreview: Cancels and removes the preview currently associated
  3442. // with the deployment.
  3443. func (r *DeploymentsService) CancelPreview(project string, deployment string, deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest) *DeploymentsCancelPreviewCall {
  3444. c := &DeploymentsCancelPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3445. c.project = project
  3446. c.deployment = deployment
  3447. c.deploymentscancelpreviewrequest = deploymentscancelpreviewrequest
  3448. return c
  3449. }
  3450. // Fields allows partial responses to be retrieved. See
  3451. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3452. // for more information.
  3453. func (c *DeploymentsCancelPreviewCall) Fields(s ...googleapi.Field) *DeploymentsCancelPreviewCall {
  3454. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3455. return c
  3456. }
  3457. // Context sets the context to be used in this call's Do method. Any
  3458. // pending HTTP request will be aborted if the provided context is
  3459. // canceled.
  3460. func (c *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall {
  3461. c.ctx_ = ctx
  3462. return c
  3463. }
  3464. // Header returns an http.Header that can be modified by the caller to
  3465. // add HTTP headers to the request.
  3466. func (c *DeploymentsCancelPreviewCall) Header() http.Header {
  3467. if c.header_ == nil {
  3468. c.header_ = make(http.Header)
  3469. }
  3470. return c.header_
  3471. }
  3472. func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) {
  3473. reqHeaders := make(http.Header)
  3474. for k, v := range c.header_ {
  3475. reqHeaders[k] = v
  3476. }
  3477. reqHeaders.Set("User-Agent", c.s.userAgent())
  3478. var body io.Reader = nil
  3479. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest)
  3480. if err != nil {
  3481. return nil, err
  3482. }
  3483. reqHeaders.Set("Content-Type", "application/json")
  3484. c.urlParams_.Set("alt", alt)
  3485. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/cancelPreview")
  3486. urls += "?" + c.urlParams_.Encode()
  3487. req, _ := http.NewRequest("POST", urls, body)
  3488. req.Header = reqHeaders
  3489. googleapi.Expand(req.URL, map[string]string{
  3490. "project": c.project,
  3491. "deployment": c.deployment,
  3492. })
  3493. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3494. }
  3495. // Do executes the "deploymentmanager.deployments.cancelPreview" call.
  3496. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3497. // status code is an error. Response headers are in either
  3498. // *Operation.ServerResponse.Header or (if a response was returned at
  3499. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3500. // to check whether the returned error was because
  3501. // http.StatusNotModified was returned.
  3502. func (c *DeploymentsCancelPreviewCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3503. gensupport.SetOptions(c.urlParams_, opts...)
  3504. res, err := c.doRequest("json")
  3505. if res != nil && res.StatusCode == http.StatusNotModified {
  3506. if res.Body != nil {
  3507. res.Body.Close()
  3508. }
  3509. return nil, &googleapi.Error{
  3510. Code: res.StatusCode,
  3511. Header: res.Header,
  3512. }
  3513. }
  3514. if err != nil {
  3515. return nil, err
  3516. }
  3517. defer googleapi.CloseBody(res)
  3518. if err := googleapi.CheckResponse(res); err != nil {
  3519. return nil, err
  3520. }
  3521. ret := &Operation{
  3522. ServerResponse: googleapi.ServerResponse{
  3523. Header: res.Header,
  3524. HTTPStatusCode: res.StatusCode,
  3525. },
  3526. }
  3527. target := &ret
  3528. if err := gensupport.DecodeResponse(target, res); err != nil {
  3529. return nil, err
  3530. }
  3531. return ret, nil
  3532. // {
  3533. // "description": "Cancels and removes the preview currently associated with the deployment.",
  3534. // "httpMethod": "POST",
  3535. // "id": "deploymentmanager.deployments.cancelPreview",
  3536. // "parameterOrder": [
  3537. // "project",
  3538. // "deployment"
  3539. // ],
  3540. // "parameters": {
  3541. // "deployment": {
  3542. // "description": "The name of the deployment for this request.",
  3543. // "location": "path",
  3544. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  3545. // "required": true,
  3546. // "type": "string"
  3547. // },
  3548. // "project": {
  3549. // "description": "The project ID for this request.",
  3550. // "location": "path",
  3551. // "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])?))",
  3552. // "required": true,
  3553. // "type": "string"
  3554. // }
  3555. // },
  3556. // "path": "{project}/global/deployments/{deployment}/cancelPreview",
  3557. // "request": {
  3558. // "$ref": "DeploymentsCancelPreviewRequest"
  3559. // },
  3560. // "response": {
  3561. // "$ref": "Operation"
  3562. // },
  3563. // "scopes": [
  3564. // "https://www.googleapis.com/auth/cloud-platform",
  3565. // "https://www.googleapis.com/auth/ndev.cloudman"
  3566. // ]
  3567. // }
  3568. }
  3569. // method id "deploymentmanager.deployments.delete":
  3570. type DeploymentsDeleteCall struct {
  3571. s *Service
  3572. project string
  3573. deployment string
  3574. urlParams_ gensupport.URLParams
  3575. ctx_ context.Context
  3576. header_ http.Header
  3577. }
  3578. // Delete: Deletes a deployment and all of the resources in the
  3579. // deployment.
  3580. func (r *DeploymentsService) Delete(project string, deployment string) *DeploymentsDeleteCall {
  3581. c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3582. c.project = project
  3583. c.deployment = deployment
  3584. return c
  3585. }
  3586. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  3587. // policy to use for deleting resources.
  3588. //
  3589. // Possible values:
  3590. // "ABANDON"
  3591. // "DELETE" (default)
  3592. func (c *DeploymentsDeleteCall) DeletePolicy(deletePolicy string) *DeploymentsDeleteCall {
  3593. c.urlParams_.Set("deletePolicy", deletePolicy)
  3594. return c
  3595. }
  3596. // Fields allows partial responses to be retrieved. See
  3597. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3598. // for more information.
  3599. func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall {
  3600. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3601. return c
  3602. }
  3603. // Context sets the context to be used in this call's Do method. Any
  3604. // pending HTTP request will be aborted if the provided context is
  3605. // canceled.
  3606. func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
  3607. c.ctx_ = ctx
  3608. return c
  3609. }
  3610. // Header returns an http.Header that can be modified by the caller to
  3611. // add HTTP headers to the request.
  3612. func (c *DeploymentsDeleteCall) Header() http.Header {
  3613. if c.header_ == nil {
  3614. c.header_ = make(http.Header)
  3615. }
  3616. return c.header_
  3617. }
  3618. func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3619. reqHeaders := make(http.Header)
  3620. for k, v := range c.header_ {
  3621. reqHeaders[k] = v
  3622. }
  3623. reqHeaders.Set("User-Agent", c.s.userAgent())
  3624. var body io.Reader = nil
  3625. c.urlParams_.Set("alt", alt)
  3626. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  3627. urls += "?" + c.urlParams_.Encode()
  3628. req, _ := http.NewRequest("DELETE", urls, body)
  3629. req.Header = reqHeaders
  3630. googleapi.Expand(req.URL, map[string]string{
  3631. "project": c.project,
  3632. "deployment": c.deployment,
  3633. })
  3634. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3635. }
  3636. // Do executes the "deploymentmanager.deployments.delete" call.
  3637. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3638. // status code is an error. Response headers are in either
  3639. // *Operation.ServerResponse.Header or (if a response was returned at
  3640. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3641. // to check whether the returned error was because
  3642. // http.StatusNotModified was returned.
  3643. func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3644. gensupport.SetOptions(c.urlParams_, opts...)
  3645. res, err := c.doRequest("json")
  3646. if res != nil && res.StatusCode == http.StatusNotModified {
  3647. if res.Body != nil {
  3648. res.Body.Close()
  3649. }
  3650. return nil, &googleapi.Error{
  3651. Code: res.StatusCode,
  3652. Header: res.Header,
  3653. }
  3654. }
  3655. if err != nil {
  3656. return nil, err
  3657. }
  3658. defer googleapi.CloseBody(res)
  3659. if err := googleapi.CheckResponse(res); err != nil {
  3660. return nil, err
  3661. }
  3662. ret := &Operation{
  3663. ServerResponse: googleapi.ServerResponse{
  3664. Header: res.Header,
  3665. HTTPStatusCode: res.StatusCode,
  3666. },
  3667. }
  3668. target := &ret
  3669. if err := gensupport.DecodeResponse(target, res); err != nil {
  3670. return nil, err
  3671. }
  3672. return ret, nil
  3673. // {
  3674. // "description": "Deletes a deployment and all of the resources in the deployment.",
  3675. // "httpMethod": "DELETE",
  3676. // "id": "deploymentmanager.deployments.delete",
  3677. // "parameterOrder": [
  3678. // "project",
  3679. // "deployment"
  3680. // ],
  3681. // "parameters": {
  3682. // "deletePolicy": {
  3683. // "default": "DELETE",
  3684. // "description": "Sets the policy to use for deleting resources.",
  3685. // "enum": [
  3686. // "ABANDON",
  3687. // "DELETE"
  3688. // ],
  3689. // "enumDescriptions": [
  3690. // "",
  3691. // ""
  3692. // ],
  3693. // "location": "query",
  3694. // "type": "string"
  3695. // },
  3696. // "deployment": {
  3697. // "description": "The name of the deployment for this request.",
  3698. // "location": "path",
  3699. // "required": true,
  3700. // "type": "string"
  3701. // },
  3702. // "project": {
  3703. // "description": "The project ID for this request.",
  3704. // "location": "path",
  3705. // "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])?))",
  3706. // "required": true,
  3707. // "type": "string"
  3708. // }
  3709. // },
  3710. // "path": "{project}/global/deployments/{deployment}",
  3711. // "response": {
  3712. // "$ref": "Operation"
  3713. // },
  3714. // "scopes": [
  3715. // "https://www.googleapis.com/auth/cloud-platform",
  3716. // "https://www.googleapis.com/auth/ndev.cloudman"
  3717. // ]
  3718. // }
  3719. }
  3720. // method id "deploymentmanager.deployments.get":
  3721. type DeploymentsGetCall struct {
  3722. s *Service
  3723. project string
  3724. deployment string
  3725. urlParams_ gensupport.URLParams
  3726. ifNoneMatch_ string
  3727. ctx_ context.Context
  3728. header_ http.Header
  3729. }
  3730. // Get: Gets information about a specific deployment.
  3731. func (r *DeploymentsService) Get(project string, deployment string) *DeploymentsGetCall {
  3732. c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3733. c.project = project
  3734. c.deployment = deployment
  3735. return c
  3736. }
  3737. // Fields allows partial responses to be retrieved. See
  3738. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3739. // for more information.
  3740. func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall {
  3741. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3742. return c
  3743. }
  3744. // IfNoneMatch sets the optional parameter which makes the operation
  3745. // fail if the object's ETag matches the given value. This is useful for
  3746. // getting updates only after the object has changed since the last
  3747. // request. Use googleapi.IsNotModified to check whether the response
  3748. // error from Do is the result of In-None-Match.
  3749. func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall {
  3750. c.ifNoneMatch_ = entityTag
  3751. return c
  3752. }
  3753. // Context sets the context to be used in this call's Do method. Any
  3754. // pending HTTP request will be aborted if the provided context is
  3755. // canceled.
  3756. func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
  3757. c.ctx_ = ctx
  3758. return c
  3759. }
  3760. // Header returns an http.Header that can be modified by the caller to
  3761. // add HTTP headers to the request.
  3762. func (c *DeploymentsGetCall) Header() http.Header {
  3763. if c.header_ == nil {
  3764. c.header_ = make(http.Header)
  3765. }
  3766. return c.header_
  3767. }
  3768. func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  3769. reqHeaders := make(http.Header)
  3770. for k, v := range c.header_ {
  3771. reqHeaders[k] = v
  3772. }
  3773. reqHeaders.Set("User-Agent", c.s.userAgent())
  3774. if c.ifNoneMatch_ != "" {
  3775. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3776. }
  3777. var body io.Reader = nil
  3778. c.urlParams_.Set("alt", alt)
  3779. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  3780. urls += "?" + c.urlParams_.Encode()
  3781. req, _ := http.NewRequest("GET", urls, body)
  3782. req.Header = reqHeaders
  3783. googleapi.Expand(req.URL, map[string]string{
  3784. "project": c.project,
  3785. "deployment": c.deployment,
  3786. })
  3787. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3788. }
  3789. // Do executes the "deploymentmanager.deployments.get" call.
  3790. // Exactly one of *Deployment or error will be non-nil. Any non-2xx
  3791. // status code is an error. Response headers are in either
  3792. // *Deployment.ServerResponse.Header or (if a response was returned at
  3793. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3794. // to check whether the returned error was because
  3795. // http.StatusNotModified was returned.
  3796. func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
  3797. gensupport.SetOptions(c.urlParams_, opts...)
  3798. res, err := c.doRequest("json")
  3799. if res != nil && res.StatusCode == http.StatusNotModified {
  3800. if res.Body != nil {
  3801. res.Body.Close()
  3802. }
  3803. return nil, &googleapi.Error{
  3804. Code: res.StatusCode,
  3805. Header: res.Header,
  3806. }
  3807. }
  3808. if err != nil {
  3809. return nil, err
  3810. }
  3811. defer googleapi.CloseBody(res)
  3812. if err := googleapi.CheckResponse(res); err != nil {
  3813. return nil, err
  3814. }
  3815. ret := &Deployment{
  3816. ServerResponse: googleapi.ServerResponse{
  3817. Header: res.Header,
  3818. HTTPStatusCode: res.StatusCode,
  3819. },
  3820. }
  3821. target := &ret
  3822. if err := gensupport.DecodeResponse(target, res); err != nil {
  3823. return nil, err
  3824. }
  3825. return ret, nil
  3826. // {
  3827. // "description": "Gets information about a specific deployment.",
  3828. // "httpMethod": "GET",
  3829. // "id": "deploymentmanager.deployments.get",
  3830. // "parameterOrder": [
  3831. // "project",
  3832. // "deployment"
  3833. // ],
  3834. // "parameters": {
  3835. // "deployment": {
  3836. // "description": "The name of the deployment for this request.",
  3837. // "location": "path",
  3838. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  3839. // "required": true,
  3840. // "type": "string"
  3841. // },
  3842. // "project": {
  3843. // "description": "The project ID for this request.",
  3844. // "location": "path",
  3845. // "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])?))",
  3846. // "required": true,
  3847. // "type": "string"
  3848. // }
  3849. // },
  3850. // "path": "{project}/global/deployments/{deployment}",
  3851. // "response": {
  3852. // "$ref": "Deployment"
  3853. // },
  3854. // "scopes": [
  3855. // "https://www.googleapis.com/auth/cloud-platform",
  3856. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  3857. // "https://www.googleapis.com/auth/ndev.cloudman",
  3858. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  3859. // ]
  3860. // }
  3861. }
  3862. // method id "deploymentmanager.deployments.getIamPolicy":
  3863. type DeploymentsGetIamPolicyCall struct {
  3864. s *Service
  3865. project string
  3866. resource string
  3867. urlParams_ gensupport.URLParams
  3868. ifNoneMatch_ string
  3869. ctx_ context.Context
  3870. header_ http.Header
  3871. }
  3872. // GetIamPolicy: Gets the access control policy for a resource. May be
  3873. // empty if no such policy or resource exists.
  3874. func (r *DeploymentsService) GetIamPolicy(project string, resource string) *DeploymentsGetIamPolicyCall {
  3875. c := &DeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3876. c.project = project
  3877. c.resource = resource
  3878. return c
  3879. }
  3880. // Fields allows partial responses to be retrieved. See
  3881. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3882. // for more information.
  3883. func (c *DeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsGetIamPolicyCall {
  3884. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3885. return c
  3886. }
  3887. // IfNoneMatch sets the optional parameter which makes the operation
  3888. // fail if the object's ETag matches the given value. This is useful for
  3889. // getting updates only after the object has changed since the last
  3890. // request. Use googleapi.IsNotModified to check whether the response
  3891. // error from Do is the result of In-None-Match.
  3892. func (c *DeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *DeploymentsGetIamPolicyCall {
  3893. c.ifNoneMatch_ = entityTag
  3894. return c
  3895. }
  3896. // Context sets the context to be used in this call's Do method. Any
  3897. // pending HTTP request will be aborted if the provided context is
  3898. // canceled.
  3899. func (c *DeploymentsGetIamPolicyCall) Context(ctx context.Context) *DeploymentsGetIamPolicyCall {
  3900. c.ctx_ = ctx
  3901. return c
  3902. }
  3903. // Header returns an http.Header that can be modified by the caller to
  3904. // add HTTP headers to the request.
  3905. func (c *DeploymentsGetIamPolicyCall) Header() http.Header {
  3906. if c.header_ == nil {
  3907. c.header_ = make(http.Header)
  3908. }
  3909. return c.header_
  3910. }
  3911. func (c *DeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3912. reqHeaders := make(http.Header)
  3913. for k, v := range c.header_ {
  3914. reqHeaders[k] = v
  3915. }
  3916. reqHeaders.Set("User-Agent", c.s.userAgent())
  3917. if c.ifNoneMatch_ != "" {
  3918. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3919. }
  3920. var body io.Reader = nil
  3921. c.urlParams_.Set("alt", alt)
  3922. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/getIamPolicy")
  3923. urls += "?" + c.urlParams_.Encode()
  3924. req, _ := http.NewRequest("GET", urls, body)
  3925. req.Header = reqHeaders
  3926. googleapi.Expand(req.URL, map[string]string{
  3927. "project": c.project,
  3928. "resource": c.resource,
  3929. })
  3930. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3931. }
  3932. // Do executes the "deploymentmanager.deployments.getIamPolicy" call.
  3933. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  3934. // code is an error. Response headers are in either
  3935. // *Policy.ServerResponse.Header or (if a response was returned at all)
  3936. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3937. // check whether the returned error was because http.StatusNotModified
  3938. // was returned.
  3939. func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3940. gensupport.SetOptions(c.urlParams_, opts...)
  3941. res, err := c.doRequest("json")
  3942. if res != nil && res.StatusCode == http.StatusNotModified {
  3943. if res.Body != nil {
  3944. res.Body.Close()
  3945. }
  3946. return nil, &googleapi.Error{
  3947. Code: res.StatusCode,
  3948. Header: res.Header,
  3949. }
  3950. }
  3951. if err != nil {
  3952. return nil, err
  3953. }
  3954. defer googleapi.CloseBody(res)
  3955. if err := googleapi.CheckResponse(res); err != nil {
  3956. return nil, err
  3957. }
  3958. ret := &Policy{
  3959. ServerResponse: googleapi.ServerResponse{
  3960. Header: res.Header,
  3961. HTTPStatusCode: res.StatusCode,
  3962. },
  3963. }
  3964. target := &ret
  3965. if err := gensupport.DecodeResponse(target, res); err != nil {
  3966. return nil, err
  3967. }
  3968. return ret, nil
  3969. // {
  3970. // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
  3971. // "httpMethod": "GET",
  3972. // "id": "deploymentmanager.deployments.getIamPolicy",
  3973. // "parameterOrder": [
  3974. // "project",
  3975. // "resource"
  3976. // ],
  3977. // "parameters": {
  3978. // "project": {
  3979. // "description": "Project ID for this request.",
  3980. // "location": "path",
  3981. // "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])?))",
  3982. // "required": true,
  3983. // "type": "string"
  3984. // },
  3985. // "resource": {
  3986. // "description": "Name of the resource for this request.",
  3987. // "location": "path",
  3988. // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
  3989. // "required": true,
  3990. // "type": "string"
  3991. // }
  3992. // },
  3993. // "path": "{project}/global/deployments/{resource}/getIamPolicy",
  3994. // "response": {
  3995. // "$ref": "Policy"
  3996. // },
  3997. // "scopes": [
  3998. // "https://www.googleapis.com/auth/cloud-platform",
  3999. // "https://www.googleapis.com/auth/ndev.cloudman"
  4000. // ]
  4001. // }
  4002. }
  4003. // method id "deploymentmanager.deployments.insert":
  4004. type DeploymentsInsertCall struct {
  4005. s *Service
  4006. project string
  4007. deployment *Deployment
  4008. urlParams_ gensupport.URLParams
  4009. ctx_ context.Context
  4010. header_ http.Header
  4011. }
  4012. // Insert: Creates a deployment and all of the resources described by
  4013. // the deployment manifest.
  4014. func (r *DeploymentsService) Insert(project string, deployment *Deployment) *DeploymentsInsertCall {
  4015. c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4016. c.project = project
  4017. c.deployment = deployment
  4018. return c
  4019. }
  4020. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  4021. // policy to use for creating new resources.
  4022. //
  4023. // Possible values:
  4024. // "ACQUIRE"
  4025. // "CREATE"
  4026. // "CREATE_OR_ACQUIRE" (default)
  4027. func (c *DeploymentsInsertCall) CreatePolicy(createPolicy string) *DeploymentsInsertCall {
  4028. c.urlParams_.Set("createPolicy", createPolicy)
  4029. return c
  4030. }
  4031. // Preview sets the optional parameter "preview": If set to true,
  4032. // creates a deployment and creates "shell" resources but does not
  4033. // actually instantiate these resources. This allows you to preview what
  4034. // your deployment looks like. After previewing a deployment, you can
  4035. // deploy your resources by making a request with the update() method or
  4036. // you can use the cancelPreview() method to cancel the preview
  4037. // altogether. Note that the deployment will still exist after you
  4038. // cancel the preview and you must separately delete this deployment if
  4039. // you want to remove it.
  4040. func (c *DeploymentsInsertCall) Preview(preview bool) *DeploymentsInsertCall {
  4041. c.urlParams_.Set("preview", fmt.Sprint(preview))
  4042. return c
  4043. }
  4044. // Fields allows partial responses to be retrieved. See
  4045. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4046. // for more information.
  4047. func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall {
  4048. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4049. return c
  4050. }
  4051. // Context sets the context to be used in this call's Do method. Any
  4052. // pending HTTP request will be aborted if the provided context is
  4053. // canceled.
  4054. func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
  4055. c.ctx_ = ctx
  4056. return c
  4057. }
  4058. // Header returns an http.Header that can be modified by the caller to
  4059. // add HTTP headers to the request.
  4060. func (c *DeploymentsInsertCall) Header() http.Header {
  4061. if c.header_ == nil {
  4062. c.header_ = make(http.Header)
  4063. }
  4064. return c.header_
  4065. }
  4066. func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
  4067. reqHeaders := make(http.Header)
  4068. for k, v := range c.header_ {
  4069. reqHeaders[k] = v
  4070. }
  4071. reqHeaders.Set("User-Agent", c.s.userAgent())
  4072. var body io.Reader = nil
  4073. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
  4074. if err != nil {
  4075. return nil, err
  4076. }
  4077. reqHeaders.Set("Content-Type", "application/json")
  4078. c.urlParams_.Set("alt", alt)
  4079. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
  4080. urls += "?" + c.urlParams_.Encode()
  4081. req, _ := http.NewRequest("POST", urls, body)
  4082. req.Header = reqHeaders
  4083. googleapi.Expand(req.URL, map[string]string{
  4084. "project": c.project,
  4085. })
  4086. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4087. }
  4088. // Do executes the "deploymentmanager.deployments.insert" call.
  4089. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4090. // status code is an error. Response headers are in either
  4091. // *Operation.ServerResponse.Header or (if a response was returned at
  4092. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4093. // to check whether the returned error was because
  4094. // http.StatusNotModified was returned.
  4095. func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4096. gensupport.SetOptions(c.urlParams_, opts...)
  4097. res, err := c.doRequest("json")
  4098. if res != nil && res.StatusCode == http.StatusNotModified {
  4099. if res.Body != nil {
  4100. res.Body.Close()
  4101. }
  4102. return nil, &googleapi.Error{
  4103. Code: res.StatusCode,
  4104. Header: res.Header,
  4105. }
  4106. }
  4107. if err != nil {
  4108. return nil, err
  4109. }
  4110. defer googleapi.CloseBody(res)
  4111. if err := googleapi.CheckResponse(res); err != nil {
  4112. return nil, err
  4113. }
  4114. ret := &Operation{
  4115. ServerResponse: googleapi.ServerResponse{
  4116. Header: res.Header,
  4117. HTTPStatusCode: res.StatusCode,
  4118. },
  4119. }
  4120. target := &ret
  4121. if err := gensupport.DecodeResponse(target, res); err != nil {
  4122. return nil, err
  4123. }
  4124. return ret, nil
  4125. // {
  4126. // "description": "Creates a deployment and all of the resources described by the deployment manifest.",
  4127. // "httpMethod": "POST",
  4128. // "id": "deploymentmanager.deployments.insert",
  4129. // "parameterOrder": [
  4130. // "project"
  4131. // ],
  4132. // "parameters": {
  4133. // "createPolicy": {
  4134. // "default": "CREATE_OR_ACQUIRE",
  4135. // "description": "Sets the policy to use for creating new resources.",
  4136. // "enum": [
  4137. // "ACQUIRE",
  4138. // "CREATE",
  4139. // "CREATE_OR_ACQUIRE"
  4140. // ],
  4141. // "enumDescriptions": [
  4142. // "",
  4143. // "",
  4144. // ""
  4145. // ],
  4146. // "location": "query",
  4147. // "type": "string"
  4148. // },
  4149. // "preview": {
  4150. // "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.",
  4151. // "location": "query",
  4152. // "type": "boolean"
  4153. // },
  4154. // "project": {
  4155. // "description": "The project ID for this request.",
  4156. // "location": "path",
  4157. // "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])?))",
  4158. // "required": true,
  4159. // "type": "string"
  4160. // }
  4161. // },
  4162. // "path": "{project}/global/deployments",
  4163. // "request": {
  4164. // "$ref": "Deployment"
  4165. // },
  4166. // "response": {
  4167. // "$ref": "Operation"
  4168. // },
  4169. // "scopes": [
  4170. // "https://www.googleapis.com/auth/cloud-platform",
  4171. // "https://www.googleapis.com/auth/ndev.cloudman"
  4172. // ]
  4173. // }
  4174. }
  4175. // method id "deploymentmanager.deployments.list":
  4176. type DeploymentsListCall struct {
  4177. s *Service
  4178. project string
  4179. urlParams_ gensupport.URLParams
  4180. ifNoneMatch_ string
  4181. ctx_ context.Context
  4182. header_ http.Header
  4183. }
  4184. // List: Lists all deployments for a given project.
  4185. func (r *DeploymentsService) List(project string) *DeploymentsListCall {
  4186. c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4187. c.project = project
  4188. return c
  4189. }
  4190. // Filter sets the optional parameter "filter": A filter expression that
  4191. // filters resources listed in the response. The expression must specify
  4192. // the field name, a comparison operator, and the value that you want to
  4193. // use for filtering. The value must be a string, a number, or a
  4194. // boolean. The comparison operator must be either =, !=, >, or <.
  4195. //
  4196. // For example, if you are filtering Compute Engine instances, you can
  4197. // exclude instances named example-instance by specifying name !=
  4198. // example-instance.
  4199. //
  4200. // You can also filter nested fields. For example, you could specify
  4201. // scheduling.automaticRestart = false to include instances only if they
  4202. // are not scheduled for automatic restarts. You can use filtering on
  4203. // nested fields to filter based on resource labels.
  4204. //
  4205. // To filter on multiple expressions, provide each separate expression
  4206. // within parentheses. For example, (scheduling.automaticRestart = true)
  4207. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  4208. // AND expression. However, you can include AND and OR expressions
  4209. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  4210. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  4211. // true).
  4212. func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall {
  4213. c.urlParams_.Set("filter", filter)
  4214. return c
  4215. }
  4216. // MaxResults sets the optional parameter "maxResults": The maximum
  4217. // number of results per page that should be returned. If the number of
  4218. // available results is larger than maxResults, Compute Engine returns a
  4219. // nextPageToken that can be used to get the next page of results in
  4220. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  4221. // (Default: 500)
  4222. func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall {
  4223. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4224. return c
  4225. }
  4226. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  4227. // a certain order. By default, results are returned in alphanumerical
  4228. // order based on the resource name.
  4229. //
  4230. // You can also sort results in descending order based on the creation
  4231. // timestamp using orderBy="creationTimestamp desc". This sorts results
  4232. // based on the creationTimestamp field in reverse chronological order
  4233. // (newest result first). Use this to sort resources like operations so
  4234. // that the newest operation is returned first.
  4235. //
  4236. // Currently, only sorting by name or creationTimestamp desc is
  4237. // supported.
  4238. func (c *DeploymentsListCall) OrderBy(orderBy string) *DeploymentsListCall {
  4239. c.urlParams_.Set("orderBy", orderBy)
  4240. return c
  4241. }
  4242. // PageToken sets the optional parameter "pageToken": Specifies a page
  4243. // token to use. Set pageToken to the nextPageToken returned by a
  4244. // previous list request to get the next page of results.
  4245. func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall {
  4246. c.urlParams_.Set("pageToken", pageToken)
  4247. return c
  4248. }
  4249. // Fields allows partial responses to be retrieved. See
  4250. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4251. // for more information.
  4252. func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall {
  4253. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4254. return c
  4255. }
  4256. // IfNoneMatch sets the optional parameter which makes the operation
  4257. // fail if the object's ETag matches the given value. This is useful for
  4258. // getting updates only after the object has changed since the last
  4259. // request. Use googleapi.IsNotModified to check whether the response
  4260. // error from Do is the result of In-None-Match.
  4261. func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall {
  4262. c.ifNoneMatch_ = entityTag
  4263. return c
  4264. }
  4265. // Context sets the context to be used in this call's Do method. Any
  4266. // pending HTTP request will be aborted if the provided context is
  4267. // canceled.
  4268. func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
  4269. c.ctx_ = ctx
  4270. return c
  4271. }
  4272. // Header returns an http.Header that can be modified by the caller to
  4273. // add HTTP headers to the request.
  4274. func (c *DeploymentsListCall) Header() http.Header {
  4275. if c.header_ == nil {
  4276. c.header_ = make(http.Header)
  4277. }
  4278. return c.header_
  4279. }
  4280. func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  4281. reqHeaders := make(http.Header)
  4282. for k, v := range c.header_ {
  4283. reqHeaders[k] = v
  4284. }
  4285. reqHeaders.Set("User-Agent", c.s.userAgent())
  4286. if c.ifNoneMatch_ != "" {
  4287. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4288. }
  4289. var body io.Reader = nil
  4290. c.urlParams_.Set("alt", alt)
  4291. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
  4292. urls += "?" + c.urlParams_.Encode()
  4293. req, _ := http.NewRequest("GET", urls, body)
  4294. req.Header = reqHeaders
  4295. googleapi.Expand(req.URL, map[string]string{
  4296. "project": c.project,
  4297. })
  4298. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4299. }
  4300. // Do executes the "deploymentmanager.deployments.list" call.
  4301. // Exactly one of *DeploymentsListResponse or error will be non-nil. Any
  4302. // non-2xx status code is an error. Response headers are in either
  4303. // *DeploymentsListResponse.ServerResponse.Header or (if a response was
  4304. // returned at all) in error.(*googleapi.Error).Header. Use
  4305. // googleapi.IsNotModified to check whether the returned error was
  4306. // because http.StatusNotModified was returned.
  4307. func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) {
  4308. gensupport.SetOptions(c.urlParams_, opts...)
  4309. res, err := c.doRequest("json")
  4310. if res != nil && res.StatusCode == http.StatusNotModified {
  4311. if res.Body != nil {
  4312. res.Body.Close()
  4313. }
  4314. return nil, &googleapi.Error{
  4315. Code: res.StatusCode,
  4316. Header: res.Header,
  4317. }
  4318. }
  4319. if err != nil {
  4320. return nil, err
  4321. }
  4322. defer googleapi.CloseBody(res)
  4323. if err := googleapi.CheckResponse(res); err != nil {
  4324. return nil, err
  4325. }
  4326. ret := &DeploymentsListResponse{
  4327. ServerResponse: googleapi.ServerResponse{
  4328. Header: res.Header,
  4329. HTTPStatusCode: res.StatusCode,
  4330. },
  4331. }
  4332. target := &ret
  4333. if err := gensupport.DecodeResponse(target, res); err != nil {
  4334. return nil, err
  4335. }
  4336. return ret, nil
  4337. // {
  4338. // "description": "Lists all deployments for a given project.",
  4339. // "httpMethod": "GET",
  4340. // "id": "deploymentmanager.deployments.list",
  4341. // "parameterOrder": [
  4342. // "project"
  4343. // ],
  4344. // "parameters": {
  4345. // "filter": {
  4346. // "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).",
  4347. // "location": "query",
  4348. // "type": "string"
  4349. // },
  4350. // "maxResults": {
  4351. // "default": "500",
  4352. // "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)",
  4353. // "format": "uint32",
  4354. // "location": "query",
  4355. // "minimum": "0",
  4356. // "type": "integer"
  4357. // },
  4358. // "orderBy": {
  4359. // "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.",
  4360. // "location": "query",
  4361. // "type": "string"
  4362. // },
  4363. // "pageToken": {
  4364. // "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.",
  4365. // "location": "query",
  4366. // "type": "string"
  4367. // },
  4368. // "project": {
  4369. // "description": "The project ID for this request.",
  4370. // "location": "path",
  4371. // "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])?))",
  4372. // "required": true,
  4373. // "type": "string"
  4374. // }
  4375. // },
  4376. // "path": "{project}/global/deployments",
  4377. // "response": {
  4378. // "$ref": "DeploymentsListResponse"
  4379. // },
  4380. // "scopes": [
  4381. // "https://www.googleapis.com/auth/cloud-platform",
  4382. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  4383. // "https://www.googleapis.com/auth/ndev.cloudman",
  4384. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  4385. // ]
  4386. // }
  4387. }
  4388. // Pages invokes f for each page of results.
  4389. // A non-nil error returned from f will halt the iteration.
  4390. // The provided context supersedes any context provided to the Context method.
  4391. func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error {
  4392. c.ctx_ = ctx
  4393. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4394. for {
  4395. x, err := c.Do()
  4396. if err != nil {
  4397. return err
  4398. }
  4399. if err := f(x); err != nil {
  4400. return err
  4401. }
  4402. if x.NextPageToken == "" {
  4403. return nil
  4404. }
  4405. c.PageToken(x.NextPageToken)
  4406. }
  4407. }
  4408. // method id "deploymentmanager.deployments.patch":
  4409. type DeploymentsPatchCall struct {
  4410. s *Service
  4411. project string
  4412. deployment string
  4413. deployment2 *Deployment
  4414. urlParams_ gensupport.URLParams
  4415. ctx_ context.Context
  4416. header_ http.Header
  4417. }
  4418. // Patch: Updates a deployment and all of the resources described by the
  4419. // deployment manifest. This method supports patch semantics.
  4420. func (r *DeploymentsService) Patch(project string, deployment string, deployment2 *Deployment) *DeploymentsPatchCall {
  4421. c := &DeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4422. c.project = project
  4423. c.deployment = deployment
  4424. c.deployment2 = deployment2
  4425. return c
  4426. }
  4427. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  4428. // policy to use for creating new resources.
  4429. //
  4430. // Possible values:
  4431. // "ACQUIRE"
  4432. // "CREATE"
  4433. // "CREATE_OR_ACQUIRE" (default)
  4434. func (c *DeploymentsPatchCall) CreatePolicy(createPolicy string) *DeploymentsPatchCall {
  4435. c.urlParams_.Set("createPolicy", createPolicy)
  4436. return c
  4437. }
  4438. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  4439. // policy to use for deleting resources.
  4440. //
  4441. // Possible values:
  4442. // "ABANDON"
  4443. // "DELETE" (default)
  4444. func (c *DeploymentsPatchCall) DeletePolicy(deletePolicy string) *DeploymentsPatchCall {
  4445. c.urlParams_.Set("deletePolicy", deletePolicy)
  4446. return c
  4447. }
  4448. // Preview sets the optional parameter "preview": If set to true,
  4449. // updates the deployment and creates and updates the "shell" resources
  4450. // but does not actually alter or instantiate these resources. This
  4451. // allows you to preview what your deployment will look like. You can
  4452. // use this intent to preview how an update would affect your
  4453. // deployment. You must provide a target.config with a configuration if
  4454. // this is set to true. After previewing a deployment, you can deploy
  4455. // your resources by making a request with the update() or you can
  4456. // cancelPreview() to remove the preview altogether. Note that the
  4457. // deployment will still exist after you cancel the preview and you must
  4458. // separately delete this deployment if you want to remove it.
  4459. func (c *DeploymentsPatchCall) Preview(preview bool) *DeploymentsPatchCall {
  4460. c.urlParams_.Set("preview", fmt.Sprint(preview))
  4461. return c
  4462. }
  4463. // Fields allows partial responses to be retrieved. See
  4464. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4465. // for more information.
  4466. func (c *DeploymentsPatchCall) Fields(s ...googleapi.Field) *DeploymentsPatchCall {
  4467. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4468. return c
  4469. }
  4470. // Context sets the context to be used in this call's Do method. Any
  4471. // pending HTTP request will be aborted if the provided context is
  4472. // canceled.
  4473. func (c *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall {
  4474. c.ctx_ = ctx
  4475. return c
  4476. }
  4477. // Header returns an http.Header that can be modified by the caller to
  4478. // add HTTP headers to the request.
  4479. func (c *DeploymentsPatchCall) Header() http.Header {
  4480. if c.header_ == nil {
  4481. c.header_ = make(http.Header)
  4482. }
  4483. return c.header_
  4484. }
  4485. func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
  4486. reqHeaders := make(http.Header)
  4487. for k, v := range c.header_ {
  4488. reqHeaders[k] = v
  4489. }
  4490. reqHeaders.Set("User-Agent", c.s.userAgent())
  4491. var body io.Reader = nil
  4492. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
  4493. if err != nil {
  4494. return nil, err
  4495. }
  4496. reqHeaders.Set("Content-Type", "application/json")
  4497. c.urlParams_.Set("alt", alt)
  4498. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  4499. urls += "?" + c.urlParams_.Encode()
  4500. req, _ := http.NewRequest("PATCH", urls, body)
  4501. req.Header = reqHeaders
  4502. googleapi.Expand(req.URL, map[string]string{
  4503. "project": c.project,
  4504. "deployment": c.deployment,
  4505. })
  4506. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4507. }
  4508. // Do executes the "deploymentmanager.deployments.patch" call.
  4509. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4510. // status code is an error. Response headers are in either
  4511. // *Operation.ServerResponse.Header or (if a response was returned at
  4512. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4513. // to check whether the returned error was because
  4514. // http.StatusNotModified was returned.
  4515. func (c *DeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4516. gensupport.SetOptions(c.urlParams_, opts...)
  4517. res, err := c.doRequest("json")
  4518. if res != nil && res.StatusCode == http.StatusNotModified {
  4519. if res.Body != nil {
  4520. res.Body.Close()
  4521. }
  4522. return nil, &googleapi.Error{
  4523. Code: res.StatusCode,
  4524. Header: res.Header,
  4525. }
  4526. }
  4527. if err != nil {
  4528. return nil, err
  4529. }
  4530. defer googleapi.CloseBody(res)
  4531. if err := googleapi.CheckResponse(res); err != nil {
  4532. return nil, err
  4533. }
  4534. ret := &Operation{
  4535. ServerResponse: googleapi.ServerResponse{
  4536. Header: res.Header,
  4537. HTTPStatusCode: res.StatusCode,
  4538. },
  4539. }
  4540. target := &ret
  4541. if err := gensupport.DecodeResponse(target, res); err != nil {
  4542. return nil, err
  4543. }
  4544. return ret, nil
  4545. // {
  4546. // "description": "Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.",
  4547. // "httpMethod": "PATCH",
  4548. // "id": "deploymentmanager.deployments.patch",
  4549. // "parameterOrder": [
  4550. // "project",
  4551. // "deployment"
  4552. // ],
  4553. // "parameters": {
  4554. // "createPolicy": {
  4555. // "default": "CREATE_OR_ACQUIRE",
  4556. // "description": "Sets the policy to use for creating new resources.",
  4557. // "enum": [
  4558. // "ACQUIRE",
  4559. // "CREATE",
  4560. // "CREATE_OR_ACQUIRE"
  4561. // ],
  4562. // "enumDescriptions": [
  4563. // "",
  4564. // "",
  4565. // ""
  4566. // ],
  4567. // "location": "query",
  4568. // "type": "string"
  4569. // },
  4570. // "deletePolicy": {
  4571. // "default": "DELETE",
  4572. // "description": "Sets the policy to use for deleting resources.",
  4573. // "enum": [
  4574. // "ABANDON",
  4575. // "DELETE"
  4576. // ],
  4577. // "enumDescriptions": [
  4578. // "",
  4579. // ""
  4580. // ],
  4581. // "location": "query",
  4582. // "type": "string"
  4583. // },
  4584. // "deployment": {
  4585. // "description": "The name of the deployment for this request.",
  4586. // "location": "path",
  4587. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  4588. // "required": true,
  4589. // "type": "string"
  4590. // },
  4591. // "preview": {
  4592. // "default": "false",
  4593. // "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.",
  4594. // "location": "query",
  4595. // "type": "boolean"
  4596. // },
  4597. // "project": {
  4598. // "description": "The project ID for this request.",
  4599. // "location": "path",
  4600. // "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])?))",
  4601. // "required": true,
  4602. // "type": "string"
  4603. // }
  4604. // },
  4605. // "path": "{project}/global/deployments/{deployment}",
  4606. // "request": {
  4607. // "$ref": "Deployment"
  4608. // },
  4609. // "response": {
  4610. // "$ref": "Operation"
  4611. // },
  4612. // "scopes": [
  4613. // "https://www.googleapis.com/auth/cloud-platform",
  4614. // "https://www.googleapis.com/auth/ndev.cloudman"
  4615. // ]
  4616. // }
  4617. }
  4618. // method id "deploymentmanager.deployments.setIamPolicy":
  4619. type DeploymentsSetIamPolicyCall struct {
  4620. s *Service
  4621. project string
  4622. resource string
  4623. globalsetpolicyrequest *GlobalSetPolicyRequest
  4624. urlParams_ gensupport.URLParams
  4625. ctx_ context.Context
  4626. header_ http.Header
  4627. }
  4628. // SetIamPolicy: Sets the access control policy on the specified
  4629. // resource. Replaces any existing policy.
  4630. func (r *DeploymentsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *DeploymentsSetIamPolicyCall {
  4631. c := &DeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4632. c.project = project
  4633. c.resource = resource
  4634. c.globalsetpolicyrequest = globalsetpolicyrequest
  4635. return c
  4636. }
  4637. // Fields allows partial responses to be retrieved. See
  4638. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4639. // for more information.
  4640. func (c *DeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsSetIamPolicyCall {
  4641. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4642. return c
  4643. }
  4644. // Context sets the context to be used in this call's Do method. Any
  4645. // pending HTTP request will be aborted if the provided context is
  4646. // canceled.
  4647. func (c *DeploymentsSetIamPolicyCall) Context(ctx context.Context) *DeploymentsSetIamPolicyCall {
  4648. c.ctx_ = ctx
  4649. return c
  4650. }
  4651. // Header returns an http.Header that can be modified by the caller to
  4652. // add HTTP headers to the request.
  4653. func (c *DeploymentsSetIamPolicyCall) Header() http.Header {
  4654. if c.header_ == nil {
  4655. c.header_ = make(http.Header)
  4656. }
  4657. return c.header_
  4658. }
  4659. func (c *DeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4660. reqHeaders := make(http.Header)
  4661. for k, v := range c.header_ {
  4662. reqHeaders[k] = v
  4663. }
  4664. reqHeaders.Set("User-Agent", c.s.userAgent())
  4665. var body io.Reader = nil
  4666. body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
  4667. if err != nil {
  4668. return nil, err
  4669. }
  4670. reqHeaders.Set("Content-Type", "application/json")
  4671. c.urlParams_.Set("alt", alt)
  4672. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/setIamPolicy")
  4673. urls += "?" + c.urlParams_.Encode()
  4674. req, _ := http.NewRequest("POST", urls, body)
  4675. req.Header = reqHeaders
  4676. googleapi.Expand(req.URL, map[string]string{
  4677. "project": c.project,
  4678. "resource": c.resource,
  4679. })
  4680. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4681. }
  4682. // Do executes the "deploymentmanager.deployments.setIamPolicy" call.
  4683. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4684. // code is an error. Response headers are in either
  4685. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4686. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4687. // check whether the returned error was because http.StatusNotModified
  4688. // was returned.
  4689. func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4690. gensupport.SetOptions(c.urlParams_, opts...)
  4691. res, err := c.doRequest("json")
  4692. if res != nil && res.StatusCode == http.StatusNotModified {
  4693. if res.Body != nil {
  4694. res.Body.Close()
  4695. }
  4696. return nil, &googleapi.Error{
  4697. Code: res.StatusCode,
  4698. Header: res.Header,
  4699. }
  4700. }
  4701. if err != nil {
  4702. return nil, err
  4703. }
  4704. defer googleapi.CloseBody(res)
  4705. if err := googleapi.CheckResponse(res); err != nil {
  4706. return nil, err
  4707. }
  4708. ret := &Policy{
  4709. ServerResponse: googleapi.ServerResponse{
  4710. Header: res.Header,
  4711. HTTPStatusCode: res.StatusCode,
  4712. },
  4713. }
  4714. target := &ret
  4715. if err := gensupport.DecodeResponse(target, res); err != nil {
  4716. return nil, err
  4717. }
  4718. return ret, nil
  4719. // {
  4720. // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
  4721. // "httpMethod": "POST",
  4722. // "id": "deploymentmanager.deployments.setIamPolicy",
  4723. // "parameterOrder": [
  4724. // "project",
  4725. // "resource"
  4726. // ],
  4727. // "parameters": {
  4728. // "project": {
  4729. // "description": "Project ID for this request.",
  4730. // "location": "path",
  4731. // "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])?))",
  4732. // "required": true,
  4733. // "type": "string"
  4734. // },
  4735. // "resource": {
  4736. // "description": "Name of the resource for this request.",
  4737. // "location": "path",
  4738. // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
  4739. // "required": true,
  4740. // "type": "string"
  4741. // }
  4742. // },
  4743. // "path": "{project}/global/deployments/{resource}/setIamPolicy",
  4744. // "request": {
  4745. // "$ref": "GlobalSetPolicyRequest"
  4746. // },
  4747. // "response": {
  4748. // "$ref": "Policy"
  4749. // },
  4750. // "scopes": [
  4751. // "https://www.googleapis.com/auth/cloud-platform",
  4752. // "https://www.googleapis.com/auth/ndev.cloudman"
  4753. // ]
  4754. // }
  4755. }
  4756. // method id "deploymentmanager.deployments.stop":
  4757. type DeploymentsStopCall struct {
  4758. s *Service
  4759. project string
  4760. deployment string
  4761. deploymentsstoprequest *DeploymentsStopRequest
  4762. urlParams_ gensupport.URLParams
  4763. ctx_ context.Context
  4764. header_ http.Header
  4765. }
  4766. // Stop: Stops an ongoing operation. This does not roll back any work
  4767. // that has already been completed, but prevents any new work from being
  4768. // started.
  4769. func (r *DeploymentsService) Stop(project string, deployment string, deploymentsstoprequest *DeploymentsStopRequest) *DeploymentsStopCall {
  4770. c := &DeploymentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4771. c.project = project
  4772. c.deployment = deployment
  4773. c.deploymentsstoprequest = deploymentsstoprequest
  4774. return c
  4775. }
  4776. // Fields allows partial responses to be retrieved. See
  4777. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4778. // for more information.
  4779. func (c *DeploymentsStopCall) Fields(s ...googleapi.Field) *DeploymentsStopCall {
  4780. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4781. return c
  4782. }
  4783. // Context sets the context to be used in this call's Do method. Any
  4784. // pending HTTP request will be aborted if the provided context is
  4785. // canceled.
  4786. func (c *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall {
  4787. c.ctx_ = ctx
  4788. return c
  4789. }
  4790. // Header returns an http.Header that can be modified by the caller to
  4791. // add HTTP headers to the request.
  4792. func (c *DeploymentsStopCall) Header() http.Header {
  4793. if c.header_ == nil {
  4794. c.header_ = make(http.Header)
  4795. }
  4796. return c.header_
  4797. }
  4798. func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) {
  4799. reqHeaders := make(http.Header)
  4800. for k, v := range c.header_ {
  4801. reqHeaders[k] = v
  4802. }
  4803. reqHeaders.Set("User-Agent", c.s.userAgent())
  4804. var body io.Reader = nil
  4805. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest)
  4806. if err != nil {
  4807. return nil, err
  4808. }
  4809. reqHeaders.Set("Content-Type", "application/json")
  4810. c.urlParams_.Set("alt", alt)
  4811. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/stop")
  4812. urls += "?" + c.urlParams_.Encode()
  4813. req, _ := http.NewRequest("POST", urls, body)
  4814. req.Header = reqHeaders
  4815. googleapi.Expand(req.URL, map[string]string{
  4816. "project": c.project,
  4817. "deployment": c.deployment,
  4818. })
  4819. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4820. }
  4821. // Do executes the "deploymentmanager.deployments.stop" call.
  4822. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4823. // status code is an error. Response headers are in either
  4824. // *Operation.ServerResponse.Header or (if a response was returned at
  4825. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4826. // to check whether the returned error was because
  4827. // http.StatusNotModified was returned.
  4828. func (c *DeploymentsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4829. gensupport.SetOptions(c.urlParams_, opts...)
  4830. res, err := c.doRequest("json")
  4831. if res != nil && res.StatusCode == http.StatusNotModified {
  4832. if res.Body != nil {
  4833. res.Body.Close()
  4834. }
  4835. return nil, &googleapi.Error{
  4836. Code: res.StatusCode,
  4837. Header: res.Header,
  4838. }
  4839. }
  4840. if err != nil {
  4841. return nil, err
  4842. }
  4843. defer googleapi.CloseBody(res)
  4844. if err := googleapi.CheckResponse(res); err != nil {
  4845. return nil, err
  4846. }
  4847. ret := &Operation{
  4848. ServerResponse: googleapi.ServerResponse{
  4849. Header: res.Header,
  4850. HTTPStatusCode: res.StatusCode,
  4851. },
  4852. }
  4853. target := &ret
  4854. if err := gensupport.DecodeResponse(target, res); err != nil {
  4855. return nil, err
  4856. }
  4857. return ret, nil
  4858. // {
  4859. // "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.",
  4860. // "httpMethod": "POST",
  4861. // "id": "deploymentmanager.deployments.stop",
  4862. // "parameterOrder": [
  4863. // "project",
  4864. // "deployment"
  4865. // ],
  4866. // "parameters": {
  4867. // "deployment": {
  4868. // "description": "The name of the deployment for this request.",
  4869. // "location": "path",
  4870. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  4871. // "required": true,
  4872. // "type": "string"
  4873. // },
  4874. // "project": {
  4875. // "description": "The project ID for this request.",
  4876. // "location": "path",
  4877. // "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])?))",
  4878. // "required": true,
  4879. // "type": "string"
  4880. // }
  4881. // },
  4882. // "path": "{project}/global/deployments/{deployment}/stop",
  4883. // "request": {
  4884. // "$ref": "DeploymentsStopRequest"
  4885. // },
  4886. // "response": {
  4887. // "$ref": "Operation"
  4888. // },
  4889. // "scopes": [
  4890. // "https://www.googleapis.com/auth/cloud-platform",
  4891. // "https://www.googleapis.com/auth/ndev.cloudman"
  4892. // ]
  4893. // }
  4894. }
  4895. // method id "deploymentmanager.deployments.testIamPermissions":
  4896. type DeploymentsTestIamPermissionsCall struct {
  4897. s *Service
  4898. project string
  4899. resource string
  4900. testpermissionsrequest *TestPermissionsRequest
  4901. urlParams_ gensupport.URLParams
  4902. ctx_ context.Context
  4903. header_ http.Header
  4904. }
  4905. // TestIamPermissions: Returns permissions that a caller has on the
  4906. // specified resource.
  4907. func (r *DeploymentsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *DeploymentsTestIamPermissionsCall {
  4908. c := &DeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4909. c.project = project
  4910. c.resource = resource
  4911. c.testpermissionsrequest = testpermissionsrequest
  4912. return c
  4913. }
  4914. // Fields allows partial responses to be retrieved. See
  4915. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4916. // for more information.
  4917. func (c *DeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DeploymentsTestIamPermissionsCall {
  4918. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4919. return c
  4920. }
  4921. // Context sets the context to be used in this call's Do method. Any
  4922. // pending HTTP request will be aborted if the provided context is
  4923. // canceled.
  4924. func (c *DeploymentsTestIamPermissionsCall) Context(ctx context.Context) *DeploymentsTestIamPermissionsCall {
  4925. c.ctx_ = ctx
  4926. return c
  4927. }
  4928. // Header returns an http.Header that can be modified by the caller to
  4929. // add HTTP headers to the request.
  4930. func (c *DeploymentsTestIamPermissionsCall) Header() http.Header {
  4931. if c.header_ == nil {
  4932. c.header_ = make(http.Header)
  4933. }
  4934. return c.header_
  4935. }
  4936. func (c *DeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4937. reqHeaders := make(http.Header)
  4938. for k, v := range c.header_ {
  4939. reqHeaders[k] = v
  4940. }
  4941. reqHeaders.Set("User-Agent", c.s.userAgent())
  4942. var body io.Reader = nil
  4943. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
  4944. if err != nil {
  4945. return nil, err
  4946. }
  4947. reqHeaders.Set("Content-Type", "application/json")
  4948. c.urlParams_.Set("alt", alt)
  4949. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/testIamPermissions")
  4950. urls += "?" + c.urlParams_.Encode()
  4951. req, _ := http.NewRequest("POST", urls, body)
  4952. req.Header = reqHeaders
  4953. googleapi.Expand(req.URL, map[string]string{
  4954. "project": c.project,
  4955. "resource": c.resource,
  4956. })
  4957. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4958. }
  4959. // Do executes the "deploymentmanager.deployments.testIamPermissions" call.
  4960. // Exactly one of *TestPermissionsResponse or error will be non-nil. Any
  4961. // non-2xx status code is an error. Response headers are in either
  4962. // *TestPermissionsResponse.ServerResponse.Header or (if a response was
  4963. // returned at all) in error.(*googleapi.Error).Header. Use
  4964. // googleapi.IsNotModified to check whether the returned error was
  4965. // because http.StatusNotModified was returned.
  4966. func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
  4967. gensupport.SetOptions(c.urlParams_, opts...)
  4968. res, err := c.doRequest("json")
  4969. if res != nil && res.StatusCode == http.StatusNotModified {
  4970. if res.Body != nil {
  4971. res.Body.Close()
  4972. }
  4973. return nil, &googleapi.Error{
  4974. Code: res.StatusCode,
  4975. Header: res.Header,
  4976. }
  4977. }
  4978. if err != nil {
  4979. return nil, err
  4980. }
  4981. defer googleapi.CloseBody(res)
  4982. if err := googleapi.CheckResponse(res); err != nil {
  4983. return nil, err
  4984. }
  4985. ret := &TestPermissionsResponse{
  4986. ServerResponse: googleapi.ServerResponse{
  4987. Header: res.Header,
  4988. HTTPStatusCode: res.StatusCode,
  4989. },
  4990. }
  4991. target := &ret
  4992. if err := gensupport.DecodeResponse(target, res); err != nil {
  4993. return nil, err
  4994. }
  4995. return ret, nil
  4996. // {
  4997. // "description": "Returns permissions that a caller has on the specified resource.",
  4998. // "httpMethod": "POST",
  4999. // "id": "deploymentmanager.deployments.testIamPermissions",
  5000. // "parameterOrder": [
  5001. // "project",
  5002. // "resource"
  5003. // ],
  5004. // "parameters": {
  5005. // "project": {
  5006. // "description": "Project ID for this request.",
  5007. // "location": "path",
  5008. // "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])?))",
  5009. // "required": true,
  5010. // "type": "string"
  5011. // },
  5012. // "resource": {
  5013. // "description": "Name of the resource for this request.",
  5014. // "location": "path",
  5015. // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
  5016. // "required": true,
  5017. // "type": "string"
  5018. // }
  5019. // },
  5020. // "path": "{project}/global/deployments/{resource}/testIamPermissions",
  5021. // "request": {
  5022. // "$ref": "TestPermissionsRequest"
  5023. // },
  5024. // "response": {
  5025. // "$ref": "TestPermissionsResponse"
  5026. // },
  5027. // "scopes": [
  5028. // "https://www.googleapis.com/auth/cloud-platform",
  5029. // "https://www.googleapis.com/auth/ndev.cloudman"
  5030. // ]
  5031. // }
  5032. }
  5033. // method id "deploymentmanager.deployments.update":
  5034. type DeploymentsUpdateCall struct {
  5035. s *Service
  5036. project string
  5037. deployment string
  5038. deployment2 *Deployment
  5039. urlParams_ gensupport.URLParams
  5040. ctx_ context.Context
  5041. header_ http.Header
  5042. }
  5043. // Update: Updates a deployment and all of the resources described by
  5044. // the deployment manifest.
  5045. func (r *DeploymentsService) Update(project string, deployment string, deployment2 *Deployment) *DeploymentsUpdateCall {
  5046. c := &DeploymentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5047. c.project = project
  5048. c.deployment = deployment
  5049. c.deployment2 = deployment2
  5050. return c
  5051. }
  5052. // CreatePolicy sets the optional parameter "createPolicy": Sets the
  5053. // policy to use for creating new resources.
  5054. //
  5055. // Possible values:
  5056. // "ACQUIRE"
  5057. // "CREATE"
  5058. // "CREATE_OR_ACQUIRE" (default)
  5059. func (c *DeploymentsUpdateCall) CreatePolicy(createPolicy string) *DeploymentsUpdateCall {
  5060. c.urlParams_.Set("createPolicy", createPolicy)
  5061. return c
  5062. }
  5063. // DeletePolicy sets the optional parameter "deletePolicy": Sets the
  5064. // policy to use for deleting resources.
  5065. //
  5066. // Possible values:
  5067. // "ABANDON"
  5068. // "DELETE" (default)
  5069. func (c *DeploymentsUpdateCall) DeletePolicy(deletePolicy string) *DeploymentsUpdateCall {
  5070. c.urlParams_.Set("deletePolicy", deletePolicy)
  5071. return c
  5072. }
  5073. // Preview sets the optional parameter "preview": If set to true,
  5074. // updates the deployment and creates and updates the "shell" resources
  5075. // but does not actually alter or instantiate these resources. This
  5076. // allows you to preview what your deployment will look like. You can
  5077. // use this intent to preview how an update would affect your
  5078. // deployment. You must provide a target.config with a configuration if
  5079. // this is set to true. After previewing a deployment, you can deploy
  5080. // your resources by making a request with the update() or you can
  5081. // cancelPreview() to remove the preview altogether. Note that the
  5082. // deployment will still exist after you cancel the preview and you must
  5083. // separately delete this deployment if you want to remove it.
  5084. func (c *DeploymentsUpdateCall) Preview(preview bool) *DeploymentsUpdateCall {
  5085. c.urlParams_.Set("preview", fmt.Sprint(preview))
  5086. return c
  5087. }
  5088. // Fields allows partial responses to be retrieved. See
  5089. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5090. // for more information.
  5091. func (c *DeploymentsUpdateCall) Fields(s ...googleapi.Field) *DeploymentsUpdateCall {
  5092. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5093. return c
  5094. }
  5095. // Context sets the context to be used in this call's Do method. Any
  5096. // pending HTTP request will be aborted if the provided context is
  5097. // canceled.
  5098. func (c *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall {
  5099. c.ctx_ = ctx
  5100. return c
  5101. }
  5102. // Header returns an http.Header that can be modified by the caller to
  5103. // add HTTP headers to the request.
  5104. func (c *DeploymentsUpdateCall) Header() http.Header {
  5105. if c.header_ == nil {
  5106. c.header_ = make(http.Header)
  5107. }
  5108. return c.header_
  5109. }
  5110. func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5111. reqHeaders := make(http.Header)
  5112. for k, v := range c.header_ {
  5113. reqHeaders[k] = v
  5114. }
  5115. reqHeaders.Set("User-Agent", c.s.userAgent())
  5116. var body io.Reader = nil
  5117. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
  5118. if err != nil {
  5119. return nil, err
  5120. }
  5121. reqHeaders.Set("Content-Type", "application/json")
  5122. c.urlParams_.Set("alt", alt)
  5123. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
  5124. urls += "?" + c.urlParams_.Encode()
  5125. req, _ := http.NewRequest("PUT", urls, body)
  5126. req.Header = reqHeaders
  5127. googleapi.Expand(req.URL, map[string]string{
  5128. "project": c.project,
  5129. "deployment": c.deployment,
  5130. })
  5131. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5132. }
  5133. // Do executes the "deploymentmanager.deployments.update" call.
  5134. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5135. // status code is an error. Response headers are in either
  5136. // *Operation.ServerResponse.Header or (if a response was returned at
  5137. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5138. // to check whether the returned error was because
  5139. // http.StatusNotModified was returned.
  5140. func (c *DeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5141. gensupport.SetOptions(c.urlParams_, opts...)
  5142. res, err := c.doRequest("json")
  5143. if res != nil && res.StatusCode == http.StatusNotModified {
  5144. if res.Body != nil {
  5145. res.Body.Close()
  5146. }
  5147. return nil, &googleapi.Error{
  5148. Code: res.StatusCode,
  5149. Header: res.Header,
  5150. }
  5151. }
  5152. if err != nil {
  5153. return nil, err
  5154. }
  5155. defer googleapi.CloseBody(res)
  5156. if err := googleapi.CheckResponse(res); err != nil {
  5157. return nil, err
  5158. }
  5159. ret := &Operation{
  5160. ServerResponse: googleapi.ServerResponse{
  5161. Header: res.Header,
  5162. HTTPStatusCode: res.StatusCode,
  5163. },
  5164. }
  5165. target := &ret
  5166. if err := gensupport.DecodeResponse(target, res); err != nil {
  5167. return nil, err
  5168. }
  5169. return ret, nil
  5170. // {
  5171. // "description": "Updates a deployment and all of the resources described by the deployment manifest.",
  5172. // "httpMethod": "PUT",
  5173. // "id": "deploymentmanager.deployments.update",
  5174. // "parameterOrder": [
  5175. // "project",
  5176. // "deployment"
  5177. // ],
  5178. // "parameters": {
  5179. // "createPolicy": {
  5180. // "default": "CREATE_OR_ACQUIRE",
  5181. // "description": "Sets the policy to use for creating new resources.",
  5182. // "enum": [
  5183. // "ACQUIRE",
  5184. // "CREATE",
  5185. // "CREATE_OR_ACQUIRE"
  5186. // ],
  5187. // "enumDescriptions": [
  5188. // "",
  5189. // "",
  5190. // ""
  5191. // ],
  5192. // "location": "query",
  5193. // "type": "string"
  5194. // },
  5195. // "deletePolicy": {
  5196. // "default": "DELETE",
  5197. // "description": "Sets the policy to use for deleting resources.",
  5198. // "enum": [
  5199. // "ABANDON",
  5200. // "DELETE"
  5201. // ],
  5202. // "enumDescriptions": [
  5203. // "",
  5204. // ""
  5205. // ],
  5206. // "location": "query",
  5207. // "type": "string"
  5208. // },
  5209. // "deployment": {
  5210. // "description": "The name of the deployment for this request.",
  5211. // "location": "path",
  5212. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5213. // "required": true,
  5214. // "type": "string"
  5215. // },
  5216. // "preview": {
  5217. // "default": "false",
  5218. // "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.",
  5219. // "location": "query",
  5220. // "type": "boolean"
  5221. // },
  5222. // "project": {
  5223. // "description": "The project ID for this request.",
  5224. // "location": "path",
  5225. // "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])?))",
  5226. // "required": true,
  5227. // "type": "string"
  5228. // }
  5229. // },
  5230. // "path": "{project}/global/deployments/{deployment}",
  5231. // "request": {
  5232. // "$ref": "Deployment"
  5233. // },
  5234. // "response": {
  5235. // "$ref": "Operation"
  5236. // },
  5237. // "scopes": [
  5238. // "https://www.googleapis.com/auth/cloud-platform",
  5239. // "https://www.googleapis.com/auth/ndev.cloudman"
  5240. // ]
  5241. // }
  5242. }
  5243. // method id "deploymentmanager.manifests.get":
  5244. type ManifestsGetCall struct {
  5245. s *Service
  5246. project string
  5247. deployment string
  5248. manifest string
  5249. urlParams_ gensupport.URLParams
  5250. ifNoneMatch_ string
  5251. ctx_ context.Context
  5252. header_ http.Header
  5253. }
  5254. // Get: Gets information about a specific manifest.
  5255. func (r *ManifestsService) Get(project string, deployment string, manifest string) *ManifestsGetCall {
  5256. c := &ManifestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5257. c.project = project
  5258. c.deployment = deployment
  5259. c.manifest = manifest
  5260. return c
  5261. }
  5262. // Fields allows partial responses to be retrieved. See
  5263. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5264. // for more information.
  5265. func (c *ManifestsGetCall) Fields(s ...googleapi.Field) *ManifestsGetCall {
  5266. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5267. return c
  5268. }
  5269. // IfNoneMatch sets the optional parameter which makes the operation
  5270. // fail if the object's ETag matches the given value. This is useful for
  5271. // getting updates only after the object has changed since the last
  5272. // request. Use googleapi.IsNotModified to check whether the response
  5273. // error from Do is the result of In-None-Match.
  5274. func (c *ManifestsGetCall) IfNoneMatch(entityTag string) *ManifestsGetCall {
  5275. c.ifNoneMatch_ = entityTag
  5276. return c
  5277. }
  5278. // Context sets the context to be used in this call's Do method. Any
  5279. // pending HTTP request will be aborted if the provided context is
  5280. // canceled.
  5281. func (c *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
  5282. c.ctx_ = ctx
  5283. return c
  5284. }
  5285. // Header returns an http.Header that can be modified by the caller to
  5286. // add HTTP headers to the request.
  5287. func (c *ManifestsGetCall) Header() http.Header {
  5288. if c.header_ == nil {
  5289. c.header_ = make(http.Header)
  5290. }
  5291. return c.header_
  5292. }
  5293. func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
  5294. reqHeaders := make(http.Header)
  5295. for k, v := range c.header_ {
  5296. reqHeaders[k] = v
  5297. }
  5298. reqHeaders.Set("User-Agent", c.s.userAgent())
  5299. if c.ifNoneMatch_ != "" {
  5300. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5301. }
  5302. var body io.Reader = nil
  5303. c.urlParams_.Set("alt", alt)
  5304. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests/{manifest}")
  5305. urls += "?" + c.urlParams_.Encode()
  5306. req, _ := http.NewRequest("GET", urls, body)
  5307. req.Header = reqHeaders
  5308. googleapi.Expand(req.URL, map[string]string{
  5309. "project": c.project,
  5310. "deployment": c.deployment,
  5311. "manifest": c.manifest,
  5312. })
  5313. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5314. }
  5315. // Do executes the "deploymentmanager.manifests.get" call.
  5316. // Exactly one of *Manifest or error will be non-nil. Any non-2xx status
  5317. // code is an error. Response headers are in either
  5318. // *Manifest.ServerResponse.Header or (if a response was returned at
  5319. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5320. // to check whether the returned error was because
  5321. // http.StatusNotModified was returned.
  5322. func (c *ManifestsGetCall) Do(opts ...googleapi.CallOption) (*Manifest, error) {
  5323. gensupport.SetOptions(c.urlParams_, opts...)
  5324. res, err := c.doRequest("json")
  5325. if res != nil && res.StatusCode == http.StatusNotModified {
  5326. if res.Body != nil {
  5327. res.Body.Close()
  5328. }
  5329. return nil, &googleapi.Error{
  5330. Code: res.StatusCode,
  5331. Header: res.Header,
  5332. }
  5333. }
  5334. if err != nil {
  5335. return nil, err
  5336. }
  5337. defer googleapi.CloseBody(res)
  5338. if err := googleapi.CheckResponse(res); err != nil {
  5339. return nil, err
  5340. }
  5341. ret := &Manifest{
  5342. ServerResponse: googleapi.ServerResponse{
  5343. Header: res.Header,
  5344. HTTPStatusCode: res.StatusCode,
  5345. },
  5346. }
  5347. target := &ret
  5348. if err := gensupport.DecodeResponse(target, res); err != nil {
  5349. return nil, err
  5350. }
  5351. return ret, nil
  5352. // {
  5353. // "description": "Gets information about a specific manifest.",
  5354. // "httpMethod": "GET",
  5355. // "id": "deploymentmanager.manifests.get",
  5356. // "parameterOrder": [
  5357. // "project",
  5358. // "deployment",
  5359. // "manifest"
  5360. // ],
  5361. // "parameters": {
  5362. // "deployment": {
  5363. // "description": "The name of the deployment for this request.",
  5364. // "location": "path",
  5365. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5366. // "required": true,
  5367. // "type": "string"
  5368. // },
  5369. // "manifest": {
  5370. // "description": "The name of the manifest for this request.",
  5371. // "location": "path",
  5372. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5373. // "required": true,
  5374. // "type": "string"
  5375. // },
  5376. // "project": {
  5377. // "description": "The project ID for this request.",
  5378. // "location": "path",
  5379. // "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])?))",
  5380. // "required": true,
  5381. // "type": "string"
  5382. // }
  5383. // },
  5384. // "path": "{project}/global/deployments/{deployment}/manifests/{manifest}",
  5385. // "response": {
  5386. // "$ref": "Manifest"
  5387. // },
  5388. // "scopes": [
  5389. // "https://www.googleapis.com/auth/cloud-platform",
  5390. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5391. // "https://www.googleapis.com/auth/ndev.cloudman",
  5392. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5393. // ]
  5394. // }
  5395. }
  5396. // method id "deploymentmanager.manifests.list":
  5397. type ManifestsListCall struct {
  5398. s *Service
  5399. project string
  5400. deployment string
  5401. urlParams_ gensupport.URLParams
  5402. ifNoneMatch_ string
  5403. ctx_ context.Context
  5404. header_ http.Header
  5405. }
  5406. // List: Lists all manifests for a given deployment.
  5407. func (r *ManifestsService) List(project string, deployment string) *ManifestsListCall {
  5408. c := &ManifestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5409. c.project = project
  5410. c.deployment = deployment
  5411. return c
  5412. }
  5413. // Filter sets the optional parameter "filter": A filter expression that
  5414. // filters resources listed in the response. The expression must specify
  5415. // the field name, a comparison operator, and the value that you want to
  5416. // use for filtering. The value must be a string, a number, or a
  5417. // boolean. The comparison operator must be either =, !=, >, or <.
  5418. //
  5419. // For example, if you are filtering Compute Engine instances, you can
  5420. // exclude instances named example-instance by specifying name !=
  5421. // example-instance.
  5422. //
  5423. // You can also filter nested fields. For example, you could specify
  5424. // scheduling.automaticRestart = false to include instances only if they
  5425. // are not scheduled for automatic restarts. You can use filtering on
  5426. // nested fields to filter based on resource labels.
  5427. //
  5428. // To filter on multiple expressions, provide each separate expression
  5429. // within parentheses. For example, (scheduling.automaticRestart = true)
  5430. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  5431. // AND expression. However, you can include AND and OR expressions
  5432. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  5433. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  5434. // true).
  5435. func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall {
  5436. c.urlParams_.Set("filter", filter)
  5437. return c
  5438. }
  5439. // MaxResults sets the optional parameter "maxResults": The maximum
  5440. // number of results per page that should be returned. If the number of
  5441. // available results is larger than maxResults, Compute Engine returns a
  5442. // nextPageToken that can be used to get the next page of results in
  5443. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  5444. // (Default: 500)
  5445. func (c *ManifestsListCall) MaxResults(maxResults int64) *ManifestsListCall {
  5446. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5447. return c
  5448. }
  5449. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  5450. // a certain order. By default, results are returned in alphanumerical
  5451. // order based on the resource name.
  5452. //
  5453. // You can also sort results in descending order based on the creation
  5454. // timestamp using orderBy="creationTimestamp desc". This sorts results
  5455. // based on the creationTimestamp field in reverse chronological order
  5456. // (newest result first). Use this to sort resources like operations so
  5457. // that the newest operation is returned first.
  5458. //
  5459. // Currently, only sorting by name or creationTimestamp desc is
  5460. // supported.
  5461. func (c *ManifestsListCall) OrderBy(orderBy string) *ManifestsListCall {
  5462. c.urlParams_.Set("orderBy", orderBy)
  5463. return c
  5464. }
  5465. // PageToken sets the optional parameter "pageToken": Specifies a page
  5466. // token to use. Set pageToken to the nextPageToken returned by a
  5467. // previous list request to get the next page of results.
  5468. func (c *ManifestsListCall) PageToken(pageToken string) *ManifestsListCall {
  5469. c.urlParams_.Set("pageToken", pageToken)
  5470. return c
  5471. }
  5472. // Fields allows partial responses to be retrieved. See
  5473. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5474. // for more information.
  5475. func (c *ManifestsListCall) Fields(s ...googleapi.Field) *ManifestsListCall {
  5476. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5477. return c
  5478. }
  5479. // IfNoneMatch sets the optional parameter which makes the operation
  5480. // fail if the object's ETag matches the given value. This is useful for
  5481. // getting updates only after the object has changed since the last
  5482. // request. Use googleapi.IsNotModified to check whether the response
  5483. // error from Do is the result of In-None-Match.
  5484. func (c *ManifestsListCall) IfNoneMatch(entityTag string) *ManifestsListCall {
  5485. c.ifNoneMatch_ = entityTag
  5486. return c
  5487. }
  5488. // Context sets the context to be used in this call's Do method. Any
  5489. // pending HTTP request will be aborted if the provided context is
  5490. // canceled.
  5491. func (c *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
  5492. c.ctx_ = ctx
  5493. return c
  5494. }
  5495. // Header returns an http.Header that can be modified by the caller to
  5496. // add HTTP headers to the request.
  5497. func (c *ManifestsListCall) Header() http.Header {
  5498. if c.header_ == nil {
  5499. c.header_ = make(http.Header)
  5500. }
  5501. return c.header_
  5502. }
  5503. func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
  5504. reqHeaders := make(http.Header)
  5505. for k, v := range c.header_ {
  5506. reqHeaders[k] = v
  5507. }
  5508. reqHeaders.Set("User-Agent", c.s.userAgent())
  5509. if c.ifNoneMatch_ != "" {
  5510. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5511. }
  5512. var body io.Reader = nil
  5513. c.urlParams_.Set("alt", alt)
  5514. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests")
  5515. urls += "?" + c.urlParams_.Encode()
  5516. req, _ := http.NewRequest("GET", urls, body)
  5517. req.Header = reqHeaders
  5518. googleapi.Expand(req.URL, map[string]string{
  5519. "project": c.project,
  5520. "deployment": c.deployment,
  5521. })
  5522. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5523. }
  5524. // Do executes the "deploymentmanager.manifests.list" call.
  5525. // Exactly one of *ManifestsListResponse or error will be non-nil. Any
  5526. // non-2xx status code is an error. Response headers are in either
  5527. // *ManifestsListResponse.ServerResponse.Header or (if a response was
  5528. // returned at all) in error.(*googleapi.Error).Header. Use
  5529. // googleapi.IsNotModified to check whether the returned error was
  5530. // because http.StatusNotModified was returned.
  5531. func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResponse, error) {
  5532. gensupport.SetOptions(c.urlParams_, opts...)
  5533. res, err := c.doRequest("json")
  5534. if res != nil && res.StatusCode == http.StatusNotModified {
  5535. if res.Body != nil {
  5536. res.Body.Close()
  5537. }
  5538. return nil, &googleapi.Error{
  5539. Code: res.StatusCode,
  5540. Header: res.Header,
  5541. }
  5542. }
  5543. if err != nil {
  5544. return nil, err
  5545. }
  5546. defer googleapi.CloseBody(res)
  5547. if err := googleapi.CheckResponse(res); err != nil {
  5548. return nil, err
  5549. }
  5550. ret := &ManifestsListResponse{
  5551. ServerResponse: googleapi.ServerResponse{
  5552. Header: res.Header,
  5553. HTTPStatusCode: res.StatusCode,
  5554. },
  5555. }
  5556. target := &ret
  5557. if err := gensupport.DecodeResponse(target, res); err != nil {
  5558. return nil, err
  5559. }
  5560. return ret, nil
  5561. // {
  5562. // "description": "Lists all manifests for a given deployment.",
  5563. // "httpMethod": "GET",
  5564. // "id": "deploymentmanager.manifests.list",
  5565. // "parameterOrder": [
  5566. // "project",
  5567. // "deployment"
  5568. // ],
  5569. // "parameters": {
  5570. // "deployment": {
  5571. // "description": "The name of the deployment for this request.",
  5572. // "location": "path",
  5573. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  5574. // "required": true,
  5575. // "type": "string"
  5576. // },
  5577. // "filter": {
  5578. // "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).",
  5579. // "location": "query",
  5580. // "type": "string"
  5581. // },
  5582. // "maxResults": {
  5583. // "default": "500",
  5584. // "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)",
  5585. // "format": "uint32",
  5586. // "location": "query",
  5587. // "minimum": "0",
  5588. // "type": "integer"
  5589. // },
  5590. // "orderBy": {
  5591. // "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.",
  5592. // "location": "query",
  5593. // "type": "string"
  5594. // },
  5595. // "pageToken": {
  5596. // "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.",
  5597. // "location": "query",
  5598. // "type": "string"
  5599. // },
  5600. // "project": {
  5601. // "description": "The project ID for this request.",
  5602. // "location": "path",
  5603. // "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])?))",
  5604. // "required": true,
  5605. // "type": "string"
  5606. // }
  5607. // },
  5608. // "path": "{project}/global/deployments/{deployment}/manifests",
  5609. // "response": {
  5610. // "$ref": "ManifestsListResponse"
  5611. // },
  5612. // "scopes": [
  5613. // "https://www.googleapis.com/auth/cloud-platform",
  5614. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5615. // "https://www.googleapis.com/auth/ndev.cloudman",
  5616. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5617. // ]
  5618. // }
  5619. }
  5620. // Pages invokes f for each page of results.
  5621. // A non-nil error returned from f will halt the iteration.
  5622. // The provided context supersedes any context provided to the Context method.
  5623. func (c *ManifestsListCall) Pages(ctx context.Context, f func(*ManifestsListResponse) error) error {
  5624. c.ctx_ = ctx
  5625. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5626. for {
  5627. x, err := c.Do()
  5628. if err != nil {
  5629. return err
  5630. }
  5631. if err := f(x); err != nil {
  5632. return err
  5633. }
  5634. if x.NextPageToken == "" {
  5635. return nil
  5636. }
  5637. c.PageToken(x.NextPageToken)
  5638. }
  5639. }
  5640. // method id "deploymentmanager.operations.get":
  5641. type OperationsGetCall struct {
  5642. s *Service
  5643. project string
  5644. operation string
  5645. urlParams_ gensupport.URLParams
  5646. ifNoneMatch_ string
  5647. ctx_ context.Context
  5648. header_ http.Header
  5649. }
  5650. // Get: Gets information about a specific operation.
  5651. func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
  5652. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5653. c.project = project
  5654. c.operation = operation
  5655. return c
  5656. }
  5657. // Fields allows partial responses to be retrieved. See
  5658. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5659. // for more information.
  5660. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  5661. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5662. return c
  5663. }
  5664. // IfNoneMatch sets the optional parameter which makes the operation
  5665. // fail if the object's ETag matches the given value. This is useful for
  5666. // getting updates only after the object has changed since the last
  5667. // request. Use googleapi.IsNotModified to check whether the response
  5668. // error from Do is the result of In-None-Match.
  5669. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  5670. c.ifNoneMatch_ = entityTag
  5671. return c
  5672. }
  5673. // Context sets the context to be used in this call's Do method. Any
  5674. // pending HTTP request will be aborted if the provided context is
  5675. // canceled.
  5676. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  5677. c.ctx_ = ctx
  5678. return c
  5679. }
  5680. // Header returns an http.Header that can be modified by the caller to
  5681. // add HTTP headers to the request.
  5682. func (c *OperationsGetCall) Header() http.Header {
  5683. if c.header_ == nil {
  5684. c.header_ = make(http.Header)
  5685. }
  5686. return c.header_
  5687. }
  5688. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5689. reqHeaders := make(http.Header)
  5690. for k, v := range c.header_ {
  5691. reqHeaders[k] = v
  5692. }
  5693. reqHeaders.Set("User-Agent", c.s.userAgent())
  5694. if c.ifNoneMatch_ != "" {
  5695. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5696. }
  5697. var body io.Reader = nil
  5698. c.urlParams_.Set("alt", alt)
  5699. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
  5700. urls += "?" + c.urlParams_.Encode()
  5701. req, _ := http.NewRequest("GET", urls, body)
  5702. req.Header = reqHeaders
  5703. googleapi.Expand(req.URL, map[string]string{
  5704. "project": c.project,
  5705. "operation": c.operation,
  5706. })
  5707. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5708. }
  5709. // Do executes the "deploymentmanager.operations.get" call.
  5710. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5711. // status code is an error. Response headers are in either
  5712. // *Operation.ServerResponse.Header or (if a response was returned at
  5713. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5714. // to check whether the returned error was because
  5715. // http.StatusNotModified was returned.
  5716. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5717. gensupport.SetOptions(c.urlParams_, opts...)
  5718. res, err := c.doRequest("json")
  5719. if res != nil && res.StatusCode == http.StatusNotModified {
  5720. if res.Body != nil {
  5721. res.Body.Close()
  5722. }
  5723. return nil, &googleapi.Error{
  5724. Code: res.StatusCode,
  5725. Header: res.Header,
  5726. }
  5727. }
  5728. if err != nil {
  5729. return nil, err
  5730. }
  5731. defer googleapi.CloseBody(res)
  5732. if err := googleapi.CheckResponse(res); err != nil {
  5733. return nil, err
  5734. }
  5735. ret := &Operation{
  5736. ServerResponse: googleapi.ServerResponse{
  5737. Header: res.Header,
  5738. HTTPStatusCode: res.StatusCode,
  5739. },
  5740. }
  5741. target := &ret
  5742. if err := gensupport.DecodeResponse(target, res); err != nil {
  5743. return nil, err
  5744. }
  5745. return ret, nil
  5746. // {
  5747. // "description": "Gets information about a specific operation.",
  5748. // "httpMethod": "GET",
  5749. // "id": "deploymentmanager.operations.get",
  5750. // "parameterOrder": [
  5751. // "project",
  5752. // "operation"
  5753. // ],
  5754. // "parameters": {
  5755. // "operation": {
  5756. // "description": "The name of the operation for this request.",
  5757. // "location": "path",
  5758. // "required": true,
  5759. // "type": "string"
  5760. // },
  5761. // "project": {
  5762. // "description": "The project ID for this request.",
  5763. // "location": "path",
  5764. // "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])?))",
  5765. // "required": true,
  5766. // "type": "string"
  5767. // }
  5768. // },
  5769. // "path": "{project}/global/operations/{operation}",
  5770. // "response": {
  5771. // "$ref": "Operation"
  5772. // },
  5773. // "scopes": [
  5774. // "https://www.googleapis.com/auth/cloud-platform",
  5775. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5776. // "https://www.googleapis.com/auth/ndev.cloudman",
  5777. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5778. // ]
  5779. // }
  5780. }
  5781. // method id "deploymentmanager.operations.list":
  5782. type OperationsListCall struct {
  5783. s *Service
  5784. project string
  5785. urlParams_ gensupport.URLParams
  5786. ifNoneMatch_ string
  5787. ctx_ context.Context
  5788. header_ http.Header
  5789. }
  5790. // List: Lists all operations for a project.
  5791. func (r *OperationsService) List(project string) *OperationsListCall {
  5792. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5793. c.project = project
  5794. return c
  5795. }
  5796. // Filter sets the optional parameter "filter": A filter expression that
  5797. // filters resources listed in the response. The expression must specify
  5798. // the field name, a comparison operator, and the value that you want to
  5799. // use for filtering. The value must be a string, a number, or a
  5800. // boolean. The comparison operator must be either =, !=, >, or <.
  5801. //
  5802. // For example, if you are filtering Compute Engine instances, you can
  5803. // exclude instances named example-instance by specifying name !=
  5804. // example-instance.
  5805. //
  5806. // You can also filter nested fields. For example, you could specify
  5807. // scheduling.automaticRestart = false to include instances only if they
  5808. // are not scheduled for automatic restarts. You can use filtering on
  5809. // nested fields to filter based on resource labels.
  5810. //
  5811. // To filter on multiple expressions, provide each separate expression
  5812. // within parentheses. For example, (scheduling.automaticRestart = true)
  5813. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  5814. // AND expression. However, you can include AND and OR expressions
  5815. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  5816. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  5817. // true).
  5818. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  5819. c.urlParams_.Set("filter", filter)
  5820. return c
  5821. }
  5822. // MaxResults sets the optional parameter "maxResults": The maximum
  5823. // number of results per page that should be returned. If the number of
  5824. // available results is larger than maxResults, Compute Engine returns a
  5825. // nextPageToken that can be used to get the next page of results in
  5826. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  5827. // (Default: 500)
  5828. func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
  5829. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5830. return c
  5831. }
  5832. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  5833. // a certain order. By default, results are returned in alphanumerical
  5834. // order based on the resource name.
  5835. //
  5836. // You can also sort results in descending order based on the creation
  5837. // timestamp using orderBy="creationTimestamp desc". This sorts results
  5838. // based on the creationTimestamp field in reverse chronological order
  5839. // (newest result first). Use this to sort resources like operations so
  5840. // that the newest operation is returned first.
  5841. //
  5842. // Currently, only sorting by name or creationTimestamp desc is
  5843. // supported.
  5844. func (c *OperationsListCall) OrderBy(orderBy string) *OperationsListCall {
  5845. c.urlParams_.Set("orderBy", orderBy)
  5846. return c
  5847. }
  5848. // PageToken sets the optional parameter "pageToken": Specifies a page
  5849. // token to use. Set pageToken to the nextPageToken returned by a
  5850. // previous list request to get the next page of results.
  5851. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  5852. c.urlParams_.Set("pageToken", pageToken)
  5853. return c
  5854. }
  5855. // Fields allows partial responses to be retrieved. See
  5856. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5857. // for more information.
  5858. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  5859. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5860. return c
  5861. }
  5862. // IfNoneMatch sets the optional parameter which makes the operation
  5863. // fail if the object's ETag matches the given value. This is useful for
  5864. // getting updates only after the object has changed since the last
  5865. // request. Use googleapi.IsNotModified to check whether the response
  5866. // error from Do is the result of In-None-Match.
  5867. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  5868. c.ifNoneMatch_ = entityTag
  5869. return c
  5870. }
  5871. // Context sets the context to be used in this call's Do method. Any
  5872. // pending HTTP request will be aborted if the provided context is
  5873. // canceled.
  5874. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  5875. c.ctx_ = ctx
  5876. return c
  5877. }
  5878. // Header returns an http.Header that can be modified by the caller to
  5879. // add HTTP headers to the request.
  5880. func (c *OperationsListCall) Header() http.Header {
  5881. if c.header_ == nil {
  5882. c.header_ = make(http.Header)
  5883. }
  5884. return c.header_
  5885. }
  5886. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  5887. reqHeaders := make(http.Header)
  5888. for k, v := range c.header_ {
  5889. reqHeaders[k] = v
  5890. }
  5891. reqHeaders.Set("User-Agent", c.s.userAgent())
  5892. if c.ifNoneMatch_ != "" {
  5893. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5894. }
  5895. var body io.Reader = nil
  5896. c.urlParams_.Set("alt", alt)
  5897. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
  5898. urls += "?" + c.urlParams_.Encode()
  5899. req, _ := http.NewRequest("GET", urls, body)
  5900. req.Header = reqHeaders
  5901. googleapi.Expand(req.URL, map[string]string{
  5902. "project": c.project,
  5903. })
  5904. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5905. }
  5906. // Do executes the "deploymentmanager.operations.list" call.
  5907. // Exactly one of *OperationsListResponse or error will be non-nil. Any
  5908. // non-2xx status code is an error. Response headers are in either
  5909. // *OperationsListResponse.ServerResponse.Header or (if a response was
  5910. // returned at all) in error.(*googleapi.Error).Header. Use
  5911. // googleapi.IsNotModified to check whether the returned error was
  5912. // because http.StatusNotModified was returned.
  5913. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
  5914. gensupport.SetOptions(c.urlParams_, opts...)
  5915. res, err := c.doRequest("json")
  5916. if res != nil && res.StatusCode == http.StatusNotModified {
  5917. if res.Body != nil {
  5918. res.Body.Close()
  5919. }
  5920. return nil, &googleapi.Error{
  5921. Code: res.StatusCode,
  5922. Header: res.Header,
  5923. }
  5924. }
  5925. if err != nil {
  5926. return nil, err
  5927. }
  5928. defer googleapi.CloseBody(res)
  5929. if err := googleapi.CheckResponse(res); err != nil {
  5930. return nil, err
  5931. }
  5932. ret := &OperationsListResponse{
  5933. ServerResponse: googleapi.ServerResponse{
  5934. Header: res.Header,
  5935. HTTPStatusCode: res.StatusCode,
  5936. },
  5937. }
  5938. target := &ret
  5939. if err := gensupport.DecodeResponse(target, res); err != nil {
  5940. return nil, err
  5941. }
  5942. return ret, nil
  5943. // {
  5944. // "description": "Lists all operations for a project.",
  5945. // "httpMethod": "GET",
  5946. // "id": "deploymentmanager.operations.list",
  5947. // "parameterOrder": [
  5948. // "project"
  5949. // ],
  5950. // "parameters": {
  5951. // "filter": {
  5952. // "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).",
  5953. // "location": "query",
  5954. // "type": "string"
  5955. // },
  5956. // "maxResults": {
  5957. // "default": "500",
  5958. // "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)",
  5959. // "format": "uint32",
  5960. // "location": "query",
  5961. // "minimum": "0",
  5962. // "type": "integer"
  5963. // },
  5964. // "orderBy": {
  5965. // "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.",
  5966. // "location": "query",
  5967. // "type": "string"
  5968. // },
  5969. // "pageToken": {
  5970. // "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.",
  5971. // "location": "query",
  5972. // "type": "string"
  5973. // },
  5974. // "project": {
  5975. // "description": "The project ID for this request.",
  5976. // "location": "path",
  5977. // "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])?))",
  5978. // "required": true,
  5979. // "type": "string"
  5980. // }
  5981. // },
  5982. // "path": "{project}/global/operations",
  5983. // "response": {
  5984. // "$ref": "OperationsListResponse"
  5985. // },
  5986. // "scopes": [
  5987. // "https://www.googleapis.com/auth/cloud-platform",
  5988. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  5989. // "https://www.googleapis.com/auth/ndev.cloudman",
  5990. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  5991. // ]
  5992. // }
  5993. }
  5994. // Pages invokes f for each page of results.
  5995. // A non-nil error returned from f will halt the iteration.
  5996. // The provided context supersedes any context provided to the Context method.
  5997. func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
  5998. c.ctx_ = ctx
  5999. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6000. for {
  6001. x, err := c.Do()
  6002. if err != nil {
  6003. return err
  6004. }
  6005. if err := f(x); err != nil {
  6006. return err
  6007. }
  6008. if x.NextPageToken == "" {
  6009. return nil
  6010. }
  6011. c.PageToken(x.NextPageToken)
  6012. }
  6013. }
  6014. // method id "deploymentmanager.resources.get":
  6015. type ResourcesGetCall struct {
  6016. s *Service
  6017. project string
  6018. deployment string
  6019. resource string
  6020. urlParams_ gensupport.URLParams
  6021. ifNoneMatch_ string
  6022. ctx_ context.Context
  6023. header_ http.Header
  6024. }
  6025. // Get: Gets information about a single resource.
  6026. func (r *ResourcesService) Get(project string, deployment string, resource string) *ResourcesGetCall {
  6027. c := &ResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6028. c.project = project
  6029. c.deployment = deployment
  6030. c.resource = resource
  6031. return c
  6032. }
  6033. // Fields allows partial responses to be retrieved. See
  6034. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6035. // for more information.
  6036. func (c *ResourcesGetCall) Fields(s ...googleapi.Field) *ResourcesGetCall {
  6037. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6038. return c
  6039. }
  6040. // IfNoneMatch sets the optional parameter which makes the operation
  6041. // fail if the object's ETag matches the given value. This is useful for
  6042. // getting updates only after the object has changed since the last
  6043. // request. Use googleapi.IsNotModified to check whether the response
  6044. // error from Do is the result of In-None-Match.
  6045. func (c *ResourcesGetCall) IfNoneMatch(entityTag string) *ResourcesGetCall {
  6046. c.ifNoneMatch_ = entityTag
  6047. return c
  6048. }
  6049. // Context sets the context to be used in this call's Do method. Any
  6050. // pending HTTP request will be aborted if the provided context is
  6051. // canceled.
  6052. func (c *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
  6053. c.ctx_ = ctx
  6054. return c
  6055. }
  6056. // Header returns an http.Header that can be modified by the caller to
  6057. // add HTTP headers to the request.
  6058. func (c *ResourcesGetCall) Header() http.Header {
  6059. if c.header_ == nil {
  6060. c.header_ = make(http.Header)
  6061. }
  6062. return c.header_
  6063. }
  6064. func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
  6065. reqHeaders := make(http.Header)
  6066. for k, v := range c.header_ {
  6067. reqHeaders[k] = v
  6068. }
  6069. reqHeaders.Set("User-Agent", c.s.userAgent())
  6070. if c.ifNoneMatch_ != "" {
  6071. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6072. }
  6073. var body io.Reader = nil
  6074. c.urlParams_.Set("alt", alt)
  6075. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources/{resource}")
  6076. urls += "?" + c.urlParams_.Encode()
  6077. req, _ := http.NewRequest("GET", urls, body)
  6078. req.Header = reqHeaders
  6079. googleapi.Expand(req.URL, map[string]string{
  6080. "project": c.project,
  6081. "deployment": c.deployment,
  6082. "resource": c.resource,
  6083. })
  6084. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6085. }
  6086. // Do executes the "deploymentmanager.resources.get" call.
  6087. // Exactly one of *Resource or error will be non-nil. Any non-2xx status
  6088. // code is an error. Response headers are in either
  6089. // *Resource.ServerResponse.Header or (if a response was returned at
  6090. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6091. // to check whether the returned error was because
  6092. // http.StatusNotModified was returned.
  6093. func (c *ResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) {
  6094. gensupport.SetOptions(c.urlParams_, opts...)
  6095. res, err := c.doRequest("json")
  6096. if res != nil && res.StatusCode == http.StatusNotModified {
  6097. if res.Body != nil {
  6098. res.Body.Close()
  6099. }
  6100. return nil, &googleapi.Error{
  6101. Code: res.StatusCode,
  6102. Header: res.Header,
  6103. }
  6104. }
  6105. if err != nil {
  6106. return nil, err
  6107. }
  6108. defer googleapi.CloseBody(res)
  6109. if err := googleapi.CheckResponse(res); err != nil {
  6110. return nil, err
  6111. }
  6112. ret := &Resource{
  6113. ServerResponse: googleapi.ServerResponse{
  6114. Header: res.Header,
  6115. HTTPStatusCode: res.StatusCode,
  6116. },
  6117. }
  6118. target := &ret
  6119. if err := gensupport.DecodeResponse(target, res); err != nil {
  6120. return nil, err
  6121. }
  6122. return ret, nil
  6123. // {
  6124. // "description": "Gets information about a single resource.",
  6125. // "httpMethod": "GET",
  6126. // "id": "deploymentmanager.resources.get",
  6127. // "parameterOrder": [
  6128. // "project",
  6129. // "deployment",
  6130. // "resource"
  6131. // ],
  6132. // "parameters": {
  6133. // "deployment": {
  6134. // "description": "The name of the deployment for this request.",
  6135. // "location": "path",
  6136. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6137. // "required": true,
  6138. // "type": "string"
  6139. // },
  6140. // "project": {
  6141. // "description": "The project ID for this request.",
  6142. // "location": "path",
  6143. // "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])?))",
  6144. // "required": true,
  6145. // "type": "string"
  6146. // },
  6147. // "resource": {
  6148. // "description": "The name of the resource for this request.",
  6149. // "location": "path",
  6150. // "required": true,
  6151. // "type": "string"
  6152. // }
  6153. // },
  6154. // "path": "{project}/global/deployments/{deployment}/resources/{resource}",
  6155. // "response": {
  6156. // "$ref": "Resource"
  6157. // },
  6158. // "scopes": [
  6159. // "https://www.googleapis.com/auth/cloud-platform",
  6160. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6161. // "https://www.googleapis.com/auth/ndev.cloudman",
  6162. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6163. // ]
  6164. // }
  6165. }
  6166. // method id "deploymentmanager.resources.list":
  6167. type ResourcesListCall struct {
  6168. s *Service
  6169. project string
  6170. deployment string
  6171. urlParams_ gensupport.URLParams
  6172. ifNoneMatch_ string
  6173. ctx_ context.Context
  6174. header_ http.Header
  6175. }
  6176. // List: Lists all resources in a given deployment.
  6177. func (r *ResourcesService) List(project string, deployment string) *ResourcesListCall {
  6178. c := &ResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6179. c.project = project
  6180. c.deployment = deployment
  6181. return c
  6182. }
  6183. // Filter sets the optional parameter "filter": A filter expression that
  6184. // filters resources listed in the response. The expression must specify
  6185. // the field name, a comparison operator, and the value that you want to
  6186. // use for filtering. The value must be a string, a number, or a
  6187. // boolean. The comparison operator must be either =, !=, >, or <.
  6188. //
  6189. // For example, if you are filtering Compute Engine instances, you can
  6190. // exclude instances named example-instance by specifying name !=
  6191. // example-instance.
  6192. //
  6193. // You can also filter nested fields. For example, you could specify
  6194. // scheduling.automaticRestart = false to include instances only if they
  6195. // are not scheduled for automatic restarts. You can use filtering on
  6196. // nested fields to filter based on resource labels.
  6197. //
  6198. // To filter on multiple expressions, provide each separate expression
  6199. // within parentheses. For example, (scheduling.automaticRestart = true)
  6200. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  6201. // AND expression. However, you can include AND and OR expressions
  6202. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  6203. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  6204. // true).
  6205. func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall {
  6206. c.urlParams_.Set("filter", filter)
  6207. return c
  6208. }
  6209. // MaxResults sets the optional parameter "maxResults": The maximum
  6210. // number of results per page that should be returned. If the number of
  6211. // available results is larger than maxResults, Compute Engine returns a
  6212. // nextPageToken that can be used to get the next page of results in
  6213. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  6214. // (Default: 500)
  6215. func (c *ResourcesListCall) MaxResults(maxResults int64) *ResourcesListCall {
  6216. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6217. return c
  6218. }
  6219. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  6220. // a certain order. By default, results are returned in alphanumerical
  6221. // order based on the resource name.
  6222. //
  6223. // You can also sort results in descending order based on the creation
  6224. // timestamp using orderBy="creationTimestamp desc". This sorts results
  6225. // based on the creationTimestamp field in reverse chronological order
  6226. // (newest result first). Use this to sort resources like operations so
  6227. // that the newest operation is returned first.
  6228. //
  6229. // Currently, only sorting by name or creationTimestamp desc is
  6230. // supported.
  6231. func (c *ResourcesListCall) OrderBy(orderBy string) *ResourcesListCall {
  6232. c.urlParams_.Set("orderBy", orderBy)
  6233. return c
  6234. }
  6235. // PageToken sets the optional parameter "pageToken": Specifies a page
  6236. // token to use. Set pageToken to the nextPageToken returned by a
  6237. // previous list request to get the next page of results.
  6238. func (c *ResourcesListCall) PageToken(pageToken string) *ResourcesListCall {
  6239. c.urlParams_.Set("pageToken", pageToken)
  6240. return c
  6241. }
  6242. // Fields allows partial responses to be retrieved. See
  6243. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6244. // for more information.
  6245. func (c *ResourcesListCall) Fields(s ...googleapi.Field) *ResourcesListCall {
  6246. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6247. return c
  6248. }
  6249. // IfNoneMatch sets the optional parameter which makes the operation
  6250. // fail if the object's ETag matches the given value. This is useful for
  6251. // getting updates only after the object has changed since the last
  6252. // request. Use googleapi.IsNotModified to check whether the response
  6253. // error from Do is the result of In-None-Match.
  6254. func (c *ResourcesListCall) IfNoneMatch(entityTag string) *ResourcesListCall {
  6255. c.ifNoneMatch_ = entityTag
  6256. return c
  6257. }
  6258. // Context sets the context to be used in this call's Do method. Any
  6259. // pending HTTP request will be aborted if the provided context is
  6260. // canceled.
  6261. func (c *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
  6262. c.ctx_ = ctx
  6263. return c
  6264. }
  6265. // Header returns an http.Header that can be modified by the caller to
  6266. // add HTTP headers to the request.
  6267. func (c *ResourcesListCall) Header() http.Header {
  6268. if c.header_ == nil {
  6269. c.header_ = make(http.Header)
  6270. }
  6271. return c.header_
  6272. }
  6273. func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
  6274. reqHeaders := make(http.Header)
  6275. for k, v := range c.header_ {
  6276. reqHeaders[k] = v
  6277. }
  6278. reqHeaders.Set("User-Agent", c.s.userAgent())
  6279. if c.ifNoneMatch_ != "" {
  6280. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6281. }
  6282. var body io.Reader = nil
  6283. c.urlParams_.Set("alt", alt)
  6284. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources")
  6285. urls += "?" + c.urlParams_.Encode()
  6286. req, _ := http.NewRequest("GET", urls, body)
  6287. req.Header = reqHeaders
  6288. googleapi.Expand(req.URL, map[string]string{
  6289. "project": c.project,
  6290. "deployment": c.deployment,
  6291. })
  6292. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6293. }
  6294. // Do executes the "deploymentmanager.resources.list" call.
  6295. // Exactly one of *ResourcesListResponse or error will be non-nil. Any
  6296. // non-2xx status code is an error. Response headers are in either
  6297. // *ResourcesListResponse.ServerResponse.Header or (if a response was
  6298. // returned at all) in error.(*googleapi.Error).Header. Use
  6299. // googleapi.IsNotModified to check whether the returned error was
  6300. // because http.StatusNotModified was returned.
  6301. func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResponse, error) {
  6302. gensupport.SetOptions(c.urlParams_, opts...)
  6303. res, err := c.doRequest("json")
  6304. if res != nil && res.StatusCode == http.StatusNotModified {
  6305. if res.Body != nil {
  6306. res.Body.Close()
  6307. }
  6308. return nil, &googleapi.Error{
  6309. Code: res.StatusCode,
  6310. Header: res.Header,
  6311. }
  6312. }
  6313. if err != nil {
  6314. return nil, err
  6315. }
  6316. defer googleapi.CloseBody(res)
  6317. if err := googleapi.CheckResponse(res); err != nil {
  6318. return nil, err
  6319. }
  6320. ret := &ResourcesListResponse{
  6321. ServerResponse: googleapi.ServerResponse{
  6322. Header: res.Header,
  6323. HTTPStatusCode: res.StatusCode,
  6324. },
  6325. }
  6326. target := &ret
  6327. if err := gensupport.DecodeResponse(target, res); err != nil {
  6328. return nil, err
  6329. }
  6330. return ret, nil
  6331. // {
  6332. // "description": "Lists all resources in a given deployment.",
  6333. // "httpMethod": "GET",
  6334. // "id": "deploymentmanager.resources.list",
  6335. // "parameterOrder": [
  6336. // "project",
  6337. // "deployment"
  6338. // ],
  6339. // "parameters": {
  6340. // "deployment": {
  6341. // "description": "The name of the deployment for this request.",
  6342. // "location": "path",
  6343. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6344. // "required": true,
  6345. // "type": "string"
  6346. // },
  6347. // "filter": {
  6348. // "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).",
  6349. // "location": "query",
  6350. // "type": "string"
  6351. // },
  6352. // "maxResults": {
  6353. // "default": "500",
  6354. // "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)",
  6355. // "format": "uint32",
  6356. // "location": "query",
  6357. // "minimum": "0",
  6358. // "type": "integer"
  6359. // },
  6360. // "orderBy": {
  6361. // "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.",
  6362. // "location": "query",
  6363. // "type": "string"
  6364. // },
  6365. // "pageToken": {
  6366. // "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.",
  6367. // "location": "query",
  6368. // "type": "string"
  6369. // },
  6370. // "project": {
  6371. // "description": "The project ID for this request.",
  6372. // "location": "path",
  6373. // "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])?))",
  6374. // "required": true,
  6375. // "type": "string"
  6376. // }
  6377. // },
  6378. // "path": "{project}/global/deployments/{deployment}/resources",
  6379. // "response": {
  6380. // "$ref": "ResourcesListResponse"
  6381. // },
  6382. // "scopes": [
  6383. // "https://www.googleapis.com/auth/cloud-platform",
  6384. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6385. // "https://www.googleapis.com/auth/ndev.cloudman",
  6386. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6387. // ]
  6388. // }
  6389. }
  6390. // Pages invokes f for each page of results.
  6391. // A non-nil error returned from f will halt the iteration.
  6392. // The provided context supersedes any context provided to the Context method.
  6393. func (c *ResourcesListCall) Pages(ctx context.Context, f func(*ResourcesListResponse) error) error {
  6394. c.ctx_ = ctx
  6395. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6396. for {
  6397. x, err := c.Do()
  6398. if err != nil {
  6399. return err
  6400. }
  6401. if err := f(x); err != nil {
  6402. return err
  6403. }
  6404. if x.NextPageToken == "" {
  6405. return nil
  6406. }
  6407. c.PageToken(x.NextPageToken)
  6408. }
  6409. }
  6410. // method id "deploymentmanager.typeProviders.delete":
  6411. type TypeProvidersDeleteCall struct {
  6412. s *Service
  6413. project string
  6414. typeProvider string
  6415. urlParams_ gensupport.URLParams
  6416. ctx_ context.Context
  6417. header_ http.Header
  6418. }
  6419. // Delete: Deletes a type provider.
  6420. func (r *TypeProvidersService) Delete(project string, typeProvider string) *TypeProvidersDeleteCall {
  6421. c := &TypeProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6422. c.project = project
  6423. c.typeProvider = typeProvider
  6424. return c
  6425. }
  6426. // Fields allows partial responses to be retrieved. See
  6427. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6428. // for more information.
  6429. func (c *TypeProvidersDeleteCall) Fields(s ...googleapi.Field) *TypeProvidersDeleteCall {
  6430. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6431. return c
  6432. }
  6433. // Context sets the context to be used in this call's Do method. Any
  6434. // pending HTTP request will be aborted if the provided context is
  6435. // canceled.
  6436. func (c *TypeProvidersDeleteCall) Context(ctx context.Context) *TypeProvidersDeleteCall {
  6437. c.ctx_ = ctx
  6438. return c
  6439. }
  6440. // Header returns an http.Header that can be modified by the caller to
  6441. // add HTTP headers to the request.
  6442. func (c *TypeProvidersDeleteCall) Header() http.Header {
  6443. if c.header_ == nil {
  6444. c.header_ = make(http.Header)
  6445. }
  6446. return c.header_
  6447. }
  6448. func (c *TypeProvidersDeleteCall) doRequest(alt string) (*http.Response, error) {
  6449. reqHeaders := make(http.Header)
  6450. for k, v := range c.header_ {
  6451. reqHeaders[k] = v
  6452. }
  6453. reqHeaders.Set("User-Agent", c.s.userAgent())
  6454. var body io.Reader = nil
  6455. c.urlParams_.Set("alt", alt)
  6456. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  6457. urls += "?" + c.urlParams_.Encode()
  6458. req, _ := http.NewRequest("DELETE", urls, body)
  6459. req.Header = reqHeaders
  6460. googleapi.Expand(req.URL, map[string]string{
  6461. "project": c.project,
  6462. "typeProvider": c.typeProvider,
  6463. })
  6464. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6465. }
  6466. // Do executes the "deploymentmanager.typeProviders.delete" call.
  6467. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6468. // status code is an error. Response headers are in either
  6469. // *Operation.ServerResponse.Header or (if a response was returned at
  6470. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6471. // to check whether the returned error was because
  6472. // http.StatusNotModified was returned.
  6473. func (c *TypeProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6474. gensupport.SetOptions(c.urlParams_, opts...)
  6475. res, err := c.doRequest("json")
  6476. if res != nil && res.StatusCode == http.StatusNotModified {
  6477. if res.Body != nil {
  6478. res.Body.Close()
  6479. }
  6480. return nil, &googleapi.Error{
  6481. Code: res.StatusCode,
  6482. Header: res.Header,
  6483. }
  6484. }
  6485. if err != nil {
  6486. return nil, err
  6487. }
  6488. defer googleapi.CloseBody(res)
  6489. if err := googleapi.CheckResponse(res); err != nil {
  6490. return nil, err
  6491. }
  6492. ret := &Operation{
  6493. ServerResponse: googleapi.ServerResponse{
  6494. Header: res.Header,
  6495. HTTPStatusCode: res.StatusCode,
  6496. },
  6497. }
  6498. target := &ret
  6499. if err := gensupport.DecodeResponse(target, res); err != nil {
  6500. return nil, err
  6501. }
  6502. return ret, nil
  6503. // {
  6504. // "description": "Deletes a type provider.",
  6505. // "httpMethod": "DELETE",
  6506. // "id": "deploymentmanager.typeProviders.delete",
  6507. // "parameterOrder": [
  6508. // "project",
  6509. // "typeProvider"
  6510. // ],
  6511. // "parameters": {
  6512. // "project": {
  6513. // "description": "The project ID for this request.",
  6514. // "location": "path",
  6515. // "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])?))",
  6516. // "required": true,
  6517. // "type": "string"
  6518. // },
  6519. // "typeProvider": {
  6520. // "description": "The name of the type provider for this request.",
  6521. // "location": "path",
  6522. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6523. // "required": true,
  6524. // "type": "string"
  6525. // }
  6526. // },
  6527. // "path": "{project}/global/typeProviders/{typeProvider}",
  6528. // "response": {
  6529. // "$ref": "Operation"
  6530. // },
  6531. // "scopes": [
  6532. // "https://www.googleapis.com/auth/cloud-platform",
  6533. // "https://www.googleapis.com/auth/ndev.cloudman"
  6534. // ]
  6535. // }
  6536. }
  6537. // method id "deploymentmanager.typeProviders.get":
  6538. type TypeProvidersGetCall struct {
  6539. s *Service
  6540. project string
  6541. typeProvider string
  6542. urlParams_ gensupport.URLParams
  6543. ifNoneMatch_ string
  6544. ctx_ context.Context
  6545. header_ http.Header
  6546. }
  6547. // Get: Gets information about a specific type provider.
  6548. func (r *TypeProvidersService) Get(project string, typeProvider string) *TypeProvidersGetCall {
  6549. c := &TypeProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6550. c.project = project
  6551. c.typeProvider = typeProvider
  6552. return c
  6553. }
  6554. // Fields allows partial responses to be retrieved. See
  6555. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6556. // for more information.
  6557. func (c *TypeProvidersGetCall) Fields(s ...googleapi.Field) *TypeProvidersGetCall {
  6558. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6559. return c
  6560. }
  6561. // IfNoneMatch sets the optional parameter which makes the operation
  6562. // fail if the object's ETag matches the given value. This is useful for
  6563. // getting updates only after the object has changed since the last
  6564. // request. Use googleapi.IsNotModified to check whether the response
  6565. // error from Do is the result of In-None-Match.
  6566. func (c *TypeProvidersGetCall) IfNoneMatch(entityTag string) *TypeProvidersGetCall {
  6567. c.ifNoneMatch_ = entityTag
  6568. return c
  6569. }
  6570. // Context sets the context to be used in this call's Do method. Any
  6571. // pending HTTP request will be aborted if the provided context is
  6572. // canceled.
  6573. func (c *TypeProvidersGetCall) Context(ctx context.Context) *TypeProvidersGetCall {
  6574. c.ctx_ = ctx
  6575. return c
  6576. }
  6577. // Header returns an http.Header that can be modified by the caller to
  6578. // add HTTP headers to the request.
  6579. func (c *TypeProvidersGetCall) Header() http.Header {
  6580. if c.header_ == nil {
  6581. c.header_ = make(http.Header)
  6582. }
  6583. return c.header_
  6584. }
  6585. func (c *TypeProvidersGetCall) doRequest(alt string) (*http.Response, error) {
  6586. reqHeaders := make(http.Header)
  6587. for k, v := range c.header_ {
  6588. reqHeaders[k] = v
  6589. }
  6590. reqHeaders.Set("User-Agent", c.s.userAgent())
  6591. if c.ifNoneMatch_ != "" {
  6592. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6593. }
  6594. var body io.Reader = nil
  6595. c.urlParams_.Set("alt", alt)
  6596. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  6597. urls += "?" + c.urlParams_.Encode()
  6598. req, _ := http.NewRequest("GET", urls, body)
  6599. req.Header = reqHeaders
  6600. googleapi.Expand(req.URL, map[string]string{
  6601. "project": c.project,
  6602. "typeProvider": c.typeProvider,
  6603. })
  6604. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6605. }
  6606. // Do executes the "deploymentmanager.typeProviders.get" call.
  6607. // Exactly one of *TypeProvider or error will be non-nil. Any non-2xx
  6608. // status code is an error. Response headers are in either
  6609. // *TypeProvider.ServerResponse.Header or (if a response was returned at
  6610. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6611. // to check whether the returned error was because
  6612. // http.StatusNotModified was returned.
  6613. func (c *TypeProvidersGetCall) Do(opts ...googleapi.CallOption) (*TypeProvider, error) {
  6614. gensupport.SetOptions(c.urlParams_, opts...)
  6615. res, err := c.doRequest("json")
  6616. if res != nil && res.StatusCode == http.StatusNotModified {
  6617. if res.Body != nil {
  6618. res.Body.Close()
  6619. }
  6620. return nil, &googleapi.Error{
  6621. Code: res.StatusCode,
  6622. Header: res.Header,
  6623. }
  6624. }
  6625. if err != nil {
  6626. return nil, err
  6627. }
  6628. defer googleapi.CloseBody(res)
  6629. if err := googleapi.CheckResponse(res); err != nil {
  6630. return nil, err
  6631. }
  6632. ret := &TypeProvider{
  6633. ServerResponse: googleapi.ServerResponse{
  6634. Header: res.Header,
  6635. HTTPStatusCode: res.StatusCode,
  6636. },
  6637. }
  6638. target := &ret
  6639. if err := gensupport.DecodeResponse(target, res); err != nil {
  6640. return nil, err
  6641. }
  6642. return ret, nil
  6643. // {
  6644. // "description": "Gets information about a specific type provider.",
  6645. // "httpMethod": "GET",
  6646. // "id": "deploymentmanager.typeProviders.get",
  6647. // "parameterOrder": [
  6648. // "project",
  6649. // "typeProvider"
  6650. // ],
  6651. // "parameters": {
  6652. // "project": {
  6653. // "description": "The project ID for this request.",
  6654. // "location": "path",
  6655. // "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])?))",
  6656. // "required": true,
  6657. // "type": "string"
  6658. // },
  6659. // "typeProvider": {
  6660. // "description": "The name of the type provider for this request.",
  6661. // "location": "path",
  6662. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6663. // "required": true,
  6664. // "type": "string"
  6665. // }
  6666. // },
  6667. // "path": "{project}/global/typeProviders/{typeProvider}",
  6668. // "response": {
  6669. // "$ref": "TypeProvider"
  6670. // },
  6671. // "scopes": [
  6672. // "https://www.googleapis.com/auth/cloud-platform",
  6673. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6674. // "https://www.googleapis.com/auth/ndev.cloudman",
  6675. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6676. // ]
  6677. // }
  6678. }
  6679. // method id "deploymentmanager.typeProviders.getType":
  6680. type TypeProvidersGetTypeCall struct {
  6681. s *Service
  6682. project string
  6683. typeProvider string
  6684. type_ string
  6685. urlParams_ gensupport.URLParams
  6686. ifNoneMatch_ string
  6687. ctx_ context.Context
  6688. header_ http.Header
  6689. }
  6690. // GetType: Gets a type info for a type provided by a TypeProvider.
  6691. func (r *TypeProvidersService) GetType(project string, typeProvider string, type_ string) *TypeProvidersGetTypeCall {
  6692. c := &TypeProvidersGetTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6693. c.project = project
  6694. c.typeProvider = typeProvider
  6695. c.type_ = type_
  6696. return c
  6697. }
  6698. // Fields allows partial responses to be retrieved. See
  6699. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6700. // for more information.
  6701. func (c *TypeProvidersGetTypeCall) Fields(s ...googleapi.Field) *TypeProvidersGetTypeCall {
  6702. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6703. return c
  6704. }
  6705. // IfNoneMatch sets the optional parameter which makes the operation
  6706. // fail if the object's ETag matches the given value. This is useful for
  6707. // getting updates only after the object has changed since the last
  6708. // request. Use googleapi.IsNotModified to check whether the response
  6709. // error from Do is the result of In-None-Match.
  6710. func (c *TypeProvidersGetTypeCall) IfNoneMatch(entityTag string) *TypeProvidersGetTypeCall {
  6711. c.ifNoneMatch_ = entityTag
  6712. return c
  6713. }
  6714. // Context sets the context to be used in this call's Do method. Any
  6715. // pending HTTP request will be aborted if the provided context is
  6716. // canceled.
  6717. func (c *TypeProvidersGetTypeCall) Context(ctx context.Context) *TypeProvidersGetTypeCall {
  6718. c.ctx_ = ctx
  6719. return c
  6720. }
  6721. // Header returns an http.Header that can be modified by the caller to
  6722. // add HTTP headers to the request.
  6723. func (c *TypeProvidersGetTypeCall) Header() http.Header {
  6724. if c.header_ == nil {
  6725. c.header_ = make(http.Header)
  6726. }
  6727. return c.header_
  6728. }
  6729. func (c *TypeProvidersGetTypeCall) doRequest(alt string) (*http.Response, error) {
  6730. reqHeaders := make(http.Header)
  6731. for k, v := range c.header_ {
  6732. reqHeaders[k] = v
  6733. }
  6734. reqHeaders.Set("User-Agent", c.s.userAgent())
  6735. if c.ifNoneMatch_ != "" {
  6736. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6737. }
  6738. var body io.Reader = nil
  6739. c.urlParams_.Set("alt", alt)
  6740. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types/{type}")
  6741. urls += "?" + c.urlParams_.Encode()
  6742. req, _ := http.NewRequest("GET", urls, body)
  6743. req.Header = reqHeaders
  6744. googleapi.Expand(req.URL, map[string]string{
  6745. "project": c.project,
  6746. "typeProvider": c.typeProvider,
  6747. "type": c.type_,
  6748. })
  6749. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6750. }
  6751. // Do executes the "deploymentmanager.typeProviders.getType" call.
  6752. // Exactly one of *TypeInfo or error will be non-nil. Any non-2xx status
  6753. // code is an error. Response headers are in either
  6754. // *TypeInfo.ServerResponse.Header or (if a response was returned at
  6755. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6756. // to check whether the returned error was because
  6757. // http.StatusNotModified was returned.
  6758. func (c *TypeProvidersGetTypeCall) Do(opts ...googleapi.CallOption) (*TypeInfo, error) {
  6759. gensupport.SetOptions(c.urlParams_, opts...)
  6760. res, err := c.doRequest("json")
  6761. if res != nil && res.StatusCode == http.StatusNotModified {
  6762. if res.Body != nil {
  6763. res.Body.Close()
  6764. }
  6765. return nil, &googleapi.Error{
  6766. Code: res.StatusCode,
  6767. Header: res.Header,
  6768. }
  6769. }
  6770. if err != nil {
  6771. return nil, err
  6772. }
  6773. defer googleapi.CloseBody(res)
  6774. if err := googleapi.CheckResponse(res); err != nil {
  6775. return nil, err
  6776. }
  6777. ret := &TypeInfo{
  6778. ServerResponse: googleapi.ServerResponse{
  6779. Header: res.Header,
  6780. HTTPStatusCode: res.StatusCode,
  6781. },
  6782. }
  6783. target := &ret
  6784. if err := gensupport.DecodeResponse(target, res); err != nil {
  6785. return nil, err
  6786. }
  6787. return ret, nil
  6788. // {
  6789. // "description": "Gets a type info for a type provided by a TypeProvider.",
  6790. // "httpMethod": "GET",
  6791. // "id": "deploymentmanager.typeProviders.getType",
  6792. // "parameterOrder": [
  6793. // "project",
  6794. // "typeProvider",
  6795. // "type"
  6796. // ],
  6797. // "parameters": {
  6798. // "project": {
  6799. // "description": "The project ID for this request.",
  6800. // "location": "path",
  6801. // "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])?))",
  6802. // "required": true,
  6803. // "type": "string"
  6804. // },
  6805. // "type": {
  6806. // "description": "The name of the type provider type for this request.",
  6807. // "location": "path",
  6808. // "required": true,
  6809. // "type": "string"
  6810. // },
  6811. // "typeProvider": {
  6812. // "description": "The name of the type provider for this request.",
  6813. // "location": "path",
  6814. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  6815. // "required": true,
  6816. // "type": "string"
  6817. // }
  6818. // },
  6819. // "path": "{project}/global/typeProviders/{typeProvider}/types/{type}",
  6820. // "response": {
  6821. // "$ref": "TypeInfo"
  6822. // },
  6823. // "scopes": [
  6824. // "https://www.googleapis.com/auth/cloud-platform",
  6825. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  6826. // "https://www.googleapis.com/auth/ndev.cloudman",
  6827. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  6828. // ]
  6829. // }
  6830. }
  6831. // method id "deploymentmanager.typeProviders.insert":
  6832. type TypeProvidersInsertCall struct {
  6833. s *Service
  6834. project string
  6835. typeprovider *TypeProvider
  6836. urlParams_ gensupport.URLParams
  6837. ctx_ context.Context
  6838. header_ http.Header
  6839. }
  6840. // Insert: Creates a type provider.
  6841. func (r *TypeProvidersService) Insert(project string, typeprovider *TypeProvider) *TypeProvidersInsertCall {
  6842. c := &TypeProvidersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6843. c.project = project
  6844. c.typeprovider = typeprovider
  6845. return c
  6846. }
  6847. // Fields allows partial responses to be retrieved. See
  6848. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6849. // for more information.
  6850. func (c *TypeProvidersInsertCall) Fields(s ...googleapi.Field) *TypeProvidersInsertCall {
  6851. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6852. return c
  6853. }
  6854. // Context sets the context to be used in this call's Do method. Any
  6855. // pending HTTP request will be aborted if the provided context is
  6856. // canceled.
  6857. func (c *TypeProvidersInsertCall) Context(ctx context.Context) *TypeProvidersInsertCall {
  6858. c.ctx_ = ctx
  6859. return c
  6860. }
  6861. // Header returns an http.Header that can be modified by the caller to
  6862. // add HTTP headers to the request.
  6863. func (c *TypeProvidersInsertCall) Header() http.Header {
  6864. if c.header_ == nil {
  6865. c.header_ = make(http.Header)
  6866. }
  6867. return c.header_
  6868. }
  6869. func (c *TypeProvidersInsertCall) doRequest(alt string) (*http.Response, error) {
  6870. reqHeaders := make(http.Header)
  6871. for k, v := range c.header_ {
  6872. reqHeaders[k] = v
  6873. }
  6874. reqHeaders.Set("User-Agent", c.s.userAgent())
  6875. var body io.Reader = nil
  6876. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  6877. if err != nil {
  6878. return nil, err
  6879. }
  6880. reqHeaders.Set("Content-Type", "application/json")
  6881. c.urlParams_.Set("alt", alt)
  6882. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders")
  6883. urls += "?" + c.urlParams_.Encode()
  6884. req, _ := http.NewRequest("POST", urls, body)
  6885. req.Header = reqHeaders
  6886. googleapi.Expand(req.URL, map[string]string{
  6887. "project": c.project,
  6888. })
  6889. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6890. }
  6891. // Do executes the "deploymentmanager.typeProviders.insert" call.
  6892. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6893. // status code is an error. Response headers are in either
  6894. // *Operation.ServerResponse.Header or (if a response was returned at
  6895. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6896. // to check whether the returned error was because
  6897. // http.StatusNotModified was returned.
  6898. func (c *TypeProvidersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6899. gensupport.SetOptions(c.urlParams_, opts...)
  6900. res, err := c.doRequest("json")
  6901. if res != nil && res.StatusCode == http.StatusNotModified {
  6902. if res.Body != nil {
  6903. res.Body.Close()
  6904. }
  6905. return nil, &googleapi.Error{
  6906. Code: res.StatusCode,
  6907. Header: res.Header,
  6908. }
  6909. }
  6910. if err != nil {
  6911. return nil, err
  6912. }
  6913. defer googleapi.CloseBody(res)
  6914. if err := googleapi.CheckResponse(res); err != nil {
  6915. return nil, err
  6916. }
  6917. ret := &Operation{
  6918. ServerResponse: googleapi.ServerResponse{
  6919. Header: res.Header,
  6920. HTTPStatusCode: res.StatusCode,
  6921. },
  6922. }
  6923. target := &ret
  6924. if err := gensupport.DecodeResponse(target, res); err != nil {
  6925. return nil, err
  6926. }
  6927. return ret, nil
  6928. // {
  6929. // "description": "Creates a type provider.",
  6930. // "httpMethod": "POST",
  6931. // "id": "deploymentmanager.typeProviders.insert",
  6932. // "parameterOrder": [
  6933. // "project"
  6934. // ],
  6935. // "parameters": {
  6936. // "project": {
  6937. // "description": "The project ID for this request.",
  6938. // "location": "path",
  6939. // "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])?))",
  6940. // "required": true,
  6941. // "type": "string"
  6942. // }
  6943. // },
  6944. // "path": "{project}/global/typeProviders",
  6945. // "request": {
  6946. // "$ref": "TypeProvider"
  6947. // },
  6948. // "response": {
  6949. // "$ref": "Operation"
  6950. // },
  6951. // "scopes": [
  6952. // "https://www.googleapis.com/auth/cloud-platform",
  6953. // "https://www.googleapis.com/auth/ndev.cloudman"
  6954. // ]
  6955. // }
  6956. }
  6957. // method id "deploymentmanager.typeProviders.list":
  6958. type TypeProvidersListCall struct {
  6959. s *Service
  6960. project string
  6961. urlParams_ gensupport.URLParams
  6962. ifNoneMatch_ string
  6963. ctx_ context.Context
  6964. header_ http.Header
  6965. }
  6966. // List: Lists all resource type providers for Deployment Manager.
  6967. func (r *TypeProvidersService) List(project string) *TypeProvidersListCall {
  6968. c := &TypeProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6969. c.project = project
  6970. return c
  6971. }
  6972. // Filter sets the optional parameter "filter": A filter expression that
  6973. // filters resources listed in the response. The expression must specify
  6974. // the field name, a comparison operator, and the value that you want to
  6975. // use for filtering. The value must be a string, a number, or a
  6976. // boolean. The comparison operator must be either =, !=, >, or <.
  6977. //
  6978. // For example, if you are filtering Compute Engine instances, you can
  6979. // exclude instances named example-instance by specifying name !=
  6980. // example-instance.
  6981. //
  6982. // You can also filter nested fields. For example, you could specify
  6983. // scheduling.automaticRestart = false to include instances only if they
  6984. // are not scheduled for automatic restarts. You can use filtering on
  6985. // nested fields to filter based on resource labels.
  6986. //
  6987. // To filter on multiple expressions, provide each separate expression
  6988. // within parentheses. For example, (scheduling.automaticRestart = true)
  6989. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  6990. // AND expression. However, you can include AND and OR expressions
  6991. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  6992. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  6993. // true).
  6994. func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall {
  6995. c.urlParams_.Set("filter", filter)
  6996. return c
  6997. }
  6998. // MaxResults sets the optional parameter "maxResults": The maximum
  6999. // number of results per page that should be returned. If the number of
  7000. // available results is larger than maxResults, Compute Engine returns a
  7001. // nextPageToken that can be used to get the next page of results in
  7002. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7003. // (Default: 500)
  7004. func (c *TypeProvidersListCall) MaxResults(maxResults int64) *TypeProvidersListCall {
  7005. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7006. return c
  7007. }
  7008. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7009. // a certain order. By default, results are returned in alphanumerical
  7010. // order based on the resource name.
  7011. //
  7012. // You can also sort results in descending order based on the creation
  7013. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7014. // based on the creationTimestamp field in reverse chronological order
  7015. // (newest result first). Use this to sort resources like operations so
  7016. // that the newest operation is returned first.
  7017. //
  7018. // Currently, only sorting by name or creationTimestamp desc is
  7019. // supported.
  7020. func (c *TypeProvidersListCall) OrderBy(orderBy string) *TypeProvidersListCall {
  7021. c.urlParams_.Set("orderBy", orderBy)
  7022. return c
  7023. }
  7024. // PageToken sets the optional parameter "pageToken": Specifies a page
  7025. // token to use. Set pageToken to the nextPageToken returned by a
  7026. // previous list request to get the next page of results.
  7027. func (c *TypeProvidersListCall) PageToken(pageToken string) *TypeProvidersListCall {
  7028. c.urlParams_.Set("pageToken", pageToken)
  7029. return c
  7030. }
  7031. // Fields allows partial responses to be retrieved. See
  7032. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7033. // for more information.
  7034. func (c *TypeProvidersListCall) Fields(s ...googleapi.Field) *TypeProvidersListCall {
  7035. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7036. return c
  7037. }
  7038. // IfNoneMatch sets the optional parameter which makes the operation
  7039. // fail if the object's ETag matches the given value. This is useful for
  7040. // getting updates only after the object has changed since the last
  7041. // request. Use googleapi.IsNotModified to check whether the response
  7042. // error from Do is the result of In-None-Match.
  7043. func (c *TypeProvidersListCall) IfNoneMatch(entityTag string) *TypeProvidersListCall {
  7044. c.ifNoneMatch_ = entityTag
  7045. return c
  7046. }
  7047. // Context sets the context to be used in this call's Do method. Any
  7048. // pending HTTP request will be aborted if the provided context is
  7049. // canceled.
  7050. func (c *TypeProvidersListCall) Context(ctx context.Context) *TypeProvidersListCall {
  7051. c.ctx_ = ctx
  7052. return c
  7053. }
  7054. // Header returns an http.Header that can be modified by the caller to
  7055. // add HTTP headers to the request.
  7056. func (c *TypeProvidersListCall) Header() http.Header {
  7057. if c.header_ == nil {
  7058. c.header_ = make(http.Header)
  7059. }
  7060. return c.header_
  7061. }
  7062. func (c *TypeProvidersListCall) doRequest(alt string) (*http.Response, error) {
  7063. reqHeaders := make(http.Header)
  7064. for k, v := range c.header_ {
  7065. reqHeaders[k] = v
  7066. }
  7067. reqHeaders.Set("User-Agent", c.s.userAgent())
  7068. if c.ifNoneMatch_ != "" {
  7069. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7070. }
  7071. var body io.Reader = nil
  7072. c.urlParams_.Set("alt", alt)
  7073. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders")
  7074. urls += "?" + c.urlParams_.Encode()
  7075. req, _ := http.NewRequest("GET", urls, body)
  7076. req.Header = reqHeaders
  7077. googleapi.Expand(req.URL, map[string]string{
  7078. "project": c.project,
  7079. })
  7080. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7081. }
  7082. // Do executes the "deploymentmanager.typeProviders.list" call.
  7083. // Exactly one of *TypeProvidersListResponse or error will be non-nil.
  7084. // Any non-2xx status code is an error. Response headers are in either
  7085. // *TypeProvidersListResponse.ServerResponse.Header or (if a response
  7086. // was returned at all) in error.(*googleapi.Error).Header. Use
  7087. // googleapi.IsNotModified to check whether the returned error was
  7088. // because http.StatusNotModified was returned.
  7089. func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListResponse, error) {
  7090. gensupport.SetOptions(c.urlParams_, opts...)
  7091. res, err := c.doRequest("json")
  7092. if res != nil && res.StatusCode == http.StatusNotModified {
  7093. if res.Body != nil {
  7094. res.Body.Close()
  7095. }
  7096. return nil, &googleapi.Error{
  7097. Code: res.StatusCode,
  7098. Header: res.Header,
  7099. }
  7100. }
  7101. if err != nil {
  7102. return nil, err
  7103. }
  7104. defer googleapi.CloseBody(res)
  7105. if err := googleapi.CheckResponse(res); err != nil {
  7106. return nil, err
  7107. }
  7108. ret := &TypeProvidersListResponse{
  7109. ServerResponse: googleapi.ServerResponse{
  7110. Header: res.Header,
  7111. HTTPStatusCode: res.StatusCode,
  7112. },
  7113. }
  7114. target := &ret
  7115. if err := gensupport.DecodeResponse(target, res); err != nil {
  7116. return nil, err
  7117. }
  7118. return ret, nil
  7119. // {
  7120. // "description": "Lists all resource type providers for Deployment Manager.",
  7121. // "httpMethod": "GET",
  7122. // "id": "deploymentmanager.typeProviders.list",
  7123. // "parameterOrder": [
  7124. // "project"
  7125. // ],
  7126. // "parameters": {
  7127. // "filter": {
  7128. // "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).",
  7129. // "location": "query",
  7130. // "type": "string"
  7131. // },
  7132. // "maxResults": {
  7133. // "default": "500",
  7134. // "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)",
  7135. // "format": "uint32",
  7136. // "location": "query",
  7137. // "minimum": "0",
  7138. // "type": "integer"
  7139. // },
  7140. // "orderBy": {
  7141. // "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.",
  7142. // "location": "query",
  7143. // "type": "string"
  7144. // },
  7145. // "pageToken": {
  7146. // "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.",
  7147. // "location": "query",
  7148. // "type": "string"
  7149. // },
  7150. // "project": {
  7151. // "description": "The project ID for this request.",
  7152. // "location": "path",
  7153. // "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])?))",
  7154. // "required": true,
  7155. // "type": "string"
  7156. // }
  7157. // },
  7158. // "path": "{project}/global/typeProviders",
  7159. // "response": {
  7160. // "$ref": "TypeProvidersListResponse"
  7161. // },
  7162. // "scopes": [
  7163. // "https://www.googleapis.com/auth/cloud-platform",
  7164. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7165. // "https://www.googleapis.com/auth/ndev.cloudman",
  7166. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7167. // ]
  7168. // }
  7169. }
  7170. // Pages invokes f for each page of results.
  7171. // A non-nil error returned from f will halt the iteration.
  7172. // The provided context supersedes any context provided to the Context method.
  7173. func (c *TypeProvidersListCall) Pages(ctx context.Context, f func(*TypeProvidersListResponse) error) error {
  7174. c.ctx_ = ctx
  7175. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7176. for {
  7177. x, err := c.Do()
  7178. if err != nil {
  7179. return err
  7180. }
  7181. if err := f(x); err != nil {
  7182. return err
  7183. }
  7184. if x.NextPageToken == "" {
  7185. return nil
  7186. }
  7187. c.PageToken(x.NextPageToken)
  7188. }
  7189. }
  7190. // method id "deploymentmanager.typeProviders.listTypes":
  7191. type TypeProvidersListTypesCall struct {
  7192. s *Service
  7193. project string
  7194. typeProvider string
  7195. urlParams_ gensupport.URLParams
  7196. ifNoneMatch_ string
  7197. ctx_ context.Context
  7198. header_ http.Header
  7199. }
  7200. // ListTypes: Lists all the type info for a TypeProvider.
  7201. func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *TypeProvidersListTypesCall {
  7202. c := &TypeProvidersListTypesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7203. c.project = project
  7204. c.typeProvider = typeProvider
  7205. return c
  7206. }
  7207. // Filter sets the optional parameter "filter": A filter expression that
  7208. // filters resources listed in the response. The expression must specify
  7209. // the field name, a comparison operator, and the value that you want to
  7210. // use for filtering. The value must be a string, a number, or a
  7211. // boolean. The comparison operator must be either =, !=, >, or <.
  7212. //
  7213. // For example, if you are filtering Compute Engine instances, you can
  7214. // exclude instances named example-instance by specifying name !=
  7215. // example-instance.
  7216. //
  7217. // You can also filter nested fields. For example, you could specify
  7218. // scheduling.automaticRestart = false to include instances only if they
  7219. // are not scheduled for automatic restarts. You can use filtering on
  7220. // nested fields to filter based on resource labels.
  7221. //
  7222. // To filter on multiple expressions, provide each separate expression
  7223. // within parentheses. For example, (scheduling.automaticRestart = true)
  7224. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7225. // AND expression. However, you can include AND and OR expressions
  7226. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7227. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7228. // true).
  7229. func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall {
  7230. c.urlParams_.Set("filter", filter)
  7231. return c
  7232. }
  7233. // MaxResults sets the optional parameter "maxResults": The maximum
  7234. // number of results per page that should be returned. If the number of
  7235. // available results is larger than maxResults, Compute Engine returns a
  7236. // nextPageToken that can be used to get the next page of results in
  7237. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7238. // (Default: 500)
  7239. func (c *TypeProvidersListTypesCall) MaxResults(maxResults int64) *TypeProvidersListTypesCall {
  7240. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7241. return c
  7242. }
  7243. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7244. // a certain order. By default, results are returned in alphanumerical
  7245. // order based on the resource name.
  7246. //
  7247. // You can also sort results in descending order based on the creation
  7248. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7249. // based on the creationTimestamp field in reverse chronological order
  7250. // (newest result first). Use this to sort resources like operations so
  7251. // that the newest operation is returned first.
  7252. //
  7253. // Currently, only sorting by name or creationTimestamp desc is
  7254. // supported.
  7255. func (c *TypeProvidersListTypesCall) OrderBy(orderBy string) *TypeProvidersListTypesCall {
  7256. c.urlParams_.Set("orderBy", orderBy)
  7257. return c
  7258. }
  7259. // PageToken sets the optional parameter "pageToken": Specifies a page
  7260. // token to use. Set pageToken to the nextPageToken returned by a
  7261. // previous list request to get the next page of results.
  7262. func (c *TypeProvidersListTypesCall) PageToken(pageToken string) *TypeProvidersListTypesCall {
  7263. c.urlParams_.Set("pageToken", pageToken)
  7264. return c
  7265. }
  7266. // Fields allows partial responses to be retrieved. See
  7267. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7268. // for more information.
  7269. func (c *TypeProvidersListTypesCall) Fields(s ...googleapi.Field) *TypeProvidersListTypesCall {
  7270. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7271. return c
  7272. }
  7273. // IfNoneMatch sets the optional parameter which makes the operation
  7274. // fail if the object's ETag matches the given value. This is useful for
  7275. // getting updates only after the object has changed since the last
  7276. // request. Use googleapi.IsNotModified to check whether the response
  7277. // error from Do is the result of In-None-Match.
  7278. func (c *TypeProvidersListTypesCall) IfNoneMatch(entityTag string) *TypeProvidersListTypesCall {
  7279. c.ifNoneMatch_ = entityTag
  7280. return c
  7281. }
  7282. // Context sets the context to be used in this call's Do method. Any
  7283. // pending HTTP request will be aborted if the provided context is
  7284. // canceled.
  7285. func (c *TypeProvidersListTypesCall) Context(ctx context.Context) *TypeProvidersListTypesCall {
  7286. c.ctx_ = ctx
  7287. return c
  7288. }
  7289. // Header returns an http.Header that can be modified by the caller to
  7290. // add HTTP headers to the request.
  7291. func (c *TypeProvidersListTypesCall) Header() http.Header {
  7292. if c.header_ == nil {
  7293. c.header_ = make(http.Header)
  7294. }
  7295. return c.header_
  7296. }
  7297. func (c *TypeProvidersListTypesCall) doRequest(alt string) (*http.Response, error) {
  7298. reqHeaders := make(http.Header)
  7299. for k, v := range c.header_ {
  7300. reqHeaders[k] = v
  7301. }
  7302. reqHeaders.Set("User-Agent", c.s.userAgent())
  7303. if c.ifNoneMatch_ != "" {
  7304. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7305. }
  7306. var body io.Reader = nil
  7307. c.urlParams_.Set("alt", alt)
  7308. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types")
  7309. urls += "?" + c.urlParams_.Encode()
  7310. req, _ := http.NewRequest("GET", urls, body)
  7311. req.Header = reqHeaders
  7312. googleapi.Expand(req.URL, map[string]string{
  7313. "project": c.project,
  7314. "typeProvider": c.typeProvider,
  7315. })
  7316. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7317. }
  7318. // Do executes the "deploymentmanager.typeProviders.listTypes" call.
  7319. // Exactly one of *TypeProvidersListTypesResponse or error will be
  7320. // non-nil. Any non-2xx status code is an error. Response headers are in
  7321. // either *TypeProvidersListTypesResponse.ServerResponse.Header or (if a
  7322. // response was returned at all) in error.(*googleapi.Error).Header. Use
  7323. // googleapi.IsNotModified to check whether the returned error was
  7324. // because http.StatusNotModified was returned.
  7325. func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListTypesResponse, error) {
  7326. gensupport.SetOptions(c.urlParams_, opts...)
  7327. res, err := c.doRequest("json")
  7328. if res != nil && res.StatusCode == http.StatusNotModified {
  7329. if res.Body != nil {
  7330. res.Body.Close()
  7331. }
  7332. return nil, &googleapi.Error{
  7333. Code: res.StatusCode,
  7334. Header: res.Header,
  7335. }
  7336. }
  7337. if err != nil {
  7338. return nil, err
  7339. }
  7340. defer googleapi.CloseBody(res)
  7341. if err := googleapi.CheckResponse(res); err != nil {
  7342. return nil, err
  7343. }
  7344. ret := &TypeProvidersListTypesResponse{
  7345. ServerResponse: googleapi.ServerResponse{
  7346. Header: res.Header,
  7347. HTTPStatusCode: res.StatusCode,
  7348. },
  7349. }
  7350. target := &ret
  7351. if err := gensupport.DecodeResponse(target, res); err != nil {
  7352. return nil, err
  7353. }
  7354. return ret, nil
  7355. // {
  7356. // "description": "Lists all the type info for a TypeProvider.",
  7357. // "httpMethod": "GET",
  7358. // "id": "deploymentmanager.typeProviders.listTypes",
  7359. // "parameterOrder": [
  7360. // "project",
  7361. // "typeProvider"
  7362. // ],
  7363. // "parameters": {
  7364. // "filter": {
  7365. // "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).",
  7366. // "location": "query",
  7367. // "type": "string"
  7368. // },
  7369. // "maxResults": {
  7370. // "default": "500",
  7371. // "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)",
  7372. // "format": "uint32",
  7373. // "location": "query",
  7374. // "minimum": "0",
  7375. // "type": "integer"
  7376. // },
  7377. // "orderBy": {
  7378. // "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.",
  7379. // "location": "query",
  7380. // "type": "string"
  7381. // },
  7382. // "pageToken": {
  7383. // "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.",
  7384. // "location": "query",
  7385. // "type": "string"
  7386. // },
  7387. // "project": {
  7388. // "description": "The project ID for this request.",
  7389. // "location": "path",
  7390. // "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])?))",
  7391. // "required": true,
  7392. // "type": "string"
  7393. // },
  7394. // "typeProvider": {
  7395. // "description": "The name of the type provider for this request.",
  7396. // "location": "path",
  7397. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7398. // "required": true,
  7399. // "type": "string"
  7400. // }
  7401. // },
  7402. // "path": "{project}/global/typeProviders/{typeProvider}/types",
  7403. // "response": {
  7404. // "$ref": "TypeProvidersListTypesResponse"
  7405. // },
  7406. // "scopes": [
  7407. // "https://www.googleapis.com/auth/cloud-platform",
  7408. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7409. // "https://www.googleapis.com/auth/ndev.cloudman",
  7410. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7411. // ]
  7412. // }
  7413. }
  7414. // Pages invokes f for each page of results.
  7415. // A non-nil error returned from f will halt the iteration.
  7416. // The provided context supersedes any context provided to the Context method.
  7417. func (c *TypeProvidersListTypesCall) Pages(ctx context.Context, f func(*TypeProvidersListTypesResponse) error) error {
  7418. c.ctx_ = ctx
  7419. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7420. for {
  7421. x, err := c.Do()
  7422. if err != nil {
  7423. return err
  7424. }
  7425. if err := f(x); err != nil {
  7426. return err
  7427. }
  7428. if x.NextPageToken == "" {
  7429. return nil
  7430. }
  7431. c.PageToken(x.NextPageToken)
  7432. }
  7433. }
  7434. // method id "deploymentmanager.typeProviders.patch":
  7435. type TypeProvidersPatchCall struct {
  7436. s *Service
  7437. project string
  7438. typeProvider string
  7439. typeprovider *TypeProvider
  7440. urlParams_ gensupport.URLParams
  7441. ctx_ context.Context
  7442. header_ http.Header
  7443. }
  7444. // Patch: Updates a type provider. This method supports patch semantics.
  7445. func (r *TypeProvidersService) Patch(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersPatchCall {
  7446. c := &TypeProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7447. c.project = project
  7448. c.typeProvider = typeProvider
  7449. c.typeprovider = typeprovider
  7450. return c
  7451. }
  7452. // Fields allows partial responses to be retrieved. See
  7453. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7454. // for more information.
  7455. func (c *TypeProvidersPatchCall) Fields(s ...googleapi.Field) *TypeProvidersPatchCall {
  7456. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7457. return c
  7458. }
  7459. // Context sets the context to be used in this call's Do method. Any
  7460. // pending HTTP request will be aborted if the provided context is
  7461. // canceled.
  7462. func (c *TypeProvidersPatchCall) Context(ctx context.Context) *TypeProvidersPatchCall {
  7463. c.ctx_ = ctx
  7464. return c
  7465. }
  7466. // Header returns an http.Header that can be modified by the caller to
  7467. // add HTTP headers to the request.
  7468. func (c *TypeProvidersPatchCall) Header() http.Header {
  7469. if c.header_ == nil {
  7470. c.header_ = make(http.Header)
  7471. }
  7472. return c.header_
  7473. }
  7474. func (c *TypeProvidersPatchCall) doRequest(alt string) (*http.Response, error) {
  7475. reqHeaders := make(http.Header)
  7476. for k, v := range c.header_ {
  7477. reqHeaders[k] = v
  7478. }
  7479. reqHeaders.Set("User-Agent", c.s.userAgent())
  7480. var body io.Reader = nil
  7481. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7482. if err != nil {
  7483. return nil, err
  7484. }
  7485. reqHeaders.Set("Content-Type", "application/json")
  7486. c.urlParams_.Set("alt", alt)
  7487. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  7488. urls += "?" + c.urlParams_.Encode()
  7489. req, _ := http.NewRequest("PATCH", urls, body)
  7490. req.Header = reqHeaders
  7491. googleapi.Expand(req.URL, map[string]string{
  7492. "project": c.project,
  7493. "typeProvider": c.typeProvider,
  7494. })
  7495. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7496. }
  7497. // Do executes the "deploymentmanager.typeProviders.patch" call.
  7498. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7499. // status code is an error. Response headers are in either
  7500. // *Operation.ServerResponse.Header or (if a response was returned at
  7501. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7502. // to check whether the returned error was because
  7503. // http.StatusNotModified was returned.
  7504. func (c *TypeProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7505. gensupport.SetOptions(c.urlParams_, opts...)
  7506. res, err := c.doRequest("json")
  7507. if res != nil && res.StatusCode == http.StatusNotModified {
  7508. if res.Body != nil {
  7509. res.Body.Close()
  7510. }
  7511. return nil, &googleapi.Error{
  7512. Code: res.StatusCode,
  7513. Header: res.Header,
  7514. }
  7515. }
  7516. if err != nil {
  7517. return nil, err
  7518. }
  7519. defer googleapi.CloseBody(res)
  7520. if err := googleapi.CheckResponse(res); err != nil {
  7521. return nil, err
  7522. }
  7523. ret := &Operation{
  7524. ServerResponse: googleapi.ServerResponse{
  7525. Header: res.Header,
  7526. HTTPStatusCode: res.StatusCode,
  7527. },
  7528. }
  7529. target := &ret
  7530. if err := gensupport.DecodeResponse(target, res); err != nil {
  7531. return nil, err
  7532. }
  7533. return ret, nil
  7534. // {
  7535. // "description": "Updates a type provider. This method supports patch semantics.",
  7536. // "httpMethod": "PATCH",
  7537. // "id": "deploymentmanager.typeProviders.patch",
  7538. // "parameterOrder": [
  7539. // "project",
  7540. // "typeProvider"
  7541. // ],
  7542. // "parameters": {
  7543. // "project": {
  7544. // "description": "The project ID for this request.",
  7545. // "location": "path",
  7546. // "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])?))",
  7547. // "required": true,
  7548. // "type": "string"
  7549. // },
  7550. // "typeProvider": {
  7551. // "description": "The name of the type provider for this request.",
  7552. // "location": "path",
  7553. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7554. // "required": true,
  7555. // "type": "string"
  7556. // }
  7557. // },
  7558. // "path": "{project}/global/typeProviders/{typeProvider}",
  7559. // "request": {
  7560. // "$ref": "TypeProvider"
  7561. // },
  7562. // "response": {
  7563. // "$ref": "Operation"
  7564. // },
  7565. // "scopes": [
  7566. // "https://www.googleapis.com/auth/cloud-platform",
  7567. // "https://www.googleapis.com/auth/ndev.cloudman"
  7568. // ]
  7569. // }
  7570. }
  7571. // method id "deploymentmanager.typeProviders.update":
  7572. type TypeProvidersUpdateCall struct {
  7573. s *Service
  7574. project string
  7575. typeProvider string
  7576. typeprovider *TypeProvider
  7577. urlParams_ gensupport.URLParams
  7578. ctx_ context.Context
  7579. header_ http.Header
  7580. }
  7581. // Update: Updates a type provider.
  7582. func (r *TypeProvidersService) Update(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersUpdateCall {
  7583. c := &TypeProvidersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7584. c.project = project
  7585. c.typeProvider = typeProvider
  7586. c.typeprovider = typeprovider
  7587. return c
  7588. }
  7589. // Fields allows partial responses to be retrieved. See
  7590. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7591. // for more information.
  7592. func (c *TypeProvidersUpdateCall) Fields(s ...googleapi.Field) *TypeProvidersUpdateCall {
  7593. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7594. return c
  7595. }
  7596. // Context sets the context to be used in this call's Do method. Any
  7597. // pending HTTP request will be aborted if the provided context is
  7598. // canceled.
  7599. func (c *TypeProvidersUpdateCall) Context(ctx context.Context) *TypeProvidersUpdateCall {
  7600. c.ctx_ = ctx
  7601. return c
  7602. }
  7603. // Header returns an http.Header that can be modified by the caller to
  7604. // add HTTP headers to the request.
  7605. func (c *TypeProvidersUpdateCall) Header() http.Header {
  7606. if c.header_ == nil {
  7607. c.header_ = make(http.Header)
  7608. }
  7609. return c.header_
  7610. }
  7611. func (c *TypeProvidersUpdateCall) doRequest(alt string) (*http.Response, error) {
  7612. reqHeaders := make(http.Header)
  7613. for k, v := range c.header_ {
  7614. reqHeaders[k] = v
  7615. }
  7616. reqHeaders.Set("User-Agent", c.s.userAgent())
  7617. var body io.Reader = nil
  7618. body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider)
  7619. if err != nil {
  7620. return nil, err
  7621. }
  7622. reqHeaders.Set("Content-Type", "application/json")
  7623. c.urlParams_.Set("alt", alt)
  7624. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}")
  7625. urls += "?" + c.urlParams_.Encode()
  7626. req, _ := http.NewRequest("PUT", urls, body)
  7627. req.Header = reqHeaders
  7628. googleapi.Expand(req.URL, map[string]string{
  7629. "project": c.project,
  7630. "typeProvider": c.typeProvider,
  7631. })
  7632. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7633. }
  7634. // Do executes the "deploymentmanager.typeProviders.update" call.
  7635. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7636. // status code is an error. Response headers are in either
  7637. // *Operation.ServerResponse.Header or (if a response was returned at
  7638. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7639. // to check whether the returned error was because
  7640. // http.StatusNotModified was returned.
  7641. func (c *TypeProvidersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7642. gensupport.SetOptions(c.urlParams_, opts...)
  7643. res, err := c.doRequest("json")
  7644. if res != nil && res.StatusCode == http.StatusNotModified {
  7645. if res.Body != nil {
  7646. res.Body.Close()
  7647. }
  7648. return nil, &googleapi.Error{
  7649. Code: res.StatusCode,
  7650. Header: res.Header,
  7651. }
  7652. }
  7653. if err != nil {
  7654. return nil, err
  7655. }
  7656. defer googleapi.CloseBody(res)
  7657. if err := googleapi.CheckResponse(res); err != nil {
  7658. return nil, err
  7659. }
  7660. ret := &Operation{
  7661. ServerResponse: googleapi.ServerResponse{
  7662. Header: res.Header,
  7663. HTTPStatusCode: res.StatusCode,
  7664. },
  7665. }
  7666. target := &ret
  7667. if err := gensupport.DecodeResponse(target, res); err != nil {
  7668. return nil, err
  7669. }
  7670. return ret, nil
  7671. // {
  7672. // "description": "Updates a type provider.",
  7673. // "httpMethod": "PUT",
  7674. // "id": "deploymentmanager.typeProviders.update",
  7675. // "parameterOrder": [
  7676. // "project",
  7677. // "typeProvider"
  7678. // ],
  7679. // "parameters": {
  7680. // "project": {
  7681. // "description": "The project ID for this request.",
  7682. // "location": "path",
  7683. // "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])?))",
  7684. // "required": true,
  7685. // "type": "string"
  7686. // },
  7687. // "typeProvider": {
  7688. // "description": "The name of the type provider for this request.",
  7689. // "location": "path",
  7690. // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
  7691. // "required": true,
  7692. // "type": "string"
  7693. // }
  7694. // },
  7695. // "path": "{project}/global/typeProviders/{typeProvider}",
  7696. // "request": {
  7697. // "$ref": "TypeProvider"
  7698. // },
  7699. // "response": {
  7700. // "$ref": "Operation"
  7701. // },
  7702. // "scopes": [
  7703. // "https://www.googleapis.com/auth/cloud-platform",
  7704. // "https://www.googleapis.com/auth/ndev.cloudman"
  7705. // ]
  7706. // }
  7707. }
  7708. // method id "deploymentmanager.types.list":
  7709. type TypesListCall struct {
  7710. s *Service
  7711. project string
  7712. urlParams_ gensupport.URLParams
  7713. ifNoneMatch_ string
  7714. ctx_ context.Context
  7715. header_ http.Header
  7716. }
  7717. // List: Lists all resource types for Deployment Manager.
  7718. func (r *TypesService) List(project string) *TypesListCall {
  7719. c := &TypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7720. c.project = project
  7721. return c
  7722. }
  7723. // Filter sets the optional parameter "filter": A filter expression that
  7724. // filters resources listed in the response. The expression must specify
  7725. // the field name, a comparison operator, and the value that you want to
  7726. // use for filtering. The value must be a string, a number, or a
  7727. // boolean. The comparison operator must be either =, !=, >, or <.
  7728. //
  7729. // For example, if you are filtering Compute Engine instances, you can
  7730. // exclude instances named example-instance by specifying name !=
  7731. // example-instance.
  7732. //
  7733. // You can also filter nested fields. For example, you could specify
  7734. // scheduling.automaticRestart = false to include instances only if they
  7735. // are not scheduled for automatic restarts. You can use filtering on
  7736. // nested fields to filter based on resource labels.
  7737. //
  7738. // To filter on multiple expressions, provide each separate expression
  7739. // within parentheses. For example, (scheduling.automaticRestart = true)
  7740. // (cpuPlatform = "Intel Skylake"). By default, each expression is an
  7741. // AND expression. However, you can include AND and OR expressions
  7742. // explicitly. For example, (cpuPlatform = "Intel Skylake") OR
  7743. // (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
  7744. // true).
  7745. func (c *TypesListCall) Filter(filter string) *TypesListCall {
  7746. c.urlParams_.Set("filter", filter)
  7747. return c
  7748. }
  7749. // MaxResults sets the optional parameter "maxResults": The maximum
  7750. // number of results per page that should be returned. If the number of
  7751. // available results is larger than maxResults, Compute Engine returns a
  7752. // nextPageToken that can be used to get the next page of results in
  7753. // subsequent list requests. Acceptable values are 0 to 500, inclusive.
  7754. // (Default: 500)
  7755. func (c *TypesListCall) MaxResults(maxResults int64) *TypesListCall {
  7756. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7757. return c
  7758. }
  7759. // OrderBy sets the optional parameter "orderBy": Sorts list results by
  7760. // a certain order. By default, results are returned in alphanumerical
  7761. // order based on the resource name.
  7762. //
  7763. // You can also sort results in descending order based on the creation
  7764. // timestamp using orderBy="creationTimestamp desc". This sorts results
  7765. // based on the creationTimestamp field in reverse chronological order
  7766. // (newest result first). Use this to sort resources like operations so
  7767. // that the newest operation is returned first.
  7768. //
  7769. // Currently, only sorting by name or creationTimestamp desc is
  7770. // supported.
  7771. func (c *TypesListCall) OrderBy(orderBy string) *TypesListCall {
  7772. c.urlParams_.Set("orderBy", orderBy)
  7773. return c
  7774. }
  7775. // PageToken sets the optional parameter "pageToken": Specifies a page
  7776. // token to use. Set pageToken to the nextPageToken returned by a
  7777. // previous list request to get the next page of results.
  7778. func (c *TypesListCall) PageToken(pageToken string) *TypesListCall {
  7779. c.urlParams_.Set("pageToken", pageToken)
  7780. return c
  7781. }
  7782. // Fields allows partial responses to be retrieved. See
  7783. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7784. // for more information.
  7785. func (c *TypesListCall) Fields(s ...googleapi.Field) *TypesListCall {
  7786. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7787. return c
  7788. }
  7789. // IfNoneMatch sets the optional parameter which makes the operation
  7790. // fail if the object's ETag matches the given value. This is useful for
  7791. // getting updates only after the object has changed since the last
  7792. // request. Use googleapi.IsNotModified to check whether the response
  7793. // error from Do is the result of In-None-Match.
  7794. func (c *TypesListCall) IfNoneMatch(entityTag string) *TypesListCall {
  7795. c.ifNoneMatch_ = entityTag
  7796. return c
  7797. }
  7798. // Context sets the context to be used in this call's Do method. Any
  7799. // pending HTTP request will be aborted if the provided context is
  7800. // canceled.
  7801. func (c *TypesListCall) Context(ctx context.Context) *TypesListCall {
  7802. c.ctx_ = ctx
  7803. return c
  7804. }
  7805. // Header returns an http.Header that can be modified by the caller to
  7806. // add HTTP headers to the request.
  7807. func (c *TypesListCall) Header() http.Header {
  7808. if c.header_ == nil {
  7809. c.header_ = make(http.Header)
  7810. }
  7811. return c.header_
  7812. }
  7813. func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
  7814. reqHeaders := make(http.Header)
  7815. for k, v := range c.header_ {
  7816. reqHeaders[k] = v
  7817. }
  7818. reqHeaders.Set("User-Agent", c.s.userAgent())
  7819. if c.ifNoneMatch_ != "" {
  7820. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7821. }
  7822. var body io.Reader = nil
  7823. c.urlParams_.Set("alt", alt)
  7824. urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types")
  7825. urls += "?" + c.urlParams_.Encode()
  7826. req, _ := http.NewRequest("GET", urls, body)
  7827. req.Header = reqHeaders
  7828. googleapi.Expand(req.URL, map[string]string{
  7829. "project": c.project,
  7830. })
  7831. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7832. }
  7833. // Do executes the "deploymentmanager.types.list" call.
  7834. // Exactly one of *TypesListResponse or error will be non-nil. Any
  7835. // non-2xx status code is an error. Response headers are in either
  7836. // *TypesListResponse.ServerResponse.Header or (if a response was
  7837. // returned at all) in error.(*googleapi.Error).Header. Use
  7838. // googleapi.IsNotModified to check whether the returned error was
  7839. // because http.StatusNotModified was returned.
  7840. func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, error) {
  7841. gensupport.SetOptions(c.urlParams_, opts...)
  7842. res, err := c.doRequest("json")
  7843. if res != nil && res.StatusCode == http.StatusNotModified {
  7844. if res.Body != nil {
  7845. res.Body.Close()
  7846. }
  7847. return nil, &googleapi.Error{
  7848. Code: res.StatusCode,
  7849. Header: res.Header,
  7850. }
  7851. }
  7852. if err != nil {
  7853. return nil, err
  7854. }
  7855. defer googleapi.CloseBody(res)
  7856. if err := googleapi.CheckResponse(res); err != nil {
  7857. return nil, err
  7858. }
  7859. ret := &TypesListResponse{
  7860. ServerResponse: googleapi.ServerResponse{
  7861. Header: res.Header,
  7862. HTTPStatusCode: res.StatusCode,
  7863. },
  7864. }
  7865. target := &ret
  7866. if err := gensupport.DecodeResponse(target, res); err != nil {
  7867. return nil, err
  7868. }
  7869. return ret, nil
  7870. // {
  7871. // "description": "Lists all resource types for Deployment Manager.",
  7872. // "httpMethod": "GET",
  7873. // "id": "deploymentmanager.types.list",
  7874. // "parameterOrder": [
  7875. // "project"
  7876. // ],
  7877. // "parameters": {
  7878. // "filter": {
  7879. // "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).",
  7880. // "location": "query",
  7881. // "type": "string"
  7882. // },
  7883. // "maxResults": {
  7884. // "default": "500",
  7885. // "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)",
  7886. // "format": "uint32",
  7887. // "location": "query",
  7888. // "minimum": "0",
  7889. // "type": "integer"
  7890. // },
  7891. // "orderBy": {
  7892. // "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.",
  7893. // "location": "query",
  7894. // "type": "string"
  7895. // },
  7896. // "pageToken": {
  7897. // "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.",
  7898. // "location": "query",
  7899. // "type": "string"
  7900. // },
  7901. // "project": {
  7902. // "description": "The project ID for this request.",
  7903. // "location": "path",
  7904. // "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])?))",
  7905. // "required": true,
  7906. // "type": "string"
  7907. // }
  7908. // },
  7909. // "path": "{project}/global/types",
  7910. // "response": {
  7911. // "$ref": "TypesListResponse"
  7912. // },
  7913. // "scopes": [
  7914. // "https://www.googleapis.com/auth/cloud-platform",
  7915. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  7916. // "https://www.googleapis.com/auth/ndev.cloudman",
  7917. // "https://www.googleapis.com/auth/ndev.cloudman.readonly"
  7918. // ]
  7919. // }
  7920. }
  7921. // Pages invokes f for each page of results.
  7922. // A non-nil error returned from f will halt the iteration.
  7923. // The provided context supersedes any context provided to the Context method.
  7924. func (c *TypesListCall) Pages(ctx context.Context, f func(*TypesListResponse) error) error {
  7925. c.ctx_ = ctx
  7926. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7927. for {
  7928. x, err := c.Do()
  7929. if err != nil {
  7930. return err
  7931. }
  7932. if err := f(x); err != nil {
  7933. return err
  7934. }
  7935. if x.NextPageToken == "" {
  7936. return nil
  7937. }
  7938. c.PageToken(x.NextPageToken)
  7939. }
  7940. }